diff options
author | Ted Kremenek <kremenek@apple.com> | 2008-04-18 02:24:50 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2008-04-18 02:24:50 +0000 |
commit | 89e6a9b98c4913588414edd9861eb97e76a9e07d (patch) | |
tree | a91fcf745bf86d12c5dea466f21faa2f46d4ce1f /clang/lib/Analysis/BugReporter.cpp | |
parent | a821e087de0b3c614daa524687c3b6f335033811 (diff) | |
download | bcm5719-llvm-89e6a9b98c4913588414edd9861eb97e76a9e07d.tar.gz bcm5719-llvm-89e6a9b98c4913588414edd9861eb97e76a9e07d.zip |
Added null check.
llvm-svn: 49887
Diffstat (limited to 'clang/lib/Analysis/BugReporter.cpp')
-rw-r--r-- | clang/lib/Analysis/BugReporter.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/Analysis/BugReporter.cpp b/clang/lib/Analysis/BugReporter.cpp index 294eb5faac3..743f44bb326 100644 --- a/clang/lib/Analysis/BugReporter.cpp +++ b/clang/lib/Analysis/BugReporter.cpp @@ -359,6 +359,9 @@ void BugReporter::GeneratePathDiagnostic(PathDiagnostic& PD, bool BugReporter::IsCached(ExplodedNode<ValueState>* N) { + if (!N) + return false; + // HACK: Cache the location of the error. Don't emit the same // warning for the same error type that occurs at the same program // location but along a different path. |