[clang-tidy] Avoid repeated hash lookups (NFC) (#111628)
This commit is contained in:
@@ -474,10 +474,8 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
|
||||
// It only includes fields that have not been fixed
|
||||
SmallPtrSet<const FieldDecl *, 16> AllFieldsToInit;
|
||||
forEachField(ClassDecl, FieldsToInit, [&](const FieldDecl *F) {
|
||||
if (!HasRecordClassMemberSet.contains(F)) {
|
||||
if (HasRecordClassMemberSet.insert(F).second)
|
||||
AllFieldsToInit.insert(F);
|
||||
HasRecordClassMemberSet.insert(F);
|
||||
}
|
||||
});
|
||||
if (FieldsToInit.empty())
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user