[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


================
@@ -97,21 +97,34 @@ class Environment {
                       const Value &Val2, const Environment &Env2,
                       Value &JoinedVal, Environment &JoinedEnv) {}
 
+    /// The result of the `widen` operation.
+    struct WidenResult {
+      /// Non-null pointer to a potentially widened version of the widening
+      /// input.
----------------
martinboehme wrote:

```suggestion
      /// Non-null pointer to a potentially widened version of the input
      /// value.
```

("Widening input" is intended to mean "input to widening" but could also be misinterpreted as "input that widens". As it's clear that the context is widening, maybe just "input value"?)

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


More information about the cfe-commits mailing list