diff options
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r-- | clang/unittests/AST/ASTImporterTest.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index 3cc38fb55b2..39d6afee40b 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -456,5 +456,24 @@ TEST(ImportExpr, ImportInitListExpr) { } +const internal::VariadicDynCastAllOfMatcher<Expr, VAArgExpr> vaArgExpr; + +TEST(ImportExpr, ImportVAArgExpr) { + MatchVerifier<Decl> Verifier; + EXPECT_TRUE( + testImport( + "void declToImport(__builtin_va_list list, ...) {" + " (void)__builtin_va_arg(list, int); }", + Lang_CXX, "", Lang_CXX, Verifier, + functionDecl( + hasBody( + compoundStmt( + has( + cStyleCastExpr( + hasSourceExpression( + vaArgExpr())))))))); +} + + } // end namespace ast_matchers } // end namespace clang |