[PATCH] D65724: [analyzer] Don't make ConditionBRVisitor events prunable when the condition is an interesting field
Artem Dergachev via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Aug 14 13:57:33 PDT 2019
NoQ added inline comments.
Comment at: clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp:192-194
+ if (const auto *DRE = dyn_cast<DeclRefExpr>(CondVarExpr))
+ if (const auto *VD = dyn_cast<VarDecl>(DRE->getDecl()))
+ return State->getSVal(State->getLValue(VD, LCtx));
> Also, could you please detail why we think this doesn't/shouldn't work?
FIXME: As seen in `VisitCommonDeclRefExpr`, sometimes `DeclRefExpr` may evaluate to a `FieldRegion` when it refers to a declaration of a lambda capture variable. We most likely need to duplicate that logic here.
CHANGES SINCE LAST ACTION
More information about the cfe-commits