[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 02:44:44 PDT 2025
================
@@ -40,22 +40,23 @@ template <> struct FoldingSetTrait<ObjectState> {
namespace {
class VirtualCallChecker
- : public Checker<check::BeginFunction, check::EndFunction, check::PreCall> {
+ : public CheckerFamily<check::BeginFunction, check::EndFunction,
+ check::PreCall> {
public:
- enum : CheckerPartIdx { PureChecker, ImpureChecker, NumCheckerParts };
-
- BugType BugTypes[NumCheckerParts] = {
- {this, PureChecker, "Pure virtual method call",
- categories::CXXObjectLifecycle},
- {this, ImpureChecker, "Unexpected loss of virtual dispatch",
- categories::CXXObjectLifecycle}};
+ CheckerFrontendWithBugType PureChecker{"Pure virtual method call",
+ categories::CXXObjectLifecycle},
+ ImpureChecker{"Unexpected loss of virtual dispatch",
+ categories::CXXObjectLifecycle};
----------------
steakhal wrote:
Please declare data members in separate declarations.
https://github.com/llvm/llvm-project/pull/139256
More information about the cfe-commits
mailing list