[clang] [analyzer] Introduce the invalidation artifact symbol (PR #207155)

DonĂ¡t Nagy via cfe-commits cfe-commits at lists.llvm.org
Tue Jul 21 07:38:01 PDT 2026


================
@@ -263,6 +263,15 @@ class CallEvent {
     return Origin.dyn_cast<const Expr *>();
   }
 
+  /// Returns the desired \c UnmodeledCall wrapping this call.
+  template <class CauseT> const CauseT *tryCreateInvalidationCause() const {
+    static_assert(std::is_base_of_v<UnmodeledCall, CauseT>,
+                  "forInvalidation<T> requires T : UnmodeledCall");
+    const auto *CE = dyn_cast_or_null<CallExpr>(getOriginExpr());
+    auto &SymMgr = State->getStateManager().getSymbolManager();
----------------
NagyDonat wrote:

You can replace `State->getStateManager().getSymbolManager()` with `State->getSymbolManager()` because `ProgramState` defines this utility method.

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


More information about the cfe-commits mailing list