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

Donát Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 9 09:17:35 PDT 2024


================
@@ -391,8 +392,11 @@ class GenericTaintChecker : public Checker<check::PreCall, check::PostCall> {
   bool generateReportIfTainted(const Expr *E, StringRef Msg,
                                CheckerContext &C) const;
 
+  bool isTaintReporterCheckerEnabled = false;
+  CheckerNameRef reporterCheckerName;
+
 private:
-  const BugType BT{this, "Use of Untrusted Data", categories::TaintedData};
+  mutable std::unique_ptr<BugType> BT;
----------------
NagyDonat wrote:

I'm a bit sad that this mutable unique_ptr trickery reappears in this checker, but I don't see a better alternative :frowning_face: 

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


More information about the cfe-commits mailing list