diff options
author | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-13 23:31:10 +0000 |
---|---|---|
committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-07-13 23:31:10 +0000 |
commit | 44e56ca9495fef7f42e973a8e48e6b013500bf53 (patch) | |
tree | 02d2af8292db2691ec03c256f40fd5800d32aa65 /clang/lib/AST/DeclPrinter.cpp | |
parent | eabdd984b13ba149121d28fcefdefb1b3c88ee8f (diff) | |
download | bcm5719-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.cpp | 5 |
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 << "()"; } } } |