================
@@ -58,8 +68,15 @@ void DivZeroChecker::reportBug(StringRef Msg, 
ProgramStateRef StateZero,
 void DivZeroChecker::reportTaintBug(
     StringRef Msg, ProgramStateRef StateZero, CheckerContext &C,
     llvm::ArrayRef<SymbolRef> TaintedSyms) const {
+  if (!ChecksEnabled[CK_TaintedDivChecker])
+    return;
+  if (!BugTypes[CK_TaintedDivChecker])
+    BugTypes[CK_TaintedDivChecker].reset(
+        new BugType(CheckNames[CK_TaintedDivChecker], "Division by zero",
+                    categories::TaintedData));
   if (ExplodedNode *N = C.generateErrorNode(StateZero)) {
----------------
NagyDonat wrote:

Consider using a  non-fatal error node here and in other taint bugs. (Perhaps 
in a follow-up commit?)

When the analyzer finds a taint bug, it only says that "this _may_ cause a 
problem" so it's relevant to know that later something is _definitely_ 
problematic. 

https://github.com/llvm/llvm-project/pull/106389
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to