aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2009-07-13 23:31:10 +0000
committerFariborz Jahanian <fjahanian@apple.com>2009-07-13 23:31:10 +0000
commit939afd89bbb859b2ec2b1b9ae4fa3dd42e93ded0 (patch)
treec7326cb0e9b7fd59512453107f602af16378836e
parent8800ad4eaa1621f6d23c8264971063b9f8da6a2e (diff)
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
-rw-r--r--lib/AST/DeclPrinter.cpp5
1 files 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<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 << "()";
}
}
}