sgatev accepted this revision.
sgatev added inline comments.

================
Comment at: 
clang/lib/Analysis/FlowSensitive/Models/UncheckedOptionalAccessModel.cpp:275
+      State.Env.getValue(*ValueOrPredExpr, SkipPast::None));
+  if (ExprValue == nullptr) {
+    auto &ExprLoc = State.Env.createStorageLocation(*ValueOrPredExpr);
----------------
ymandel wrote:
> sgatev wrote:
> > Why do this conditionally? I think we should set a value regardless of 
> > whether another model has already done so.
> Why? I figured we're agnostic to the underlying value, and only care about 
> relating it via the implication. We're setting it only so we have something 
> to anchor that implication on.  If we always set it, then we're erasing the 
> information from another model.
Nevermind. I probably didn't follow carefully around all the comment blocks and 
thought that `addToFlowCondition` also happens conditionally. The current 
approach looks good to me.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D122231

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to