[clang] [clang] Save ShuffleVectorExpr args as ConstantExpr (PR #139709)
via cfe-commits
cfe-commits at lists.llvm.org
Wed May 14 00:32:13 PDT 2025
Timm =?utf-8?q?Bäder?= <tbaeder at redhat.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/139709 at github.com>
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 HEAD~1 HEAD --extensions cpp,h -- clang/include/clang/AST/Expr.h clang/lib/AST/ByteCode/Compiler.cpp clang/lib/AST/ExprConstant.cpp clang/lib/CodeGen/CGExprScalar.cpp clang/lib/Sema/SemaChecking.cpp clang/unittests/AST/ASTImporterTest.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp
index 4b7446fb3..c799b3846 100644
--- a/clang/unittests/AST/ASTImporterTest.cpp
+++ b/clang/unittests/AST/ASTImporterTest.cpp
@@ -305,13 +305,11 @@ TEST_P(ImportExpr, ImportShuffleVectorExpr) {
return __builtin_shufflevector(a, b, 0, 1, 2, 3);
}
)code";
- const auto Pattern = functionDecl(hasDescendant(
- shuffleVectorExpr(allOf(has(declRefExpr(to(parmVarDecl(hasName("a"))))),
- has(declRefExpr(to(parmVarDecl(hasName("b"))))),
- has(constantExpr(equals(0))),
- has(constantExpr(equals(1))),
- has(constantExpr(equals(2))),
- has(constantExpr(equals(3)))))));
+ const auto Pattern = functionDecl(hasDescendant(shuffleVectorExpr(
+ allOf(has(declRefExpr(to(parmVarDecl(hasName("a"))))),
+ has(declRefExpr(to(parmVarDecl(hasName("b"))))),
+ has(constantExpr(equals(0))), has(constantExpr(equals(1))),
+ has(constantExpr(equals(2))), has(constantExpr(equals(3)))))));
testImport(Code, Lang_C99, "", Lang_C99, Verifier, Pattern);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/139709
More information about the cfe-commits
mailing list