aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/BugReporter.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-07-28 00:07:15 +0000
committerTed Kremenek <kremenek@apple.com>2009-07-28 00:07:15 +0000
commitb7c515226e91848c7197fd0b9e198fce70ba5893 (patch)
treefb0b6c3c6ad06828b2c4583183c5857d724af671 /lib/Analysis/BugReporter.cpp
parent523a8fddefee7836d6317f6dc265acb4ee84a0d4 (diff)
Fix helper function GetNextStmt() to look for the first statement that has a
valid SourceLocation. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77280 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/BugReporter.cpp')
-rw-r--r--lib/Analysis/BugReporter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp
index 43e1e6c8bc..5640c3119e 100644
--- a/lib/Analysis/BugReporter.cpp
+++ b/lib/Analysis/BugReporter.cpp
@@ -84,6 +84,11 @@ static const Stmt* GetNextStmt(const ExplodedNode<GRState>* N) {
default:
break;
}
+
+ // Some expressions don't have locations.
+ if (S->getLocStart().isInvalid())
+ continue;
+
return S;
}