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 | 72b3452c2b35b9c4c4163c1bb05a8aa60abd5cad (patch) | |
tree | a409ed062d382e9e0d66af2ca1a04e74803a61fa /clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | |
parent | 9cb8e9fc89d347c7e1cfe19a832e45188166a2d5 (diff) | |
download | bcm5719-llvm-72b3452c2b35b9c4c4163c1bb05a8aa60abd5cad.tar.gz bcm5719-llvm-72b3452c2b35b9c4c4163c1bb05a8aa60abd5cad.zip |
Implement initial static analysis inlining support for C++ methods.
llvm-svn: 159047
Diffstat (limited to 'clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp')
-rw-r--r-- | clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp b/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp index 8996669dce0..b462e010d2a 100644 --- a/clang/lib/StaticAnalyzer/Core/ExprEngineCXX.cpp +++ b/clang/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); } |