Skip to content

Commit 41928be

Browse files
authored
Merge pull request #37552 from etcwilde/ewilde/nfc-clean-uncovered-async-insertions
[NFC] Cleanup uncovered async diagnostic inserts
2 parents c001756 + 244a41b commit 41928be

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

lib/Sema/TypeCheckEffects.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2651,15 +2651,10 @@ class CheckEffectsCoverage : public EffectsHandlingWalker<CheckEffectsCoverage>
26512651
Expr *expr = E.dyn_cast<Expr*>();
26522652
Expr *anchor = walkToAnchor(expr, parentMap,
26532653
CurContext.isWithinInterpolatedString());
2654-
2655-
auto key = uncoveredAsync.find(anchor);
2656-
if (key == uncoveredAsync.end()) {
2657-
uncoveredAsync.insert({anchor, {}});
2654+
if (uncoveredAsync.find(anchor) == uncoveredAsync.end())
26582655
errorOrder.push_back(anchor);
2659-
}
2660-
uncoveredAsync[anchor].emplace_back(
2661-
*expr,
2662-
classification.getAsyncReason());
2656+
uncoveredAsync[anchor].emplace_back(*expr,
2657+
classification.getAsyncReason());
26632658
}
26642659
}
26652660

0 commit comments

Comments
 (0)