Skip to content

Commit 671088b

Browse files
[Rewrite] Avoid repeated hash lookups (NFC) (#123696)
1 parent 1714fac commit 671088b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3800,8 +3800,8 @@ QualType RewriteModernObjC::GetGroupRecordTypeForObjCIvarBitfield(ObjCIvarDecl *
38003800
const ObjCInterfaceDecl *CDecl = IV->getContainingInterface();
38013801
unsigned GroupNo = ObjCIvarBitfieldGroupNo(IV);
38023802
std::pair<const ObjCInterfaceDecl*, unsigned> tuple = std::make_pair(CDecl, GroupNo);
3803-
if (GroupRecordType.count(tuple))
3804-
return GroupRecordType[tuple];
3803+
if (auto It = GroupRecordType.find(tuple); It != GroupRecordType.end())
3804+
return It->second;
38053805

38063806
SmallVector<ObjCIvarDecl *, 8> IVars;
38073807
for (const ObjCIvarDecl *IVD = CDecl->all_declared_ivar_begin();

0 commit comments

Comments
 (0)