================
@@ -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:

Move the initialization of `BT` to this point -- then it doesn't need to be a 
`mutable` and you won't need the string data member `reporterCheckerName`.

Notes:
- You may turn `BT` into a public data member -- its visibility is still 
limited to this one source file. 
- `BugType` is a very simple type (essentially a plain struct of three 
strings), there is no reason to postpone its initialization once you have all 
the data.
- You can use `BugType::getCheckerName()` to get the checker name to construct 
the `CheckerProgramPointTag`.

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

Reply via email to