[clang] [clang][dataflow] Refactor `widen` API to be explicit about change effect. (PR #87233)

Yitzhak Mandelbaum via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 03:49:35 PDT 2024


================
@@ -805,6 +805,25 @@ class NullPointerAnalysis final
     else
       JoinedVal.setProperty("is_null", JoinedEnv.makeTopBoolValue());
   }
+
+  std::optional<WidenResult> widen(QualType Type, Value &Prev,
+                                   const Environment &PrevEnv, Value &Current,
+                                   Environment &CurrentEnv) override {
----------------
ymand wrote:

I added this so that we can test the widening functionality. Turns out we had no tests for framework calls to `widen`.

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


More information about the cfe-commits mailing list