[clang] fix crash & improve comparing on GenericSelectionExpr (PR #67458)

via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 26 10:10:23 PDT 2023


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 64b1fbb3bd03531749792bfb20526c0a0dc07838 e411aa494c09a8f412ee90f302504cd469ef1283 -- clang/lib/AST/ASTStructuralEquivalence.cpp clang/unittests/AST/StructuralEquivalenceTest.cpp
``````````

</details>

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

``````````diff
diff --git a/clang/unittests/AST/StructuralEquivalenceTest.cpp b/clang/unittests/AST/StructuralEquivalenceTest.cpp
index 35c1385e7..639cefbc0 100644
--- a/clang/unittests/AST/StructuralEquivalenceTest.cpp
+++ b/clang/unittests/AST/StructuralEquivalenceTest.cpp
@@ -2100,8 +2100,8 @@ TEST_F(StructuralEquivalenceStmtTest, GenericSelectionExprControlDiffers) {
 
 TEST_F(StructuralEquivalenceStmtTest, GenericSelectionExprAssocExprDiffers) {
   auto t = makeWrappedStmts("_Generic(0u, unsigned int: 0, float: 1)",
-                            "_Generic(0u, unsigned int: 1u, float: 1)", Lang_C99,
-                            genericSelectionExpr());
+                            "_Generic(0u, unsigned int: 1u, float: 1)",
+                            Lang_C99, genericSelectionExpr());
   EXPECT_FALSE(testStructuralMatch(t));
 }
 

``````````

</details>


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


More information about the cfe-commits mailing list