aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index b2ee58f3f3..f573744083 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -1410,7 +1410,7 @@ void FunctionProtoType::getAsStringInternal(std::string &S, const PrintingPolicy
if (getNumArgs())
S += ", ";
S += "...";
- } else if (getNumArgs() == 0) {
+ } else if (getNumArgs() == 0 && !Policy.CPlusPlus) {
// Do not emit int() if we have a proto, emit 'int(void)'.
S += "void";
}