diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-23 06:16:52 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-08-23 06:16:52 +0000 |
commit | a8eaf008e92759142982f7b40720b2b2674bd663 (patch) | |
tree | fdbc6414d49262a6e3dbf2ecd383c3e1b311f9dc /lib/StaticAnalyzer/Core/SymbolManager.cpp | |
parent | 925d58c20aba52ef3901db7402a2067266ed12ea (diff) |
Fix undefined behavior: member function calls where 'this' is a null pointer.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162430 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/SymbolManager.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/SymbolManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/StaticAnalyzer/Core/SymbolManager.cpp b/lib/StaticAnalyzer/Core/SymbolManager.cpp index 440ddfffcd..c21df4c318 100644 --- a/lib/StaticAnalyzer/Core/SymbolManager.cpp +++ b/lib/StaticAnalyzer/Core/SymbolManager.cpp @@ -520,7 +520,7 @@ bool SymbolReaper::isLive(const VarRegion *VR, bool includeStoreBindings) const{ const StackFrameContext *CurrentContext = LCtx->getCurrentStackFrame(); if (VarContext == CurrentContext) { - // If no statemetnt is provided, everything is live. + // If no statement is provided, everything is live. if (!Loc) return true; @@ -548,7 +548,7 @@ bool SymbolReaper::isLive(const VarRegion *VR, bool includeStoreBindings) const{ return false; } - return VarContext->isParentOf(CurrentContext); + return !VarContext || VarContext->isParentOf(CurrentContext); } SymbolVisitor::~SymbolVisitor() {} |