Author: Owen Pan Date: 2023-03-07T15:15:37-08:00 New Revision: f6e7a5c29221f445e4cbddc32667a1e12a1446db
URL: https://github.com/llvm/llvm-project/commit/f6e7a5c29221f445e4cbddc32667a1e12a1446db DIFF: https://github.com/llvm/llvm-project/commit/f6e7a5c29221f445e4cbddc32667a1e12a1446db.diff LOG: [clang-format][NFC] Remove isCpp11AttributeSpecifier() See https://reviews.llvm.org/D137486#3910570. Added: Modified: clang/lib/Format/TokenAnnotator.cpp Removed: ################################################################################ diff --git a/clang/lib/Format/TokenAnnotator.cpp b/clang/lib/Format/TokenAnnotator.cpp index fa80588cd3b2..f8ef22736abb 100644 --- a/clang/lib/Format/TokenAnnotator.cpp +++ b/clang/lib/Format/TokenAnnotator.cpp @@ -591,10 +591,6 @@ class AnnotatingParser { return false; } - bool isCpp11AttributeSpecifier(const FormatToken &Tok) { - return isCppAttribute(Style.isCpp(), Tok); - } - bool parseSquare() { if (!CurrentToken) return false; @@ -617,7 +613,7 @@ class AnnotatingParser { const bool IsInnerSquare = Contexts.back().InCpp11AttributeSpecifier; const bool IsCpp11AttributeSpecifier = - isCpp11AttributeSpecifier(*Left) || IsInnerSquare; + isCppAttribute(Style.isCpp(), *Left) || IsInnerSquare; // Treat C# Attributes [STAThread] much like C++ attributes [[...]]. bool IsCSharpAttributeSpecifier = @@ -2244,7 +2240,7 @@ class AnnotatingParser { if (Tok.Next->isOneOf(tok::kw_noexcept, tok::kw_volatile, tok::kw_const, tok::kw_requires, tok::kw_throw, tok::arrow, Keywords.kw_override, Keywords.kw_final) || - isCpp11AttributeSpecifier(*Tok.Next)) { + isCppAttribute(Style.isCpp(), *Tok.Next)) { return false; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits