[PATCH] D118480: [clang][dataflow] Merge distinct pointer values in Environment::join
Gábor Horváth via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat Jan 29 02:29:01 PST 2022
xazax.hun added inline comments.
================
Comment at: clang/lib/Analysis/FlowSensitive/DataflowEnvironment.cpp:114
+ if (auto *FirstVal = dyn_cast<PointerValue>(Val)) {
+ auto *SecondVal = cast<PointerValue>(It->second);
----------------
xazax.hun wrote:
> Shouldn't we ensure that `operator==` return true when we have two `PointerValue`s with the same pointee above? That would make this piece of code redundant.
Never mind, just realized the above is comparing pointers. But I still think we might want to have a separate `operator==` for `Value`s as we might want to compare values in many separate places.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D118480/new/
https://reviews.llvm.org/D118480
More information about the cfe-commits
mailing list