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
  https://reviews.llvm.org/D65724/new/

https://reviews.llvm.org/D65724



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to