File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -16014,7 +16014,8 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
1601416014 llvm::DenseMap<const BlockDecl *, bool> EscapeInfo;
1601516015
1601616016 auto IsOrNestedInEscapingBlock = [&](const BlockDecl *BD) {
16017- if (auto It = EscapeInfo.find(BD); It != EscapeInfo.end())
16017+ auto [It, Inserted] = EscapeInfo.try_emplace(BD);
16018+ if (!Inserted)
1601816019 return It->second;
1601916020
1602016021 bool R = false;
@@ -16027,7 +16028,7 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
1602716028 CurBD = CurBD->getParent()->getInnermostBlockDecl();
1602816029 } while (CurBD);
1602916030
16030- return EscapeInfo[BD] = R;
16031+ return It->second = R;
1603116032 };
1603216033
1603316034 // If the location where 'self' is implicitly retained is inside a escaping
You can’t perform that action at this time.
0 commit comments