diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/AST/Type.cpp | 2 | ||||
-rw-r--r-- | lib/Sema/Sema.cpp | 2 |
2 files changed, 2 insertions, 2 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"; } diff --git a/lib/Sema/Sema.cpp b/lib/Sema/Sema.cpp index 1212d070f6..e3cea5be42 100644 --- a/lib/Sema/Sema.cpp +++ b/lib/Sema/Sema.cpp @@ -60,7 +60,7 @@ static void ConvertArgToStringFn(Diagnostic::ArgumentKind Kind, intptr_t Val, // Not va_list. Ty.getUnqualifiedType() != Context.getBuiltinVaListType()) { S = "'"+S+"' (aka '"; - S += DesugaredTy.getAsString(); + S += DesugaredTy.getAsString(Context.PrintingPolicy); S += "')"; Output.append(S.begin(), S.end()); return; |