[PATCH] D19964: [scan-build] fix warnings emiited on LLVM Analysis code base

Apelete Seketeli via llvm-commits llvm-commits at lists.llvm.org
Wed May 11 08:57:41 PDT 2016


apelete added inline comments.

================
Comment at: lib/Analysis/LoopInfo.cpp:548
@@ -547,2 +547,3 @@
     }
+    assert(Unloop && "does not contain any loop");
     if (L != Unloop && Unloop->contains(L)) {
----------------
sbaranga wrote:
> Would there be any reason to have this assert here and not at the top?
Code path that leads to "Called C++ object pointer is null" is the one inside the for() loop on line 537.
Not sure asserting outside that path would help, I'm going to verify that.


http://reviews.llvm.org/D19964





More information about the llvm-commits mailing list