summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/DeclPrinter.cpp
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
commit44e56ca9495fef7f42e973a8e48e6b013500bf53 (patch)
tree02d2af8292db2691ec03c256f40fd5800d32aa65 /clang/lib/AST/DeclPrinter.cpp
parenteabdd984b13ba149121d28fcefdefb1b3c88ee8f (diff)
downloadbcm5719-llvm-44e56ca9495fef7f42e973a8e48e6b013500bf53.tar.gz
bcm5719-llvm-44e56ca9495fef7f42e973a8e48e6b013500bf53.zip
Fixes a minor bug in pretty printing of ctor defs.
llvm-svn: 75549
Diffstat (limited to 'clang/lib/AST/DeclPrinter.cpp')
-rw-r--r--clang/lib/AST/DeclPrinter.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/clang/lib/AST/DeclPrinter.cpp b/clang/lib/AST/DeclPrinter.cpp
index 9f18fc5ff27..d417fbb7e8a 100644
--- a/clang/lib/AST/DeclPrinter.cpp
+++ b/clang/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 << "()";
}
}
}
OpenPOWER on IntegriCloud