forked from OSchip/llvm-project
[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:
parent
11a7e77c95
commit
854c273cbb
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue