================ @@ -25,16 +25,20 @@ using namespace ento; using namespace taint; namespace { -class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > { - const BugType BT{this, "Division by zero"}; - const BugType TaintBT{this, "Division by zero", categories::TaintedData}; +class DivZeroChecker : public Checker<check::PreStmt<BinaryOperator>> { void reportBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C) const; void reportTaintBug(StringRef Msg, ProgramStateRef StateZero, CheckerContext &C, llvm::ArrayRef<SymbolRef> TaintedSyms) const; public: + /// This checker class implements multiple user facing checker + enum CheckKind { CK_DivZeroChecker, CK_TaintedDivChecker, CK_NumCheckKinds }; ---------------- NagyDonat wrote:
Please use `DivideZero` instead of `DivZero` in the name of the `CheckKind` to be consistent with the name of the `core.DivideZero` checker. (The name of source file and the checker class may stay `DivZero`, because they are no longer in 1:1 correspondence with the checker. It's unfortunate that we have these inconsistencies, they are really annoying during the development.) Also I'd omit the `Checker` suffix from these enum constants -- it doesn't provide any added information. 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