baloghadamsoftware marked an inline comment as done.
baloghadamsoftware added inline comments.


================
Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:221-230
+  if (BoundNumVal.isUnknown()) {
+    if (const auto *BoundDeclRefExpr = dyn_cast<DeclRefExpr>(BoundExpr)) {
+      // FIXME: Add other declarations such as Objective-C fields
+      if (const auto *BoundVarDecl =
+              dyn_cast<VarDecl>(BoundDeclRefExpr->getDecl())) {
+        BoundNumVal = State->getSVal(
+            State->getLValue(BoundVarDecl, Pred->getLocationContext()));
----------------
Szelethus wrote:
> NoQ wrote:
> > Szelethus wrote:
> > > I don't see obvious test case for which `BoundNumVal` would be unknown, 
> > > am I wrong?
> > We need an `ExprInspection` method that reliably produces an `UnknownVal`, 
> > because there's no truly valid reason to produce `UnknownVal` apart from 
> > "something is unimplemented".
> For this too.
Wrong request! :-) The test case is there. Actually we need a test case for 
which 'BoundNumVal' is **not** unknown. That I still fail to produce.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D63279/new/

https://reviews.llvm.org/D63279



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

Reply via email to