[clang] [analyzer] Splitting TaintPropagation checker into reporting and mode… (PR #98157)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 10 04:05:54 PDT 2024


================
@@ -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();
----------------
steakhal wrote:

Why can't we initialize it regardless if the given checker is enabled or not?

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


More information about the cfe-commits mailing list