[cfe-commits] r72066 - /cfe/trunk/lib/Sema/SemaExpr.cpp

Fariborz Jahanian fjahanian at apple.com
Mon May 18 16:17:47 PDT 2009


Author: fjahanian
Date: Mon May 18 18:17:46 2009
New Revision: 72066

URL: http://llvm.org/viewvc/llvm-project?rev=72066&view=rev
Log:
BlockDecl node must be complete before block attributes
can be processed. No change in functionality.

Modified:
    cfe/trunk/lib/Sema/SemaExpr.cpp

Modified: cfe/trunk/lib/Sema/SemaExpr.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaExpr.cpp?rev=72066&r1=72065&r2=72066&view=diff

==============================================================================
--- cfe/trunk/lib/Sema/SemaExpr.cpp (original)
+++ cfe/trunk/lib/Sema/SemaExpr.cpp Mon May 18 18:17:46 2009
@@ -5075,10 +5075,9 @@
 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 @@
   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.





More information about the cfe-commits mailing list