[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 10 07:33:06 PDT 2021
MyDeveloperDay added a comment.
In D69764#2936827 <https://reviews.llvm.org/D69764#2936827>, @HazardyKnusperkeks wrote:
> First off, I think it should be configured in a different way, to prepare the path for also formatting static, inline, etc.
To be honest I think if we wanted to do that we could do so by extending the "CVQualifierOrder" to support more keywords (To be honest I think the original requirement is mainly for const, I concede on the volatile as for the others I think I'd want to see how we get on in order to reduce the complexity. but it would be fun to try I guess!)
> If this is kept there should be tests on what happens if there is const or volatile more than once in the string list, and when there are typos. Should there be a command line warning on a typo or an unsupported identifier is in the list?
Typos would be ignored by the "if", duplicates well that would impact because the keywords push though themselves hence the reversing based on direction.
I guess we COULD validate the options, but I think that would make the .clang-format file not very future proof if I check that it only contains "const volatile", let me check if other options every validate themselves in quite the same way.
(but I take your point), as always , thank you for the quick review @HazardyKnusperkeks
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69764/new/
https://reviews.llvm.org/D69764
More information about the cfe-commits
mailing list