diff options
Diffstat (limited to 'Sema/SemaDecl.cpp')
-rw-r--r-- | Sema/SemaDecl.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Sema/SemaDecl.cpp b/Sema/SemaDecl.cpp index 24013cd9dd..6a718aef91 100644 --- a/Sema/SemaDecl.cpp +++ b/Sema/SemaDecl.cpp @@ -1010,10 +1010,11 @@ Sema::DeclTy *Sema::ActOnStartOfFunctionDef(Scope *FnBodyScope, Declarator &D) { FTI.ArgInfo[i].TypeInfo = Context.IntTy.getAsOpaquePtr(); } } - + // Since this is a function definition, act as though we have information // about the arguments. - FTI.hasPrototype = true; + if (FTI.NumArgs) + FTI.hasPrototype = true; } else { // FIXME: Diagnose arguments without names in C. |