diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-20 06:53:12 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-20 06:53:12 +0000 |
commit | b13453bd8a91f331d0910ca95ad52aa41b52f648 (patch) | |
tree | b3c18bec8733fd39ddff70bc45f5cb9c16ca29bc /lib/Checker/GRExprEngine.cpp | |
parent | 44aa1f397855f130e88e62ffc1029f7f83bb5d2e (diff) |
Handle CFGAutomaticObjDtor.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119897 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Checker/GRExprEngine.cpp')
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index ddd3d50fe5..4483cdb76c 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -718,6 +718,8 @@ void GRExprEngine::ProcessInitializer(const CFGInitializer Init, void GRExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D, GRStmtNodeBuilder &builder) { + Builder = &builder; + switch (D.getDtorKind()) { case CFGElement::AutomaticObjectDtor: ProcessAutomaticObjDtor(cast<CFGAutomaticObjDtor>(D), builder); @@ -738,6 +740,17 @@ void GRExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D, void GRExprEngine::ProcessAutomaticObjDtor(const CFGAutomaticObjDtor D, GRStmtNodeBuilder &builder) { + ExplodedNode *Pred = builder.getBasePredecessor(); + const GRState *state = Pred->getState(); + const VarDecl *VD = D.getVarDecl(); + const CXXRecordDecl *CD = VD->getType()->getAsCXXRecordDecl(); + const CXXDestructorDecl *DD = CD->getDestructor(); + + Loc Dest = state->getLValue(VD, Pred->getLocationContext()); + + ExplodedNodeSet Dst; + VisitCXXDestructor(DD, cast<loc::MemRegionVal>(Dest).getRegion(), + D.getTriggerStmt(), Pred, Dst); } void GRExprEngine::ProcessBaseDtor(const CFGBaseDtor D, |