]> granicus.if.org Git - clang/commitdiff
Check for empty predecessors for walking them.
authorTed Kremenek <kremenek@apple.com>
Wed, 28 Sep 2011 21:20:00 +0000 (21:20 +0000)
committerTed Kremenek <kremenek@apple.com>
Wed, 28 Sep 2011 21:20:00 +0000 (21:20 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140725 91177308-0d34-0410-b5e6-96231b3b80d8

lib/StaticAnalyzer/Core/BugReporterVisitors.cpp

index 0a38e79c3b29fbee6fafd018b8409e95f08535ba..3afbd872138194b9f6cc6093a8796bf148b841fa 100644 (file)
@@ -315,7 +315,7 @@ bugreporter::getTrackNullOrUndefValueVisitor(const ExplodedNode *N,
       if (ps->getStmt() == S)
         break;
     }
-    N = *N->pred_begin();
+    N = N->pred_empty() ? 0 : *N->pred_begin();
   }
 
   if (!N)