diff options
author | Ted Kremenek <kremenek@apple.com> | 2012-06-22 23:55:50 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2012-06-22 23:55:50 +0000 |
commit | 10f77ad7fc5e5cf3f37a9b14ff5843468b8b84d2 (patch) | |
tree | 70d4950719bc055639f30d99828c8aee603888c1 /lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | |
parent | c1fb54265614845ee1e09856af6e46961c6209f4 (diff) |
Implement initial static analysis inlining support for C++ methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/StaticAnalyzer/Core/ExprEngineCXX.cpp')
-rw-r--r-- | lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index 8996669dce..b462e010d2 100644 --- a/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp @@ -21,19 +21,6 @@ using namespace clang; using namespace ento; -const CXXThisRegion *ExprEngine::getCXXThisRegion(const CXXRecordDecl *D, - const StackFrameContext *SFC) { - const Type *T = D->getTypeForDecl(); - QualType PT = getContext().getPointerType(QualType(T, 0)); - return svalBuilder.getRegionManager().getCXXThisRegion(PT, SFC); -} - -const CXXThisRegion *ExprEngine::getCXXThisRegion(const CXXMethodDecl *decl, - const StackFrameContext *frameCtx) { - return svalBuilder.getRegionManager(). - getCXXThisRegion(decl->getThisType(getContext()), frameCtx); -} - void ExprEngine::CreateCXXTemporaryObject(const MaterializeTemporaryExpr *ME, ExplodedNode *Pred, ExplodedNodeSet &Dst) { @@ -161,12 +148,10 @@ void ExprEngine::VisitCXXDestructor(const CXXDestructorDecl *DD, getStackFrame(Pred->getLocationContext(), S, currentBuilderContext->getBlock(), currentStmtIdx); - const CXXThisRegion *ThisR = getCXXThisRegion(DD->getParent(), SFC); - CallEnter PP(S, SFC, Pred->getLocationContext()); - ProgramStateRef state = Pred->getState(); - state = state->bindLoc(loc::MemRegionVal(ThisR), loc::MemRegionVal(Dest)); + state = state->bindLoc(svalBuilder.getCXXThis(DD->getParent(), SFC), + loc::MemRegionVal(Dest)); Bldr.generateNode(PP, Pred, state); } |