[PATCH] D69764: [clang-format] Add Left/Right Const fixer capability
MyDeveloperDay via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 13 10:13:15 PDT 2021
MyDeveloperDay added a comment.
I think the relevance of Left/Right East/West as a setting is less important, as its more about an ordering, allowing some tokens to go to the Left and some to the Right of the "type"
QualifierAlignment: Custom
QualifierOrder: [ inline, static, type, const, volatile, restrict ]
While I currently include the Left/Right for some form of completeness I sort of feel i should kill them before we landing this, as I think even my defaults are a little subjective. (unless we can get concencus), hence I don't feel the need to bring back up the Left/Right/East/West debate. If its still a problem later we can add them.
if (Style.QualifierAlignment == FormatStyle::QAS_Right) {
Style.QualifierOrder.clear();
Style.QualifierOrder.push_back("type");
Style.QualifierOrder.push_back("const");
Style.QualifierOrder.push_back("volatile");
} else if (Style.QualifierAlignment == FormatStyle::QAS_Left) {
Style.QualifierOrder.clear();
Style.QualifierOrder.push_back("const");
Style.QualifierOrder.push_back("volatile");
Style.QualifierOrder.push_back("type");
}
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69764/new/
https://reviews.llvm.org/D69764
More information about the cfe-commits
mailing list