AnalysisContext is not const.

llvm-svn: 109210
diff --git a/clang/include/clang/Analysis/ProgramPoint.h b/clang/include/clang/Analysis/ProgramPoint.h
index 08e08f2..c71c305 100644
--- a/clang/include/clang/Analysis/ProgramPoint.h
+++ b/clang/include/clang/Analysis/ProgramPoint.h
@@ -323,8 +323,9 @@
     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/clang/include/clang/Checker/PathSensitive/GRCoreEngine.h b/clang/include/clang/Checker/PathSensitive/GRCoreEngine.h
index c69ef70..90f6979 100644
--- a/clang/include/clang/Checker/PathSensitive/GRCoreEngine.h
+++ b/clang/include/clang/Checker/PathSensitive/GRCoreEngine.h
@@ -464,7 +464,7 @@
   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 @@
 
 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 @@
 
   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/clang/lib/Checker/GRExprEngine.cpp b/clang/lib/Checker/GRExprEngine.cpp
index 364f06d..fe45b7f 100644
--- a/clang/lib/Checker/GRExprEngine.cpp
+++ b/clang/lib/Checker/GRExprEngine.cpp
@@ -1445,7 +1445,7 @@
 
 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(),