[clang] [clang-format] Add support for additional C++ declaration specifiers in QualifierOrder (PR #160853)
Björn Schäpers via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 26 12:41:34 PDT 2025
================
@@ -1384,6 +1397,65 @@ TEST_F(QualifierFixerTest, TemplatesLeft) {
"TemplateType<Container const> t;", Style);
}
+TEST_F(QualifierFixerTest, NewQualifierSupport) {
+ FormatStyle Style = getLLVMStyle();
+ Style.QualifierAlignment = FormatStyle::QAS_Custom;
+
+ // Test typedef qualifier
+ Style.QualifierOrder = {"typedef", "type"};
+ verifyFormat("typedef int MyInt;", Style);
+
+ // Test consteval qualifier
+ Style.QualifierOrder = {"consteval", "type"};
+ verifyFormat("consteval int func();", "int consteval func();", Style);
----------------
HazardyKnusperkeks wrote:
I think it's better to have just a few `verifyFormat`s with more options at once.
https://github.com/llvm/llvm-project/pull/160853
More information about the cfe-commits
mailing list