aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2011-09-28 21:20:00 +0000
committerTed Kremenek <kremenek@apple.com>2011-09-28 21:20:00 +0000
commitf79d90e570c514c1ac280ab45b0c6b3d660af7a0 (patch)
treec8a1dc5ec5e9b9e8929c499bc2b9c0f55b644865 /lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
parentf9d9527a0f52937a1a99da465b42c3cfe080bc6a (diff)
Check for empty predecessors for walking them.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140725 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/BugReporterVisitors.cpp')
-rw-r--r--lib/StaticAnalyzer/Core/BugReporterVisitors.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
index 0a38e79c3b..3afbd87213 100644
--- a/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
+++ b/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp
@@ -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)