From: Ted Kremenek Date: Thu, 2 Apr 2009 03:30:55 +0000 (+0000) Subject: Add null pointer check. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=28de78bf9b8532b7733f49aea54b7fae651af490;p=clang Add null pointer check. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68281 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Analysis/BugReporter.cpp b/lib/Analysis/BugReporter.cpp index 5047e71804..7637a1614c 100644 --- a/lib/Analysis/BugReporter.cpp +++ b/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(parentPS) && parentPS == PDB.getParent(NS)) + if (parentPS && isa(parentPS) && + parentPS == PDB.getParent(NS)) return; }