aboutsummaryrefslogtreecommitdiff
path: root/Driver/RewriteObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-02-25 16:33:18 +0000
committerDouglas Gregor <dgregor@apple.com>2009-02-25 16:33:18 +0000
commit2224f84658fb9b3725a31f2680edb64ae73bf705 (patch)
treed8b3f0a9bfc05c8565e35df1c47b5cc649377136 /Driver/RewriteObjC.cpp
parent70f2a0485dd81e6684553eb5537a27db4176ed45 (diff)
C99 DR #316 implies that the function parameter types that are known
only from a function definition (that does not have a prototype) are only used to determine the compatible with other declarations of that same function. In particular, when referencing the function we pretend as if it does not have a prototype. Implement this behavior, which fixes PR3626. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Driver/RewriteObjC.cpp')
-rw-r--r--Driver/RewriteObjC.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/Driver/RewriteObjC.cpp b/Driver/RewriteObjC.cpp
index 610e1c5106..bd95a3922a 100644
--- a/Driver/RewriteObjC.cpp
+++ b/Driver/RewriteObjC.cpp
@@ -4063,7 +4063,8 @@ FunctionDecl *RewriteObjC::SynthBlockInitFunctionDecl(const char *name) {
IdentifierInfo *ID = &Context->Idents.get(name);
QualType FType = Context->getFunctionTypeNoProto(Context->VoidPtrTy);
return FunctionDecl::Create(*Context, TUDecl,SourceLocation(),
- ID, FType, FunctionDecl::Extern, false);
+ ID, FType, FunctionDecl::Extern, false,
+ false);
}
Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp) {