diff options
author | Anna Zaks <ganna@apple.com> | 2013-04-10 22:56:33 +0000 |
---|---|---|
committer | Anna Zaks <ganna@apple.com> | 2013-04-10 22:56:33 +0000 |
commit | 07804ef87ece30ef56a06a6945d0b5c484c08766 (patch) | |
tree | a301cbfffcfa3f1127d7f19679628ef284dc51b3 /clang/lib/StaticAnalyzer/Checkers | |
parent | 3f303be63628acbe5dc5d51a64977bed3ce805f8 (diff) | |
download | bcm5719-llvm-07804ef87ece30ef56a06a6945d0b5c484c08766.tar.gz bcm5719-llvm-07804ef87ece30ef56a06a6945d0b5c484c08766.zip |
[analyzer] Address Jordan’s review of r179219
llvm-svn: 179235
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers')
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp | 2 | ||||
-rw-r--r-- | clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp index 64e017ed1ce..2a603d36e1f 100644 --- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp +++ b/clang/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 || diff --git a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp index 6163cc19c69..156e1f9c3ff 100644 --- a/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp +++ b/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp @@ -2170,7 +2170,7 @@ GetAllocationSite(ProgramStateManager& StateMgr, const ExplodedNode *N, if (FB) { const MemRegion *R = FB.getRegion(); - const VarRegion *VR = R->getAs<VarRegion>(); + const VarRegion *VR = R->getBaseRegion()->getAs<VarRegion>(); // Do not show local variables belonging to a function other than // where the error is reported. if (!VR || VR->getStackFrame() == LeakContext->getCurrentStackFrame()) |