diff options
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 18d55d92f47..a50381123c3 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1864,9 +1864,10 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, isVirtualOkay = (SC != FunctionDecl::Static); } else { - bool HasPrototype = + bool HasPrototype = getLangOptions().CPlusPlus || - (D.getNumTypeObjects() && D.getTypeObject(0).Fun.hasPrototype); + (D.getNumTypeObjects() && D.getTypeObject(0).Fun.hasPrototype) || + !isa<FunctionType>(R.getTypePtr()); NewFD = FunctionDecl::Create(Context, DC, D.getIdentifierLoc(), |