[clang] [NFC][analyzer] Multipart checker refactor 2: NullabilityChecker (PR #132250)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 20 09:39:57 PDT 2025


================
@@ -491,7 +503,7 @@ void NullabilityChecker::reportBugIfInvariantHolds(
     N = C.addTransition(OriginalState, N);
   }
 
-  reportBug(Msg, Error, CK, N, Region, C.getBugReporter(), ValueExpr);
+  reportBug(Msg, Error, Idx, N, Region, C.getBugReporter(), ValueExpr);
----------------
steakhal wrote:

Have you tried to directly pass a BugType ref instead of an index?
An integer index is less typed than a BugType, so it's easier to mess up and do unintended things with it.
Have you tried passing a BugType here?

https://github.com/llvm/llvm-project/pull/132250


More information about the cfe-commits mailing list