]> granicus.if.org Git - clang/commitdiff
Fixes a minor bug in pretty printing of ctor defs.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 13 Jul 2009 23:31:10 +0000 (23:31 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 13 Jul 2009 23:31:10 +0000 (23:31 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75549 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AST/DeclPrinter.cpp

index 9f18fc5ff276d67c70cb8f636501994ddd5b61b6..d417fbb7e8a2757059a45c74f1a206b0ae030771 100644 (file)
@@ -356,8 +356,6 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
               BMInitializer->getBaseClass()->getAsRecordType();
             const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl());
             Out << BaseDecl->getNameAsString();
-            if (!hasArguments)
-              Out << "()";
           }
           if (hasArguments) {
             Out << "(";
@@ -370,7 +368,8 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) {
               Exp->printPretty(Out, Context, 0, Policy, Indentation);
             }
             Out << ")";
-          }
+          } else
+            Out << "()";
         }
       }
     }