From 939afd89bbb859b2ec2b1b9ae4fa3dd42e93ded0 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Mon, 13 Jul 2009 23:31:10 +0000 Subject: [PATCH] Fixes a minor bug in pretty printing of ctor defs. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@75549 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/AST/DeclPrinter.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp index 9f18fc5ff2..d417fbb7e8 100644 --- a/lib/AST/DeclPrinter.cpp +++ b/lib/AST/DeclPrinter.cpp @@ -356,8 +356,6 @@ void DeclPrinter::VisitFunctionDecl(FunctionDecl *D) { BMInitializer->getBaseClass()->getAsRecordType(); const CXXRecordDecl *BaseDecl = cast(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 << "()"; } } } -- 2.50.1