[cfe-commits] r77280 - /cfe/trunk/lib/Analysis/BugReporter.cpp

Ted Kremenek kremenek at apple.com
Mon Jul 27 17:07:15 PDT 2009


Author: kremenek
Date: Mon Jul 27 19:07:15 2009
New Revision: 77280

URL: http://llvm.org/viewvc/llvm-project?rev=77280&view=rev
Log:
Fix helper function GetNextStmt() to look for the first statement that has a
valid SourceLocation.

Modified:
    cfe/trunk/lib/Analysis/BugReporter.cpp

Modified: cfe/trunk/lib/Analysis/BugReporter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BugReporter.cpp?rev=77280&r1=77279&r2=77280&view=diff

==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Mon Jul 27 19:07:15 2009
@@ -84,6 +84,11 @@
         default:
           break;
       }
+      
+      // Some expressions don't have locations.
+      if (S->getLocStart().isInvalid())
+        continue;
+      
       return S;
     }
   





More information about the cfe-commits mailing list