This repository was archived by the owner on Sep 15, 2025. It is now read-only.
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,
43584358 for (unsigned i = 0 ; i < InnerBlockDeclRefs.size (); i++) {
43594359 DeclRefExpr *Exp = InnerBlockDeclRefs[i];
43604360 ValueDecl *VD = Exp->getDecl ();
4361- if (!VD->hasAttr <BlocksAttr>() && !BlockByCopyDeclsPtrSet.count (VD)) {
4361+ if (!VD->hasAttr <BlocksAttr>() &&
4362+ BlockByCopyDeclsPtrSet.insert (VD).second ) {
43624363 // We need to save the copied-in variables in nested
43634364 // blocks because it is needed at the end for some of the API
43644365 // generations. See SynthesizeBlockLiterals routine.
43654366 InnerDeclRefs.push_back (Exp);
43664367 countOfInnerDecls++;
43674368 BlockDeclRefs.push_back (Exp);
4368- BlockByCopyDeclsPtrSet.insert (VD);
43694369 BlockByCopyDecls.push_back (VD);
43704370 }
4371- if (VD->hasAttr <BlocksAttr>() && !BlockByRefDeclsPtrSet.count (VD)) {
4371+ if (VD->hasAttr <BlocksAttr>() &&
4372+ BlockByRefDeclsPtrSet.insert (VD).second ) {
43724373 InnerDeclRefs.push_back (Exp);
43734374 countOfInnerDecls++;
43744375 BlockDeclRefs.push_back (Exp);
4375- BlockByRefDeclsPtrSet.insert (VD);
43764376 BlockByRefDecls.push_back (VD);
43774377 }
43784378 }
You can’t perform that action at this time.
0 commit comments