[PATCH] D124965: [clang][dataflow] Centralize expression skipping logic

Eric Li via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 5 13:22:43 PDT 2022


li.zhe.hua marked an inline comment as done.
li.zhe.hua added inline comments.


================
Comment at: clang/lib/Analysis/FlowSensitive/Transfer.cpp:38-41
+  if (auto *LHSValue =
+          dyn_cast_or_null<BoolValue>(Env.getValue(LHS, SkipPast::Reference)))
+    if (auto *RHSValue =
+            dyn_cast_or_null<BoolValue>(Env.getValue(RHS, SkipPast::Reference)))
----------------
ymandel wrote:
> li.zhe.hua wrote:
> > ymandel wrote:
> > > Is the idea that the skipping is now built into `getValue` via `getStorageLocation`?
> > I don't believe I fixed this. d002495 addressed this by having integral casts route to the sub-expression.
> Great. Just to be sure I understand: you mean that the `IgnoreCasts()` calls were already redundant because of d002495?
Correct, that's my understanding. This diff hunk could be separately committed first. (And maybe it should, for blame clarity.)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124965



More information about the cfe-commits mailing list