From: Eli Friedman Date: Tue, 23 Oct 2012 20:26:57 +0000 (+0000) Subject: Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9cc8ac523c3194400d797f354c422d75a17820ce;p=platform%2Fupstream%2Fllvm.git Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski. llvm-svn: 166500 --- diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp index 5d3b83a..57eb1a9 100644 --- a/clang/lib/AST/StmtPrinter.cpp +++ b/clang/lib/AST/StmtPrinter.cpp @@ -1467,6 +1467,7 @@ void StmtPrinter::VisitCXXPseudoDestructorExpr(CXXPseudoDestructorExpr *E) { OS << '.'; if (E->getQualifier()) E->getQualifier()->print(OS, Policy); + OS << "~"; std::string TypeS; if (IdentifierInfo *II = E->getDestroyedTypeIdentifier()) diff --git a/clang/test/SemaCXX/ast-print.cpp b/clang/test/SemaCXX/ast-print.cpp index e0c154a..0dad623 100644 --- a/clang/test/SemaCXX/ast-print.cpp +++ b/clang/test/SemaCXX/ast-print.cpp @@ -60,3 +60,7 @@ template void test7() S s( 1,2 ); } + +// CHECK: t.~T(); + +template void test8(T t) { t.~T(); }