[clang] [clang][analyzer] Add checker 'core.NullPointerArithm' (PR #157129)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Mon Sep 8 09:23:24 PDT 2025
================
@@ -173,9 +178,11 @@ static bool isDeclRefExprToReference(const Expr *E) {
return false;
}
-void DereferenceChecker::reportBug(const DerefBugType &BT,
- ProgramStateRef State, const Stmt *S,
- CheckerContext &C) const {
+void DereferenceChecker::reportDerefBug(const DerefBugType &BT,
+ ProgramStateRef State, const Stmt *S,
+ CheckerContext &C) const {
+ assert(&BT != &NullPointerArithmBug && "Invalid use of function");
+
----------------
balazske wrote:
During development I was using `DerefBugType` for the new bug type too.
https://github.com/llvm/llvm-project/pull/157129
More information about the cfe-commits
mailing list