summaryrefslogtreecommitdiffstats
path: root/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
diff options
context:
space:
mode:
authorGeorge Karpenkov <ekarpenkov@apple.com>2018-06-27 01:51:55 +0000
committerGeorge Karpenkov <ekarpenkov@apple.com>2018-06-27 01:51:55 +0000
commitdd18b11b8e0ad9e8ff7e2d1bc3ebdc3c690e97ed (patch)
tree0de787feaa8c30a40f5c5e1efef6432558054cb2 /clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
parentfb5e8d96faa74849f9f2d3b3084c751a2a592ea2 (diff)
downloadbcm5719-llvm-dd18b11b8e0ad9e8ff7e2d1bc3ebdc3c690e97ed.tar.gz
bcm5719-llvm-dd18b11b8e0ad9e8ff7e2d1bc3ebdc3c690e97ed.zip
[analyzer] [NFC] A convenient getter for getting a current stack frame
Differential Revision: https://reviews.llvm.org/D44756 llvm-svn: 335701
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp')
-rw-r--r--clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
index b008bcdf4ee..1fa2e3b53e5 100644
--- a/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp
@@ -2258,7 +2258,7 @@ MallocChecker::getAllocationSite(const ExplodedNode *N, SymbolRef Sym,
// Do not show local variables belonging to a function other than
// where the error is reported.
if (!VR ||
- (VR->getStackFrame() == LeakContext->getCurrentStackFrame()))
+ (VR->getStackFrame() == LeakContext->getStackFrame()))
ReferenceRegion = MR;
}
}
@@ -2919,7 +2919,7 @@ std::shared_ptr<PathDiagnosticPiece> MallocChecker::MallocBugVisitor::VisitNode(
// reference counting operations within it (see the code above),
// and if so, we'd conclude that it likely is a reference counting
// pointer destructor.
- ReleaseDestructorLC = LC->getCurrentStackFrame();
+ ReleaseDestructorLC = LC->getStackFrame();
// It is unlikely that releasing memory is delegated to a destructor
// inside a destructor of a shared pointer, because it's fairly hard
// to pass the information that the pointer indeed needs to be
OpenPOWER on IntegriCloud