[clang] [Format] Fix isStartOfName to recognize attributes (PR #76804)
kadir çetinkaya via cfe-commits
cfe-commits at lists.llvm.org
Mon Jan 8 03:06:31 PST 2024
================
@@ -1698,8 +1698,6 @@ FormatStyle getGoogleStyle(FormatStyle::LanguageKind Language) {
/*BasedOnStyle=*/"google",
},
};
- GoogleStyle.AttributeMacros.push_back("GUARDED_BY");
----------------
kadircet wrote:
FWIW, not recognizing `foo` in `int foo BAR` as start-of-name looks like a big enough regression (which seems to be the main reason behind the line-braking behavior change), independent of whatever we do with the list of attribute-macros, I believe we should still make sure annotations for `foo` are correct rather urgently. so I am actually still in favor of landing this patch as-is, rather than trying to fix final formatting in a bunch of special cases by updating `AtrributeMacros` list.
https://github.com/llvm/llvm-project/pull/76804
More information about the cfe-commits
mailing list