diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-16 07:52:17 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-11-16 07:52:17 +0000 |
commit | 9dc84c9455df2a77195147d0210c915dc1775a88 (patch) | |
tree | 17f323502c631bd4a851a4ad8f5470d170c3f42a /include/clang | |
parent | a437ad3ec5b407ede394d74e6f9f463fa3657dbe (diff) |
Handle member initializer in C++ ctor.
- Add a new Kind of ProgramPoint: PostInitializer.
- Still use GRStmtNodeBuilder. But special handling PostInitializer in
GRStmtNodeBuilder::GenerateAutoTransition().
- Someday we should clean up the interface of GRStmtNodeBuilder.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang')
-rw-r--r-- | include/clang/AST/Expr.h | 2 | ||||
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 12 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/GRCoreEngine.h | 3 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/GRExprEngine.h | 2 |
4 files changed, 15 insertions, 4 deletions
diff --git a/include/clang/AST/Expr.h b/include/clang/AST/Expr.h index eae3e69476..89295e4c7e 100644 --- a/include/clang/AST/Expr.h +++ b/include/clang/AST/Expr.h @@ -3468,7 +3468,7 @@ public: BlockDeclRefExpr(ValueDecl *d, QualType t, SourceLocation l, bool ByRef, bool constAdded = false, Stmt *copyConstructorVal = 0) - : Expr(BlockDeclRefExprClass, t, (!t.isNull() && t->isDependentType()),false), + : Expr(BlockDeclRefExprClass, t, (!t.isNull() && t->isDependentType()),false), D(d), Loc(l), IsByRef(ByRef), ConstQualAdded(constAdded), CopyConstructorVal(copyConstructorVal) {} diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index c29fd02c0a..a77ca39b15 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -44,6 +44,7 @@ public: PostPurgeDeadSymbolsKind, PostStmtCustomKind, PostLValueKind, + PostInitializerKind, CallEnterKind, CallExitKind, MinPostStmtKind = PostStmtKind, @@ -304,6 +305,17 @@ public: } }; +class PostInitializer : public ProgramPoint { +public: + PostInitializer(const CXXBaseOrMemberInitializer *I, + const LocationContext *L) + : ProgramPoint(I, PostInitializerKind, L) {} + + static bool classof(const ProgramPoint *Location) { + return Location->getKind() == PostInitializerKind; + } +}; + class CallEnter : public StmtPoint { public: // L is caller's location context. AC is callee's AnalysisContext. diff --git a/include/clang/Checker/PathSensitive/GRCoreEngine.h b/include/clang/Checker/PathSensitive/GRCoreEngine.h index 411f29d802..58c148f66d 100644 --- a/include/clang/Checker/PathSensitive/GRCoreEngine.h +++ b/include/clang/Checker/PathSensitive/GRCoreEngine.h @@ -72,8 +72,7 @@ private: void HandleBlockEdge(const BlockEdge& E, ExplodedNode* Pred); void HandleBlockEntrance(const BlockEntrance& E, ExplodedNode* Pred); void HandleBlockExit(const CFGBlock* B, ExplodedNode* Pred); - void HandlePostStmt(const PostStmt& S, const CFGBlock* B, - unsigned StmtIdx, ExplodedNode *Pred); + void HandlePostStmt(const CFGBlock* B, unsigned StmtIdx, ExplodedNode *Pred); void HandleBranch(const Stmt* Cond, const Stmt* Term, const CFGBlock* B, ExplodedNode* Pred); diff --git a/include/clang/Checker/PathSensitive/GRExprEngine.h b/include/clang/Checker/PathSensitive/GRExprEngine.h index ab6a74dc34..80c53107b5 100644 --- a/include/clang/Checker/PathSensitive/GRExprEngine.h +++ b/include/clang/Checker/PathSensitive/GRExprEngine.h @@ -438,7 +438,7 @@ public: ExplodedNodeSet &Dst); /// Synthesize CXXThisRegion. - const CXXThisRegion *getCXXThisRegion(const CXXMethodDecl *MD, + const CXXThisRegion *getCXXThisRegion(const CXXRecordDecl *RD, const StackFrameContext *SFC); /// Evaluate arguments with a work list algorithm. |