parent
							
								
									a433ee3302
								
							
						
					
					
						commit
						be730c9e34
					
				| 
						 | 
				
			
			@ -4955,6 +4955,7 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
 | 
			
		|||
  
 | 
			
		||||
  // Add inner imported variables now used in current block.
 | 
			
		||||
 int countOfInnerDecls = 0;
 | 
			
		||||
  if (!InnerBlockDeclRefs.empty()) {
 | 
			
		||||
    for (unsigned i = 0; i < InnerBlockDeclRefs.size(); i++) {
 | 
			
		||||
      BlockDeclRefExpr *Exp = InnerBlockDeclRefs[i];
 | 
			
		||||
      ValueDecl *VD = Exp->getDecl();
 | 
			
		||||
| 
						 | 
				
			
			@ -4966,18 +4967,21 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
 | 
			
		|||
        BlockDeclRefs.push_back(Exp);
 | 
			
		||||
        BlockByCopyDeclsPtrSet.insert(VD);
 | 
			
		||||
        BlockByCopyDecls.push_back(VD);
 | 
			
		||||
      if (Exp->getType()->isObjCObjectPointerType() || 
 | 
			
		||||
          Exp->getType()->isBlockPointerType())
 | 
			
		||||
        ImportedBlockDecls.insert(VD);
 | 
			
		||||
      }
 | 
			
		||||
      if (Exp->isByRef() && !BlockByRefDeclsPtrSet.count(VD)) {
 | 
			
		||||
        InnerDeclRefs.push_back(Exp); countOfInnerDecls++;
 | 
			
		||||
        BlockDeclRefs.push_back(Exp);
 | 
			
		||||
        BlockByRefDeclsPtrSet.insert(VD);
 | 
			
		||||
        BlockByRefDecls.push_back(VD);
 | 
			
		||||
      ImportedBlockDecls.insert(VD);
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // Find any imported blocks...they will need special attention.
 | 
			
		||||
    for (unsigned i = 0; i < InnerBlockDeclRefs.size(); i++)
 | 
			
		||||
      if (InnerBlockDeclRefs[i]->isByRef() ||
 | 
			
		||||
          InnerBlockDeclRefs[i]->getType()->isObjCObjectPointerType() || 
 | 
			
		||||
          InnerBlockDeclRefs[i]->getType()->isBlockPointerType())
 | 
			
		||||
        ImportedBlockDecls.insert(InnerBlockDeclRefs[i]->getDecl());
 | 
			
		||||
  }
 | 
			
		||||
  InnerDeclRefsCount.push_back(countOfInnerDecls);
 | 
			
		||||
  
 | 
			
		||||
  std::string FuncName;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue