[clang] [analyzer][NFC] Introduce framework for checker families (PR #139256)
Balazs Benics via cfe-commits
cfe-commits at lists.llvm.org
Tue May 13 06:05:56 PDT 2025
================
@@ -56,11 +54,11 @@ static const Expr *getDenomExpr(const ExplodedNode *N) {
void DivZeroChecker::reportBug(StringRef Msg, ProgramStateRef StateZero,
CheckerContext &C) const {
- if (!isPartEnabled(DivideZeroChecker))
+ if (!DivideZeroChecker.isEnabled())
return;
if (ExplodedNode *N = C.generateErrorNode(StateZero)) {
- auto R = std::make_unique<PathSensitiveBugReport>(
- BugTypes[DivideZeroChecker], Msg, N);
+ auto R = std::make_unique<PathSensitiveBugReport>(DivideZeroChecker.getBT(),
+ Msg, N);
----------------
steakhal wrote:
AN alternative is to provide an overload for the ctor to PathSensitiveBugReport to handle this conversion.
https://github.com/llvm/llvm-project/pull/139256
More information about the cfe-commits
mailing list