summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-04-02 03:30:55 +0000
committerTed Kremenek <kremenek@apple.com>2009-04-02 03:30:55 +0000
commit5d6d7d8184edff8d64a1596091014da37efb067f (patch)
tree997d3c54094427b566cb7e7b8e689e32c5abf293
parentf7e01ffa4a8251cd6b0940211297aebb6db7f517 (diff)
downloadbcm5719-llvm-5d6d7d8184edff8d64a1596091014da37efb067f.tar.gz
bcm5719-llvm-5d6d7d8184edff8d64a1596091014da37efb067f.zip
Add null pointer check.
llvm-svn: 68281
-rw-r--r--clang/lib/Analysis/BugReporter.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp
index 5047e718049..7637a1614c2 100644
--- a/clang/lib/Analysis/BugReporter.cpp
+++ b/clang/lib/Analysis/BugReporter.cpp
@@ -789,7 +789,8 @@ static void GenExtAddEdge(PathDiagnostic& PD,
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;
}
OpenPOWER on IntegriCloud