summaryrefslogtreecommitdiffstats
path: root/clang/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
commit4c9f161fd52090c3956b2eadcfc32ed225b4a75e (patch)
tree85fd004ca76e65fa09253d51a642ca1fd46bdbed /clang/lib/Analysis/BugReporter.cpp
parent82a9e445b7b47377f7811a6cdabdae20af28551d (diff)
downloadbcm5719-llvm-4c9f161fd52090c3956b2eadcfc32ed225b4a75e.tar.gz
bcm5719-llvm-4c9f161fd52090c3956b2eadcfc32ed225b4a75e.zip
Fix helper function GetNextStmt() to look for the first statement that has a
valid SourceLocation. llvm-svn: 77280
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r--clang/lib/Analysis/BugReporter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 43e1e6c8bcb..5640c3119ec 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/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;
}
OpenPOWER on IntegriCloud