ymandel marked an inline comment as done. ymandel added inline comments.
================ Comment at: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp:123-136 + } else if (auto *CondVal = cast_or_null<ReferenceValue>( + Env.getValue(Cond, SkipPast::None))) { + Env.setValue(CondVal->getPointeeLoc(), *Val); + } else { + QualType PointeeType = Type->castAs<ReferenceType>()->getPointeeType(); + StorageLocation &PointeeLoc = Env.createStorageLocation(PointeeType); + Env.setValue(PointeeLoc, *Val); ---------------- sgatev wrote: > Let's also add tests for these two paths. Turns out this code was overkill -- the conditions are rvalues (even lvalues have an implicit cast inserted), so regardless of any pre-existing form, we should just replace it unconditionally with a simple boolean representation. I've added a new test, though, for fields (vs the existing one for functions), which should exercise the path of `Loc != nullptr`, vs the function which (with current implementation) will exercise `Loc == nullptr`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D123858/new/ https://reviews.llvm.org/D123858 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits