From b7c515226e91848c7197fd0b9e198fce70ba5893 Mon Sep 17 00:00:00 2001 From: Ted Kremenek Date: Tue, 28 Jul 2009 00:07:15 +0000 Subject: [PATCH] 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 --- lib/Analysis/BugReporter.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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* N) { default: break; } + + // Some expressions don't have locations. + if (S->getLocStart().isInvalid()) + continue; + return S; } -- 2.40.0