================ @@ -1122,10 +1131,20 @@ void GenericTaintChecker::taintUnsafeSocketProtocol(const CallEvent &Call, } /// Checker registration -void ento::registerGenericTaintChecker(CheckerManager &Mgr) { +void ento::registerTaintPropagationChecker(CheckerManager &Mgr) { Mgr.registerChecker<GenericTaintChecker>(); } +bool ento::shouldRegisterTaintPropagationChecker(const CheckerManager &mgr) { + return true; +} + +void ento::registerGenericTaintChecker(CheckerManager &Mgr) { + GenericTaintChecker *checker = Mgr.getChecker<GenericTaintChecker>(); + checker->isTaintReporterCheckerEnabled = true; + checker->reporterCheckerName = Mgr.getCurrentCheckerName(); ---------------- NagyDonat wrote:
We only use that `unique_ptr` has a null / empty state in addition to representing the "real" `BugType` values. However, `std::optional` would be completely sufficient for this goal (here and AFAIK in every checker that uses `unique_ptr`s to juggle multiple `BugType`s). If we really want, in _this_ checker we could use a "bare" `BugType` data member if we leave it uninitialized in the constructor of the checker class (or initialize it with dummy values) and then unconditionally overwrite it with the "real" `BugType` in this `register...` function. (Other checkers have lazy initialization patterns that check the nullness of the `BugType`.) https://github.com/llvm/llvm-project/pull/98157 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits