[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 266046. MyDeveloperDay added a comment. Handle more cases, Currently on this case is failing, the preprocess lines are causing multiple replacements which means const gets move more than once. verifyFormat("Foo> P;\n#if 0\n#else\n#endif", "Foo

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Foo> P; // This is needed to trigger the above 'const const' bug above: #if 0 #else #endif produces Foo const const> P; This bug is caused by the way clang-format re-parses the code for each conditional that the preprocessor caused (I actually

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread Manuel Klimek via Phabricator via cfe-commits
klimek added inline comments. Comment at: clang/docs/ClangFormatStyleOptions.rst:1378 +**ConstStyle** (``ConstAlignmentStyle``) + Different ways to arrange const. MyDeveloperDay wrote: > aaron.ballman wrote: > > MyDeveloperDay wrote: > > > klimek wrote: > > >

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay planned changes to this revision. MyDeveloperDay added a comment. @steveire I'm still working on this I have just one issue from your lit that is failing (see below), but I wanted to capture the other changes in the review. const Foo>* p = const_cast>*>(); CHANGES SINCE LAST

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay marked an inline comment as done. MyDeveloperDay added a comment. > I would like to reiterate my discomfort with using East/West as the > identifiers here I'd like to think that I can see it from both angles, @steveire is correct, if I just supply Left/Right then we'll have a

[PATCH] D69764: [clang-format] Add East/West Const fixer capability

2020-05-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay updated this revision to Diff 265949. MyDeveloperDay retitled this revision from "[clang-format] Add Left/Right Const fixer capability" to "[clang-format] Add East/West Const fixer capability". MyDeveloperDay added a comment. Add more test cases Cover more template and namespace

<    1   2