diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-04-02 03:30:55 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-04-02 03:30:55 +0000 |
commit | 5d6d7d8184edff8d64a1596091014da37efb067f (patch) | |
tree | 997d3c54094427b566cb7e7b8e689e32c5abf293 /clang/lib | |
parent | f7e01ffa4a8251cd6b0940211297aebb6db7f517 (diff) | |
download | bcm5719-llvm-5d6d7d8184edff8d64a1596091014da37efb067f.tar.gz bcm5719-llvm-5d6d7d8184edff8d64a1596091014da37efb067f.zip |
Add null pointer check.
llvm-svn: 68281
Diffstat (limited to 'clang/lib')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 3 |
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; } |