diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-03-23 16:26:51 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-03-23 16:26:51 +0000 |
commit | d1659a6bd96132ffab70613b23f5716424fa364f (patch) | |
tree | 93870abc50652582ad1eff831df729904eb7468d /lib/Sema/SemaDecl.cpp | |
parent | d9cd4c947d9dc50907d7c318def665362955c38a (diff) |
Tighten up the determination of whether a function declaration has a
prototype. Thanks Eli!
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67533 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 62b9bff3de..89375d7066 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/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<FunctionType>(R.getTypePtr()); + (!isa<FunctionType>(R.getTypePtr()) && R->isFunctionProtoType()); NewFD = FunctionDecl::Create(Context, DC, D.getIdentifierLoc(), |