[cfe-commits] r68281 - /cfe/trunk/lib/Analysis/BugReporter.cpp
Ted Kremenek
kremenek at apple.com
Wed Apr 1 20:30:55 PDT 2009
Author: kremenek
Date: Wed Apr 1 22:30:55 2009
New Revision: 68281
URL: http://llvm.org/viewvc/llvm-project?rev=68281&view=rev
Log:
Add null pointer check.
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=68281&r1=68280&r2=68281&view=diff
==============================================================================
--- cfe/trunk/lib/Analysis/BugReporter.cpp (original)
+++ cfe/trunk/lib/Analysis/BugReporter.cpp Wed Apr 1 22:30:55 2009
@@ -789,7 +789,8 @@
if (const Stmt *PS = PrevLoc.asStmt())
if (const Stmt *NS = NewLoc.asStmt()) {
const Stmt *parentPS = PDB.getParent(PS);
- if (isa<CompoundStmt>(parentPS) && parentPS == PDB.getParent(NS))
+ if (parentPS && isa<CompoundStmt>(parentPS) &&
+ parentPS == PDB.getParent(NS))
return;
}
More information about the cfe-commits
mailing list