[PATCH] D144709: [clang-format] Improve west to east const

2023-02-25 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf added a comment. Thanks for the review so far! Passes all tests and works in one shot on my test files as well as 3k+ files repository, i.e. it does not have to be run twice. As one use-case of this rule is to be able to checkout code and freely swap between left/right. Then

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-25 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500403. AlexanderHederstaf added a comment. Add comments for different cases. Add more tests. Fix whitespace issue. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-25 Thread Emilia Dreamer via Phabricator via cfe-commits
rymiel added a comment. just as a heads up, I'm applying https://reviews.llvm.org/D144537 since it's a quick bug fix; this patch *would* replace that one, but may need more time. (also conflicts may appear) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf added a comment. > 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 to not touch it in any way. That is no longer an issue in the latest patch. Repository: rG

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Björn Schäpers via Phabricator via cfe-commits
HazardyKnusperkeks added a comment. In D144709#4149737 , @AlexanderHederstaf wrote: > I tried to refactor QualifierAlignmentFixer to handle more types, notably > removing the *,&,&& requirement as e.g. const Foo did not work. To avoid > moving qualifie

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500225. AlexanderHederstaf added a comment. Add test with advanced type that would not work before. Add pointer to member. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.ll

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf updated this revision to Diff 500215. AlexanderHederstaf added a comment. Fixed the const/volatile placement. Added a few tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/D144709 Files:

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf added a comment. I will add new tests / examples as well as look into the volatile/const ordering. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/D144709 _

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread MyDeveloperDay via Phabricator via cfe-commits
MyDeveloperDay added a comment. Can you please add unit tests for the cases you added Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D144709/new/ https://reviews.llvm.org/D144709 ___ cfe-commits mailing li

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf added a reviewer: MyDeveloperDay. AlexanderHederstaf added a comment. I tried to refactor QualifierAlignmentFixer to handle more types, notably removing the *,&,&& requirement as e.g. const Foo did not work. To avoid moving qualifiers too far, a test for "already east const" i

[PATCH] D144709: [clang-format] Improve west to east const

2023-02-24 Thread Alexander Hederstaf via Phabricator via cfe-commits
AlexanderHederstaf created this revision. Herald added a project: All. AlexanderHederstaf requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Qualifiers were not moved for non-pointer non-simple types. Remove the requirement for *,&,&& and