li.zhe.hua created this revision. li.zhe.hua added a reviewer: ymandel. Herald added subscribers: tschuett, steakhal. Herald added a project: All. li.zhe.hua requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
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). Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D125823 Files: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp Index: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -104,7 +104,7 @@ 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
Index: clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp =================================================================== --- clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp +++ clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp @@ -104,7 +104,7 @@ 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
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits