[clang] [clang][ASTImporter] Support Importer of BuiltinBitCastExpr (PR #74813)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Tue Dec 19 05:39:53 PST 2023
================
@@ -3220,6 +3220,12 @@ TEST_P(ImportExpr, UnresolvedMemberExpr) {
compoundStmt(has(callExpr(has(unresolvedMemberExpr())))))))));
}
+TEST_P(ImportExpr, BuiltinBitCastExpr) {
+ MatchVerifier<Decl> Verifier;
+ testImport("void declToImport(int T) { (void)__builtin_bit_cast(float, T); }",
+ Lang_CXX20, "", Lang_CXX20, Verifier, functionDecl());
+}
+
----------------
balazske wrote:
I did mean to add this test (and the AST matcher) (after test for `ImportVAArgExpr` near line 563), and the other is not needed:
```
TEST_P(ImportExpr, ImportBuiltinBitCastExpr) {
MatchVerifier<Decl> Verifier;
testImport("void declToImport(int X) {"
" (void)__builtin_bit_cast(float, X); }",
Lang_CXX20, "", Lang_CXX20, Verifier,
functionDecl(hasDescendant(
cStyleCastExpr(hasSourceExpression(builtinBitCastExpr())))));
}
```
https://github.com/llvm/llvm-project/pull/74813
More information about the cfe-commits
mailing list