aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/DeclPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/DeclPrinter.cpp')
-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 << "()";
}
}
}