Rename ValueState -> GRState.
Rename ValueStateManager -> GRStateManager.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@54721 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Analysis/BasicObjCFoundationChecks.cpp b/lib/Analysis/BasicObjCFoundationChecks.cpp
index 29c0b92..236cbed 100644
--- a/lib/Analysis/BasicObjCFoundationChecks.cpp
+++ b/lib/Analysis/BasicObjCFoundationChecks.cpp
@@ -18,7 +18,7 @@
 #include "clang/Analysis/PathSensitive/ExplodedGraph.h"
 #include "clang/Analysis/PathSensitive/GRSimpleAPICheck.h"
 #include "clang/Analysis/PathSensitive/GRExprEngine.h"
-#include "clang/Analysis/PathSensitive/ValueState.h"
+#include "clang/Analysis/PathSensitive/GRState.h"
 #include "clang/Analysis/PathSensitive/BugReporter.h"
 #include "clang/Analysis/PathDiagnostic.h"
 #include "clang/Analysis/LocalCheckers.h"
@@ -73,7 +73,7 @@
     SourceRange R;
   public:
     
-    Report(NilArg& Desc, ExplodedNode<ValueState>* N, 
+    Report(NilArg& Desc, ExplodedNode<GRState>* N, 
            ObjCMessageExpr* ME, unsigned Arg)
       : BugReport(Desc, N) {
       
@@ -105,12 +105,12 @@
 class VISIBILITY_HIDDEN BasicObjCFoundationChecks : public GRSimpleAPICheck {
   NilArg Desc;
   ASTContext &Ctx;
-  ValueStateManager* VMgr;
+  GRStateManager* VMgr;
   
   typedef std::vector<BugReport*> ErrorsTy;
   ErrorsTy Errors;
       
-  RVal GetRVal(const ValueState* St, Expr* E) { return VMgr->GetRVal(St, E); }
+  RVal GetRVal(const GRState* St, Expr* E) { return VMgr->GetRVal(St, E); }
       
   bool isNSString(ObjCInterfaceType* T, const char* suffix);
   bool AuditNSString(NodeTy* N, ObjCMessageExpr* ME);
@@ -121,7 +121,7 @@
   bool CheckNilArg(NodeTy* N, unsigned Arg);
 
 public:
-  BasicObjCFoundationChecks(ASTContext& ctx, ValueStateManager* vmgr) 
+  BasicObjCFoundationChecks(ASTContext& ctx, GRStateManager* vmgr) 
     : Ctx(ctx), VMgr(vmgr) {}
       
   virtual ~BasicObjCFoundationChecks() {
@@ -129,7 +129,7 @@
       delete *I;    
   }
   
-  virtual bool Audit(ExplodedNode<ValueState>* N, ValueStateManager&);
+  virtual bool Audit(ExplodedNode<GRState>* N, GRStateManager&);
   
   virtual void EmitWarnings(BugReporter& BR);
   
@@ -149,15 +149,15 @@
 
 GRSimpleAPICheck*
 clang::CreateBasicObjCFoundationChecks(ASTContext& Ctx,
-                                       ValueStateManager* VMgr) {
+                                       GRStateManager* VMgr) {
   
   return new BasicObjCFoundationChecks(Ctx, VMgr);  
 }
 
 
 
-bool BasicObjCFoundationChecks::Audit(ExplodedNode<ValueState>* N,
-                                      ValueStateManager&) {
+bool BasicObjCFoundationChecks::Audit(ExplodedNode<GRState>* N,
+                                      GRStateManager&) {
   
   ObjCMessageExpr* ME =
     cast<ObjCMessageExpr>(cast<PostStmt>(N->getLocation()).getStmt());
@@ -322,7 +322,7 @@
   std::string str;
   const char* cstr;
 public:
-  StrBugReport(BugType& D, ExplodedNode<ValueState>* N, std::string s)
+  StrBugReport(BugType& D, ExplodedNode<GRState>* N, std::string s)
     : RangedBugReport(D, N), str(s) {
       cstr = str.c_str();
     }
@@ -340,19 +340,19 @@
   //   approach makes this class more stateless.
   ASTContext& Ctx;
   IdentifierInfo* II;
-  ValueStateManager* VMgr;
+  GRStateManager* VMgr;
     
-  RVal GetRVal(const ValueState* St, Expr* E) { return VMgr->GetRVal(St, E); }
-  RVal GetRVal(const ValueState* St, LVal LV) { return VMgr->GetRVal(St, LV); }
+  RVal GetRVal(const GRState* St, Expr* E) { return VMgr->GetRVal(St, E); }
+  RVal GetRVal(const GRState* St, LVal LV) { return VMgr->GetRVal(St, LV); }
   
 public:
 
-  AuditCFNumberCreate(ASTContext& ctx, ValueStateManager* vmgr) 
+  AuditCFNumberCreate(ASTContext& ctx, GRStateManager* vmgr) 
   : Ctx(ctx), II(&Ctx.Idents.get("CFNumberCreate")), VMgr(vmgr) {}
   
   virtual ~AuditCFNumberCreate() {}
   
-  virtual bool Audit(ExplodedNode<ValueState>* N, ValueStateManager&);
+  virtual bool Audit(ExplodedNode<GRState>* N, GRStateManager&);
   
   virtual void EmitWarnings(BugReporter& BR) {
     Desc.EmitWarnings(BR);
@@ -360,7 +360,7 @@
   
 private:
   
-  void AddError(VarDecl* V, Expr* Ex, ExplodedNode<ValueState> *N,
+  void AddError(VarDecl* V, Expr* Ex, ExplodedNode<GRState> *N,
                 uint64_t SourceSize, uint64_t TargetSize, uint64_t NumberKind);  
 };
 } // end anonymous namespace
@@ -458,7 +458,7 @@
 }
 #endif
 
-bool AuditCFNumberCreate::Audit(ExplodedNode<ValueState>* N,ValueStateManager&){  
+bool AuditCFNumberCreate::Audit(ExplodedNode<GRState>* N,GRStateManager&){  
   CallExpr* CE = cast<CallExpr>(cast<PostStmt>(N->getLocation()).getStmt());
   Expr* Callee = CE->getCallee();  
   RVal CallV = GetRVal(N->getState(), Callee);  
@@ -519,7 +519,7 @@
 }
 
 void AuditCFNumberCreate::AddError(VarDecl* V, Expr* Ex,
-                                   ExplodedNode<ValueState> *N,
+                                   ExplodedNode<GRState> *N,
                                    uint64_t SourceSize, uint64_t TargetSize,
                                    uint64_t NumberKind) {
 
@@ -545,7 +545,7 @@
 
 GRSimpleAPICheck*
 clang::CreateAuditCFNumberCreate(ASTContext& Ctx,
-                                 ValueStateManager* VMgr) {
+                                 GRStateManager* VMgr) {
   
   return new AuditCFNumberCreate(Ctx, VMgr);  
 }
@@ -555,7 +555,7 @@
 
 void clang::RegisterAppleChecks(GRExprEngine& Eng) {
   ASTContext& Ctx = Eng.getContext();
-  ValueStateManager* VMgr = &Eng.getStateManager();
+  GRStateManager* VMgr = &Eng.getStateManager();
 
   Eng.AddCheck(CreateBasicObjCFoundationChecks(Ctx, VMgr),
                Stmt::ObjCMessageExprClass);