MTC added inline comments. Herald added subscribers: dkrupp, rnkovacs. Herald added a reviewer: george.karpenkov.
================ Comment at: lib/StaticAnalyzer/Core/LoopUnrolling.cpp:107 + equalsBoundNode("initVarName"))))), + hasRHS(integerLiteral())))), + // Incrementation should be a simple increment or decrement ---------------- Hi Peter, sorry to bother you! I have some confusion here. Whether `hasRHS(integerLiteral())` needs to added with `ignoringParenImpCasts`? The given code below does not unroll the loop because `i = 0;` has a `ImplicitCastExpr` for `0`. But if I change `unsigned i = 0` to `int i = 0`, loop unrolling will happen. So I don't know if this is intentional. ``` int func() { int sum = 0; unsigned i; for (i = 0; i < 10; ++i) { sum++; } return sum; } ``` Hope you can help me, thank you! https://reviews.llvm.org/D34260 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits