[PATCH] D144709: [clang-format] Improve left to right const

2023-02-27 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf added a comment. There are a lot of complicated cases when trying to extend this functionality. I addressed a few more and thought that it might be acceptable to avoid adjusting the qualifiers for variable declared as struct Foo const; -> const struct Foo; const struct Fo

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-27 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500792. AlexanderHederstaf added a comment. Update right to left analyzer Add support for requires clauses Ignore usages of struct/class keyword Add new, and uncomment old tests Fix invalid tests with 'const Foo b* const;' Repository: rG LLVM G

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-27 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500710. AlexanderHederstaf added a comment. Fix simple types not moving all the way right. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/D144709 Files: clang/l

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-27 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf marked 6 inline comments as done. AlexanderHederstaf added a comment. Fixed comments and rebased. Tested right to left on the output of left to right and discovered two cases where the output code would not compile. Added new tests for those cases and I am working on improveme

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-27 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500697. AlexanderHederstaf added a comment. Rebase after change to pointer to member was merged. Add case for typename used for nested dependent names. Add assertions for template closers/openers. Add commented-out tests for two cases where right t

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-26 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D144709#4151546 , @AlexanderHederstaf wrote: >> Highlight by me. That is not acceptable, running the output of >> `clang-format` through `clang-format` shall not result in any change. In >> that case it's better t

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. can you rebase please Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/D144709 ___ cfe-commits mailing list cfe-commits@lists.llvm.org ht

[PATCH] D144709: [clang-format] Improve left to right const

2023-02-25 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. when I originally did this work, I checked out the whole fresh area of LLVM and applied the both east then back to west const and built both to ensure I didn't break anything. Please ensure you do the same, I'm going to be honest you are changing it massively, I