File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
clang/lib/Frontend/Rewrite Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -4358,21 +4358,21 @@ Stmt *RewriteObjC::SynthBlockInitExpr(BlockExpr *Exp,
4358
4358
for (unsigned i = 0 ; i < InnerBlockDeclRefs.size (); i++) {
4359
4359
DeclRefExpr *Exp = InnerBlockDeclRefs[i];
4360
4360
ValueDecl *VD = Exp->getDecl ();
4361
- if (!VD->hasAttr <BlocksAttr>() && !BlockByCopyDeclsPtrSet.count (VD)) {
4361
+ if (!VD->hasAttr <BlocksAttr>() &&
4362
+ BlockByCopyDeclsPtrSet.insert (VD).second ) {
4362
4363
// We need to save the copied-in variables in nested
4363
4364
// blocks because it is needed at the end for some of the API
4364
4365
// generations. See SynthesizeBlockLiterals routine.
4365
4366
InnerDeclRefs.push_back (Exp);
4366
4367
countOfInnerDecls++;
4367
4368
BlockDeclRefs.push_back (Exp);
4368
- BlockByCopyDeclsPtrSet.insert (VD);
4369
4369
BlockByCopyDecls.push_back (VD);
4370
4370
}
4371
- if (VD->hasAttr <BlocksAttr>() && !BlockByRefDeclsPtrSet.count (VD)) {
4371
+ if (VD->hasAttr <BlocksAttr>() &&
4372
+ BlockByRefDeclsPtrSet.insert (VD).second ) {
4372
4373
InnerDeclRefs.push_back (Exp);
4373
4374
countOfInnerDecls++;
4374
4375
BlockDeclRefs.push_back (Exp);
4375
- BlockByRefDeclsPtrSet.insert (VD);
4376
4376
BlockByRefDecls.push_back (VD);
4377
4377
}
4378
4378
}
You can’t perform that action at this time.
0 commit comments