diff options
author | Michael Han <fragmentshaders@gmail.com> | 2013-02-25 18:40:11 +0000 |
---|---|---|
committer | Michael Han <fragmentshaders@gmail.com> | 2013-02-25 18:40:11 +0000 |
commit | 6980f17c78442a7db80d98902932ef047930284a (patch) | |
tree | 5dc7d16cd8d038f807425610cda0c467ddf2327e | |
parent | 6dc5c33fd4334ccf4a661c331f86e23829e51d55 (diff) |
Fix empty declaration printing.
Don't print the semicolon when visiting an empty declaration because the semicolon
will be printed as a terminator later.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@176035 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/AST/DeclPrinter.cpp | 1 | ||||
-rw-r--r-- | test/SemaCXX/cxx11-ast-print.cpp | 1 |
2 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 2be0b6c804..e2a66fb8a7 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -726,7 +726,6 @@ void DeclPrinter::VisitNamespaceAliasDecl(NamespaceAliasDecl *D) { void DeclPrinter::VisitEmptyDecl(EmptyDecl *D) { prettyPrintAttributes(D); - Out << ";\n"; } void DeclPrinter::VisitCXXRecordDecl(CXXRecordDecl *D) { diff --git a/test/SemaCXX/cxx11-ast-print.cpp b/test/SemaCXX/cxx11-ast-print.cpp index 8e9480476c..f95eeb50fe 100644 --- a/test/SemaCXX/cxx11-ast-print.cpp +++ b/test/SemaCXX/cxx11-ast-print.cpp @@ -40,3 +40,4 @@ const char *p9 = 0x42e3F_fritz; const char *p10 = 3.300e+15_fritz; // CHECK: ; ; +// CHECK-NOT: ; |