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
diff --git a/lib/AST/DeclPrinter.cpp b/lib/AST/DeclPrinter.cpp
index 9f18fc5..d417fbb 100644
--- a/lib/AST/DeclPrinter.cpp
+++ b/lib/AST/DeclPrinter.cpp
@@ -356,8 +356,6 @@
BMInitializer->getBaseClass()->getAsRecordType();
const CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(RT->getDecl());
Out << BaseDecl->getNameAsString();
- if (!hasArguments)
- Out << "()";
}
if (hasArguments) {
Out << "(";
@@ -370,7 +368,8 @@
Exp->printPretty(Out, Context, 0, Policy, Indentation);
}
Out << ")";
- }
+ } else
+ Out << "()";
}
}
}