================ @@ -42,8 +42,14 @@ namespace { class VirtualCallChecker : public Checker<check::BeginFunction, check::EndFunction, check::PreCall> { public: - // These are going to be null if the respective check is disabled. - mutable std::unique_ptr<BugType> BT_Pure, BT_Impure; + enum : CheckerPartIdx { PureChecker, ImpureChecker, NumCheckerParts }; + + BugType BugTypes[NumCheckerParts] = { + {this, PureChecker, "Pure virtual method call", ---------------- NagyDonat wrote:
By the way WDYT about changing `"Pure virtual method call"` to e.g.`"Call of pure virtual method"` (in a separate non-NFC follow-up commit)? When I first read this message, I parsed it as "(pure ((virtual method) call))" instead of the correct "(((pure virtual) method) call)" which confused me for 5-10 minutes. https://github.com/llvm/llvm-project/pull/132072 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits