github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. 
:warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h,c -- 
clang/test/Parser/c23-enum-generic-assoc.c clang/include/clang/Parse/Parser.h 
clang/include/clang/Parse/RAIIObjectsForParser.h clang/lib/Parse/ParseDecl.cpp 
clang/lib/Parse/ParseDeclCXX.cpp clang/lib/Parse/ParseExpr.cpp 
clang/lib/Parse/ParseTentative.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index ba9e9dc71..c3632716a 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -2663,7 +2663,8 @@ Parser::ParseParenExpression(ParenParseOption &ExprType, 
bool StopIfCastExpr,
                              ParsedType &CastTy, SourceLocation &RParenLoc) {
   assert(Tok.is(tok::l_paren) && "Not a paren expr!");
   ColonProtectionRAIIObject ColonProtection(*this, false);
-  GenericAssociationTypeRAIIObject NotParsingGenericAssociationType(*this, 
false);
+  GenericAssociationTypeRAIIObject NotParsingGenericAssociationType(*this,
+                                                                    false);
 
   BalancedDelimiterTracker T(*this, tok::l_paren);
   if (T.consumeOpen())
diff --git a/clang/lib/Parse/ParseTentative.cpp 
b/clang/lib/Parse/ParseTentative.cpp
index a746cd5b3..8f5e2f648 100644
--- a/clang/lib/Parse/ParseTentative.cpp
+++ b/clang/lib/Parse/ParseTentative.cpp
@@ -1525,18 +1525,14 @@ 
Parser::isCXXDeclarationSpecifier(ImplicitTypenameContext AllowImplicitTypename,
     //     enum E : int { a = 4 }; // enum
     //     enum E : int { 4 };     // bit-field
     //   };
-    if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace))
-    {
-      if (ParsingGenericAssociationType)
-      {
+    if (getLangOpts().CPlusPlus11 && NextToken().is(tok::l_brace)) {
+      if (ParsingGenericAssociationType) {
         RevertingTentativeParsingAction PA(*this);
         ConsumeAnyToken(); // skip keyword
-        ConsumeBrace(); // skip l_brace
-        if (SkipUntil(tok::r_brace, StopBeforeMatch))
-        {
+        ConsumeBrace();    // skip l_brace
+        if (SkipUntil(tok::r_brace, StopBeforeMatch)) {
           ConsumeBrace(); // skip r_brace
-          if (Tok.is(tok::colon))
-          {
+          if (Tok.is(tok::colon)) {
             return TPResult::True;
           }
         }

``````````

</details>


https://github.com/llvm/llvm-project/pull/210353
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to