[cfe-commits] r166500 - in /cfe/trunk: lib/AST/StmtPrinter.cpp test/SemaCXX/ast-print.cpp

Eli Friedman eli.friedman at gmail.com
Tue Oct 23 13:26:57 PDT 2012


Author: efriedma
Date: Tue Oct 23 15:26:57 2012
New Revision: 166500

URL: http://llvm.org/viewvc/llvm-project?rev=166500&view=rev
Log:
Fix pretty-printing pseudo-destructor calls.  Patch by Grzegorz Jablonski.


Modified:
    cfe/trunk/lib/AST/StmtPrinter.cpp
    cfe/trunk/test/SemaCXX/ast-print.cpp

Modified: cfe/trunk/lib/AST/StmtPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/StmtPrinter.cpp?rev=166500&r1=166499&r2=166500&view=diff
==============================================================================
--- cfe/trunk/lib/AST/StmtPrinter.cpp (original)
+++ cfe/trunk/lib/AST/StmtPrinter.cpp Tue Oct 23 15:26:57 2012
@@ -1467,6 +1467,7 @@
     OS << '.';
   if (E->getQualifier())
     E->getQualifier()->print(OS, Policy);
+  OS << "~";
 
   std::string TypeS;
   if (IdentifierInfo *II = E->getDestroyedTypeIdentifier())

Modified: cfe/trunk/test/SemaCXX/ast-print.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/ast-print.cpp?rev=166500&r1=166499&r2=166500&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/ast-print.cpp (original)
+++ cfe/trunk/test/SemaCXX/ast-print.cpp Tue Oct 23 15:26:57 2012
@@ -60,3 +60,7 @@
     S s( 1,2 );
 }
 
+
+// CHECK: t.~T();
+
+template <typename T> void test8(T t) { t.~T(); }





More information about the cfe-commits mailing list