[clang][dataflow] Weaken guard to only check for storage location

Weaken the guard for whether a sub-expression has been evaluated to
only check for the storage location, instead of checking for the
value. It should be sufficient to check for the storage location, as
we don't necessarily guarantee that a value will be set for the
location (although this is currently true right now).

Differential Revision: https://reviews.llvm.org/D125823
This commit is contained in:
Eric Li 2022-05-17 18:48:23 +00:00
parent 11a7e77c95
commit 854c273cbb
1 changed files with 1 additions and 1 deletions

View File

@ -104,7 +104,7 @@ public:
private:
void extendFlowCondition(const Expr &Cond) {
// The terminator sub-expression might not be evaluated.
if (Env.getValue(Cond, SkipPast::None) == nullptr)
if (Env.getStorageLocation(Cond, SkipPast::None) == nullptr)
transfer(StmtToEnv, Cond, Env);
// FIXME: The flow condition must be an r-value, so `SkipPast::None` should