diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-03 02:06:50 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2009-06-03 02:06:50 +0000 |
commit | 7c94c4bb7b875dc1a2b23f77f1ed8013cf94abdb (patch) | |
tree | e798d0a8ccc99534c2b45b4b512084b9f5bcbc16 /lib/AST/Type.cpp | |
parent | 2cc390e62014a9587fe423efdd68cfa45543d804 (diff) |
Use "()" instead of "(void)" when pretty-printing a parameter-less function type for C++.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r-- | lib/AST/Type.cpp | 2 |
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"; } |