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: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a7a38cb64e0781b8489332cedcfae9c8f95ba22e;p=clang Fix pretty-printing pseudo-destructor calls. Patch by Grzegorz Jablonski. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166500 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/StmtPrinter.cpp b/lib/AST/StmtPrinter.cpp index 5d3b83a150..57eb1a9518 100644 --- a/lib/AST/StmtPrinter.cpp +++ b/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/test/SemaCXX/ast-print.cpp b/test/SemaCXX/ast-print.cpp index e0c154a0ec..0dad623d47 100644 --- a/test/SemaCXX/ast-print.cpp +++ b/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(); }