We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1ad5f31 commit c911b0aCopy full SHA for c911b0a
clang-tools-extra/clang-tidy/cppcoreguidelines/ProTypeMemberInitCheck.cpp
@@ -474,10 +474,8 @@ void ProTypeMemberInitCheck::checkMissingMemberInitializer(
474
// It only includes fields that have not been fixed
475
SmallPtrSet<const FieldDecl *, 16> AllFieldsToInit;
476
forEachField(ClassDecl, FieldsToInit, [&](const FieldDecl *F) {
477
- if (!HasRecordClassMemberSet.contains(F)) {
+ if (HasRecordClassMemberSet.insert(F).second)
478
AllFieldsToInit.insert(F);
479
- HasRecordClassMemberSet.insert(F);
480
- }
481
});
482
if (FieldsToInit.empty())
483
return;
0 commit comments