================ @@ -9284,6 +9284,24 @@ TEST_P(ASTImporterOptionSpecificTestBase, // EXPECT_EQ(ToF1Imported->getPreviousDecl(), ToF1); } +const internal::VariadicDynCastAllOfMatcher<Stmt, BuiltinBitCastExpr> + builtinBitCastExpr; + +TEST_P(ASTImporterOptionSpecificTestBase, ImportBuiltinBitCastExpr) { + const char *CodeFrom = + R"( + void foo(int T) { (void)__builtin_bit_cast(float, T); } + )"; + Decl *FromTU = getTuDecl(CodeFrom, Lang_CXX20); + auto *FromFoo = FirstDeclMatcher<FunctionDecl>().match( + FromTU, functionDecl(hasName("foo"))); + auto *ToFoo = Import(FromFoo, Lang_CXX20); + EXPECT_TRUE(ToFoo); + auto *ToBuiltinBitCastExpr = + FirstDeclMatcher<BuiltinBitCastExpr>().match(ToFoo, builtinBitCastExpr()); + EXPECT_TRUE(ToBuiltinBitCastExpr); +} ---------------- jcsxky wrote:
Another testcase has been added to `ImportExpr` https://github.com/llvm/llvm-project/pull/74813 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits