[clang] [clang-format] Handle static_assert more accurately (PR #166042)

Björn Schäpers via cfe-commits cfe-commits at lists.llvm.org
Sun Nov 2 12:27:03 PST 2025


================
@@ -358,8 +358,8 @@ class AnnotatingParser {
       Contexts.back().IsExpression = false;
     } else if (OpeningParen.Previous &&
                (OpeningParen.Previous->isOneOf(
-                    tok::kw_static_assert, tok::kw_noexcept, tok::kw_explicit,
-                    tok::kw_while, tok::l_paren, tok::comma, TT_CastRParen,
+                    tok::kw_noexcept, tok::kw_explicit, tok::kw_while,
+                    tok::l_paren, tok::comma, TT_CastRParen,
                     TT_BinaryOperator) ||
                 OpeningParen.Previous->isIf())) {
       // static_assert, if and while usually contain expressions.
----------------
HazardyKnusperkeks wrote:

Update the comment.

https://github.com/llvm/llvm-project/pull/166042


More information about the cfe-commits mailing list