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

via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 2 00:48:07 PDT 2024


================
@@ -122,17 +135,19 @@ class Environment {
     ///
     ///  `Prev` and `Current` must be assigned to the same storage location in
     ///  `PrevEnv` and `CurrentEnv`, respectively.
-    virtual Value *widen(QualType Type, Value &Prev, const Environment &PrevEnv,
-                         Value &Current, Environment &CurrentEnv) {
+    virtual std::optional<WidenResult> widen(QualType Type, Value &Prev,
----------------
martinboehme wrote:

How are we going to deal with the fact that this API change breaks existing overrides? (There's an existing [override](https://github.com/google/crubit/blob/d51d5d004caa1d7c6cf5341d1fab22f5bae02018/nullability/pointer_nullability_analysis.cc#L1752) in Crubit's nullability check.)

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


More information about the cfe-commits mailing list