From: Zhongxing Xu Date: Wed, 17 Nov 2010 09:16:19 +0000 (+0000) Subject: Add skeleton for handling various cfg dtors. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4ffcb9974c6b7142c4a1483abfcb1f88b6371c45;p=clang Add skeleton for handling various cfg dtors. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119491 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Checker/PathSensitive/GRExprEngine.h b/include/clang/Checker/PathSensitive/GRExprEngine.h index 80c53107b5..f9082f4214 100644 --- a/include/clang/Checker/PathSensitive/GRExprEngine.h +++ b/include/clang/Checker/PathSensitive/GRExprEngine.h @@ -185,6 +185,13 @@ public: void ProcessImplicitDtor(const CFGImplicitDtor D, GRStmtNodeBuilder &builder); + void ProcessAutomaticObjDtor(const CFGAutomaticObjDtor D, + GRStmtNodeBuilder &builder); + void ProcessBaseDtor(const CFGBaseDtor D, GRStmtNodeBuilder &builder); + void ProcessMemberDtor(const CFGMemberDtor D, GRStmtNodeBuilder &builder); + void ProcessTemporaryDtor(const CFGTemporaryDtor D, + GRStmtNodeBuilder &builder); + /// ProcessBlockEntrance - Called by GRCoreEngine when start processing /// a CFGBlock. This method returns true if the analysis should continue /// exploring the given path, and false otherwise. diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index acb67d63dc..2dcb354f00 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -718,6 +718,38 @@ void GRExprEngine::ProcessInitializer(const CFGInitializer Init, void GRExprEngine::ProcessImplicitDtor(const CFGImplicitDtor D, GRStmtNodeBuilder &builder) { + switch (D.getDtorKind()) { + case CFGElement::AutomaticObjectDtor: + ProcessAutomaticObjDtor(cast(D), builder); + break; + case CFGElement::BaseDtor: + ProcessBaseDtor(cast(D), builder); + break; + case CFGElement::MemberDtor: + ProcessMemberDtor(cast(D), builder); + break; + case CFGElement::TemporaryDtor: + ProcessTemporaryDtor(cast(D), builder); + break; + default: + llvm_unreachable("Unexpected dtor kind."); + } +} + +void GRExprEngine::ProcessAutomaticObjDtor(const CFGAutomaticObjDtor D, + GRStmtNodeBuilder &builder) { +} + +void GRExprEngine::ProcessBaseDtor(const CFGBaseDtor D, + GRStmtNodeBuilder &builder) { +} + +void GRExprEngine::ProcessMemberDtor(const CFGMemberDtor D, + GRStmtNodeBuilder &builder) { +} + +void GRExprEngine::ProcessTemporaryDtor(const CFGTemporaryDtor D, + GRStmtNodeBuilder &builder) { } void GRExprEngine::Visit(const Stmt* S, ExplodedNode* Pred,