diff options
author | Aleksei Sidorin <a.sidorin@samsung.com> | 2017-11-27 10:30:00 +0000 |
---|---|---|
committer | Aleksei Sidorin <a.sidorin@samsung.com> | 2017-11-27 10:30:00 +0000 |
commit | 60ccb7daf14df2da16511cd443028038d0843143 (patch) | |
tree | e2048447d006d8581467b8114f10336e05ae1608 /clang/unittests/AST/ASTImporterTest.cpp | |
parent | bd2c7eb923116a15f571bd39daf38da98d259db2 (diff) | |
download | bcm5719-llvm-60ccb7daf14df2da16511cd443028038d0843143.tar.gz bcm5719-llvm-60ccb7daf14df2da16511cd443028038d0843143.zip |
[ASTImporter] Support importing CXXPseudoDestructorExpr
Patch by Peter Szecsi!
Differential Revision: https://reviews.llvm.org/D38843
llvm-svn: 319015
Diffstat (limited to 'clang/unittests/AST/ASTImporterTest.cpp')
-rw-r--r-- | clang/unittests/AST/ASTImporterTest.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/unittests/AST/ASTImporterTest.cpp b/clang/unittests/AST/ASTImporterTest.cpp index 2a8f70c2143..86518e132d4 100644 --- a/clang/unittests/AST/ASTImporterTest.cpp +++ b/clang/unittests/AST/ASTImporterTest.cpp @@ -567,5 +567,21 @@ TEST(ImportExpr, ImportTypeTraitExprValDep) { ))))))))))); } +const internal::VariadicDynCastAllOfMatcher<Expr, CXXPseudoDestructorExpr> + cxxPseudoDestructorExpr; + +TEST(ImportExpr, ImportCXXPseudoDestructorExpr) { + MatchVerifier<Decl> Verifier; + EXPECT_TRUE( + testImport("typedef int T;" + "void declToImport(int *p) {" + " T t;" + " p->T::~T();" + "}", + Lang_CXX, "", Lang_CXX, Verifier, + functionDecl(has(compoundStmt(has( + callExpr(has(cxxPseudoDestructorExpr())))))))); +} + } // end namespace ast_matchers } // end namespace clang |