commit | b7c515226e91848c7197fd0b9e198fce70ba5893 | [log] [tgz] |
---|---|---|
author | Ted Kremenek <kremenek@apple.com> | Tue Jul 28 00:07:15 2009 +0000 |
committer | Ted Kremenek <kremenek@apple.com> | Tue Jul 28 00:07:15 2009 +0000 |
tree | fb0b6c3c6ad06828b2c4583183c5857d724af671 | |
parent | 523a8fddefee7836d6317f6dc265acb4ee84a0d4 [diff] [blame] |
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
diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 43e1e6c..5640c31 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/lib/Analysis/BugReporter.cpp
@@ -84,6 +84,11 @@ default: break; } + + // Some expressions don't have locations. + if (S->getLocStart().isInvalid()) + continue; + return S; }