diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-18 23:17:46 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-05-18 23:17:46 +0000 |
| commit | 5f1f9d7a46a2c3da787619c5366b506e9652426a (patch) | |
| tree | 62c41c2db7026f67a0004cbd4c8a855006930c19 /clang/lib/Sema | |
| parent | 501ba0365a96b5d11bfb48d481396be4a0bfb6f7 (diff) | |
| download | bcm5719-llvm-5f1f9d7a46a2c3da787619c5366b506e9652426a.tar.gz bcm5719-llvm-5f1f9d7a46a2c3da787619c5366b506e9652426a.zip | |
BlockDecl node must be complete before block attributes
can be processed. No change in functionality.
llvm-svn: 72066
Diffstat (limited to 'clang/lib/Sema')
| -rw-r--r-- | clang/lib/Sema/SemaExpr.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/Sema/SemaExpr.cpp b/clang/lib/Sema/SemaExpr.cpp index 0caad654ee0..418b3b8ce05 100644 --- a/clang/lib/Sema/SemaExpr.cpp +++ b/clang/lib/Sema/SemaExpr.cpp @@ -5075,10 +5075,9 @@ void Sema::ActOnBlockStart(SourceLocation CaretLoc, Scope *BlockScope) { void Sema::ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) { assert(ParamInfo.getIdentifier()==0 && "block-id should have no identifier!"); - ProcessDeclAttributes(CurBlock->TheDecl, ParamInfo); - if (ParamInfo.getNumTypeObjects() == 0 || ParamInfo.getTypeObject(0).Kind != DeclaratorChunk::Function) { + ProcessDeclAttributes(CurBlock->TheDecl, ParamInfo); QualType T = GetTypeForDeclarator(ParamInfo, CurScope); if (T->isArrayType()) { @@ -5134,6 +5133,7 @@ void Sema::ActOnBlockArguments(Declarator &ParamInfo, Scope *CurScope) { CurBlock->TheDecl->setParams(Context, &CurBlock->Params[0], CurBlock->Params.size()); + ProcessDeclAttributes(CurBlock->TheDecl, ParamInfo); for (BlockDecl::param_iterator AI = CurBlock->TheDecl->param_begin(), E = CurBlock->TheDecl->param_end(); AI != E; ++AI) // If this has an identifier, add it to the scope stack. |

