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) {
16014
16014
llvm::DenseMap<const BlockDecl *, bool> EscapeInfo;
16015
16015
16016
16016
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)
16018
16019
return It->second;
16019
16020
16020
16021
bool R = false;
@@ -16027,7 +16028,7 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
16027
16028
CurBD = CurBD->getParent()->getInnermostBlockDecl();
16028
16029
} while (CurBD);
16029
16030
16030
- return EscapeInfo[BD] = R;
16031
+ return It->second = R;
16031
16032
};
16032
16033
16033
16034
// If the location where 'self' is implicitly retained is inside a escaping
You can’t perform that action at this time.
0 commit comments