aboutsummaryrefslogtreecommitdiff
path: root/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
authorAnna Zaks <ganna@apple.com>2013-04-10 22:56:33 +0000
committerAnna Zaks <ganna@apple.com>2013-04-10 22:56:33 +0000
commit8cf91f7efb4dcb238fe443915d9a30119ce5b70c (patch)
tree6cc7416f3d72d98d070ef5e6c3fe8dacbb2f3321 /lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parentee9043ba7c6934d248d4f0e2abded18e26b81df8 (diff)
[analyzer] Address Jordan’s review of r179219
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@179235 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--lib/StaticAnalyzer/Checkers/MallocChecker.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index 64e017ed1c..2a603d36e1 100644
--- a/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -1531,7 +1531,7 @@ MallocChecker::getAllocationSite(const ExplodedNode *N, SymbolRef Sym,
if (const MemRegion *MR = C.getLocationRegionIfPostStore(N)) {
SVal Val = State->getSVal(MR);
if (Val.getAsLocSymbol() == Sym) {
- const VarRegion* VR = MR->getAs<VarRegion>();
+ const VarRegion* VR = MR->getBaseRegion()->getAs<VarRegion>();
// Do not show local variables belonging to a function other than
// where the error is reported.
if (!VR ||