diff options
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 3b6ce6bd73..0fe5715578 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -1327,6 +1327,9 @@ Sema::ActOnDeclarator(Scope *S, Declarator &D, bool IsFunctionDefinition) { if (R.isNull()) { InvalidDecl = true; R = Context.IntTy; + if (IsFunctionDefinition) // int(...) + R = Context.getFunctionType(R, 0, 0, true, 0); + } // See if this is a redefinition of a variable in the same scope. |