From d6b05f705b2888137615d619e9a5a4d3ce8f2f11 Mon Sep 17 00:00:00 2001 From: Douglas Gregor Date: Mon, 23 Mar 2009 16:26:51 +0000 Subject: Tighten up the determination of whether a function declaration has a prototype. Thanks Eli! llvm-svn: 67533 --- clang/lib/Sema/SemaDecl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'clang/lib/Sema/SemaDecl.cpp') diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 62b9bff3def..89375d7066e 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -1895,7 +1895,7 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, bool HasPrototype = getLangOptions().CPlusPlus || (D.getNumTypeObjects() && D.getTypeObject(0).Fun.hasPrototype) || - !isa(R.getTypePtr()); + (!isa(R.getTypePtr()) && R->isFunctionProtoType()); NewFD = FunctionDecl::Create(Context, DC, D.getIdentifierLoc(), -- cgit v1.2.3