commit | 4c9f161fd52090c3956b2eadcfc32ed225b4a75e | [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 | 85fd004ca76e65fa09253d51a642ca1fd46bdbed | |
parent | 82a9e445b7b47377f7811a6cdabdae20af28551d [diff] [blame] |
Fix helper function GetNextStmt() to look for the first statement that has a valid SourceLocation. llvm-svn: 77280
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 43e1e6c..5640c31 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/lib/Analysis/BugReporter.cpp
@@ -84,6 +84,11 @@ default: break; } + + // Some expressions don't have locations. + if (S->getLocStart().isInvalid()) + continue; + return S; }