diff options
author | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-07-23 02:49:07 +0000 |
---|---|---|
committer | Zhongxing Xu <xuzhongxing@gmail.com> | 2010-07-23 02:49:07 +0000 |
commit | b73279120d67817156717a1625207ee1bbf41477 (patch) | |
tree | cc9cc91a5db94cfb8ab525248e2f0405e9cc4e6c | |
parent | ad23ebe22b7e52e3875981eeb46a1fd61a7554fb (diff) |
AnalysisContext is not const.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@109210 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Analysis/ProgramPoint.h | 5 | ||||
-rw-r--r-- | include/clang/Checker/PathSensitive/GRCoreEngine.h | 6 | ||||
-rw-r--r-- | lib/Checker/GRExprEngine.cpp | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/include/clang/Analysis/ProgramPoint.h b/include/clang/Analysis/ProgramPoint.h index 08e08f2ad0..c71c3059ff 100644 --- a/include/clang/Analysis/ProgramPoint.h +++ b/include/clang/Analysis/ProgramPoint.h @@ -323,8 +323,9 @@ public: return static_cast<const Stmt *>(getData1()); } - const AnalysisContext *getCalleeContext() const { - return static_cast<const AnalysisContext *>(getData2()); + AnalysisContext *getCalleeContext() const { + return const_cast<AnalysisContext *>( + static_cast<const AnalysisContext *>(getData2())); } static bool classof(const ProgramPoint *Location) { diff --git a/include/clang/Checker/PathSensitive/GRCoreEngine.h b/include/clang/Checker/PathSensitive/GRCoreEngine.h index c69ef70bef..90f6979b53 100644 --- a/include/clang/Checker/PathSensitive/GRCoreEngine.h +++ b/include/clang/Checker/PathSensitive/GRCoreEngine.h @@ -464,7 +464,7 @@ class GRCallEnterNodeBuilder { const Stmt *CE; // The AnalysisContext of the callee. - const AnalysisContext *CalleeCtx; + AnalysisContext *CalleeCtx; // The parent block of the CallExpr. const CFGBlock *Block; @@ -474,7 +474,7 @@ class GRCallEnterNodeBuilder { public: GRCallEnterNodeBuilder(GRCoreEngine &eng, const ExplodedNode *pred, - const Stmt *s, const AnalysisContext *callee, + const Stmt *s, AnalysisContext *callee, const CFGBlock *blk, unsigned idx) : Eng(eng), Pred(pred), CE(s), CalleeCtx(callee), Block(blk), Index(idx) {} @@ -486,7 +486,7 @@ public: const Stmt *getCallExpr() const { return CE; } - const AnalysisContext *getCalleeContext() const { return CalleeCtx; } + AnalysisContext *getCalleeContext() const { return CalleeCtx; } const CFGBlock *getBlock() const { return Block; } diff --git a/lib/Checker/GRExprEngine.cpp b/lib/Checker/GRExprEngine.cpp index 364f06d460..fe45b7f013 100644 --- a/lib/Checker/GRExprEngine.cpp +++ b/lib/Checker/GRExprEngine.cpp @@ -1445,7 +1445,7 @@ void GRExprEngine::ProcessSwitch(GRSwitchNodeBuilder& builder) { void GRExprEngine::ProcessCallEnter(GRCallEnterNodeBuilder &B) { const StackFrameContext *LocCtx - = AMgr.getStackFrame(const_cast<AnalysisContext *>(B.getCalleeContext()), + = AMgr.getStackFrame(B.getCalleeContext(), B.getLocationContext(), B.getCallExpr(), B.getBlock(), |