[PATCH] D118038: [clang][dataflow] Enable merging distinct values in Environment::join

Stanislav Gatev via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 24 08:47:37 PST 2022


sgatev marked an inline comment as done.
sgatev added a comment.

Yes, I think we should be able to propagate properties across copy and move operations in the framework. Clients can override this behavior by modeling the copy and move operations and storing different values in the environment.



================
Comment at: clang/unittests/Analysis/FlowSensitive/TypeErasedDataflowAnalysisTest.cpp:364
+    } else {
+      cast<StructValue>(&MergedVal)->setProperty("has_value", HasValueTop);
+    }
----------------
xazax.hun wrote:
> An alternative approach would be to just return false here and whenever the property lookup fails just assume the top value. Since this is just a simple test, feel free to leave this as is.
Right. This seems simpler so let's go with it for now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118038/new/

https://reviews.llvm.org/D118038



More information about the cfe-commits mailing list