]> granicus.if.org Git - clang/commitdiff
Fix helper function GetNextStmt() to look for the first statement that has a
authorTed Kremenek <kremenek@apple.com>
Tue, 28 Jul 2009 00:07:15 +0000 (00:07 +0000)
committerTed Kremenek <kremenek@apple.com>
Tue, 28 Jul 2009 00:07:15 +0000 (00:07 +0000)
valid SourceLocation.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77280 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/BugReporter.cpp

index 43e1e6c8bcbdb5411da0c96f12ba9501beb487cb..5640c3119ec5ecd43f197ad0c45fc51fb9babccb 100644 (file)
@@ -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;
     }