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

Apelete Seketeli via llvm-commits llvm-commits at lists.llvm.org
Mon May 9 09:34:28 PDT 2016


apelete updated this revision to Diff 56590.
apelete added a comment.

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

Changes since last revision:

- lib/Analysis/LoopInfo.cpp: remove redundant asserts,

- lib/Analysis/ScalarEvolution.cpp: reword assert message.


http://reviews.llvm.org/D19964

Files:
  lib/Analysis/LoopInfo.cpp
  lib/Analysis/ScalarEvolution.cpp

Index: lib/Analysis/ScalarEvolution.cpp
===================================================================
--- lib/Analysis/ScalarEvolution.cpp
+++ lib/Analysis/ScalarEvolution.cpp
@@ -5554,6 +5554,8 @@
   if (NumExits == 1)
     return;
 
+  assert(ENT && "ExitNotTakenExtras is NULL while having more than one exit");
+
   auto &Exits = ExitNotTaken.ExtraInfo->Exits;
 
   // Handle the rare case of multiple computable exits.
Index: lib/Analysis/LoopInfo.cpp
===================================================================
--- lib/Analysis/LoopInfo.cpp
+++ lib/Analysis/LoopInfo.cpp
@@ -545,6 +545,7 @@
       assert((FoundIB || !DFS.hasPostorder(*I)) && "should have seen IB");
       FoundIB = true;
     }
+    assert(Unloop && "does not contain any loop");
     if (L != Unloop && Unloop->contains(L)) {
       // Successor is in a subloop.
       if (Subloop)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19964.56590.patch
Type: text/x-patch
Size: 873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160509/f38c7dd5/attachment.bin>


More information about the llvm-commits mailing list