[Sema] Avoid repeated hash lookups (NFC) (#122588)

This commit is contained in:
Kazu Hirata 2025-01-11 13:15:50 -08:00 committed by GitHub
parent 07ff786e39
commit a56eb7c998
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -15868,8 +15868,8 @@ static void diagnoseImplicitlyRetainedSelf(Sema &S) {
llvm::DenseMap<const BlockDecl *, bool> EscapeInfo;
auto IsOrNestedInEscapingBlock = [&](const BlockDecl *BD) {
if (EscapeInfo.count(BD))
return EscapeInfo[BD];
if (auto It = EscapeInfo.find(BD); It != EscapeInfo.end())
return It->second;
bool R = false;
const BlockDecl *CurBD = BD;