Author: hanm
Date: Mon Feb 25 12:40:11 2013
New Revision: 176035

URL: http://llvm.org/viewvc/llvm-project?rev=176035&view=rev
Log:
Fix empty declaration printing.

Don't print the semicolon when visiting an empty declaration because the 
semicolon
will be printed as a terminator later.


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

Modified: cfe/trunk/lib/AST/DeclPrinter.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/DeclPrinter.cpp?rev=176035&r1=176034&r2=176035&view=diff
==============================================================================
--- cfe/trunk/lib/AST/DeclPrinter.cpp (original)
+++ cfe/trunk/lib/AST/DeclPrinter.cpp Mon Feb 25 12:40:11 2013
@@ -726,7 +726,6 @@ void DeclPrinter::VisitNamespaceAliasDec
 
 void DeclPrinter::VisitEmptyDecl(EmptyDecl *D) {
   prettyPrintAttributes(D);
-  Out << ";\n";
 }
 
 void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) {

Modified: cfe/trunk/test/SemaCXX/cxx11-ast-print.cpp
URL: 
http://llvm.org/viewvc/llvm-project/cfe/trunk/test/SemaCXX/cxx11-ast-print.cpp?rev=176035&r1=176034&r2=176035&view=diff
==============================================================================
--- cfe/trunk/test/SemaCXX/cxx11-ast-print.cpp (original)
+++ cfe/trunk/test/SemaCXX/cxx11-ast-print.cpp Mon Feb 25 12:40:11 2013
@@ -40,3 +40,4 @@ const char *p9 = 0x42e3F_fritz;
 const char *p10 = 3.300e+15_fritz;
 // CHECK: ;
 ;
+// CHECK-NOT: ;


_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to