Change references to 'const ProgramState *' to typedef 'ProgramStateRef'.

At this point this is largely cosmetic, but it opens the door to replace
ProgramStateRef with a smart pointer that more eagerly acts in the role
of reclaiming unused ProgramState objects.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@149081 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
index f7ef531..8597520 100644
--- a/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/PthreadLockChecker.cpp
@@ -56,7 +56,7 @@
 
 void PthreadLockChecker::checkPostStmt(const CallExpr *CE,
                                        CheckerContext &C) const {
-  const ProgramState *state = C.getState();
+  ProgramStateRef state = C.getState();
   const LocationContext *LCtx = C.getLocationContext();
   StringRef FName = C.getCalleeName(CE);
   if (FName.empty())
@@ -100,7 +100,7 @@
   if (!lockR)
     return;
   
-  const ProgramState *state = C.getState();
+  ProgramStateRef state = C.getState();
   
   SVal X = state->getSVal(CE, C.getLocationContext());
   if (X.isUnknownOrUndef())
@@ -122,10 +122,10 @@
     return;
   }
 
-  const ProgramState *lockSucc = state;
+  ProgramStateRef lockSucc = state;
   if (isTryLock) {
     // Bifurcate the state, and allow a mode where the lock acquisition fails.
-    const ProgramState *lockFail;
+    ProgramStateRef lockFail;
     switch (semantics) {
     case PthreadSemantics:
       llvm::tie(lockFail, lockSucc) = state->assume(retVal);    
@@ -162,7 +162,7 @@
   if (!lockR)
     return;
   
-  const ProgramState *state = C.getState();
+  ProgramStateRef state = C.getState();
   llvm::ImmutableList<const MemRegion*> LS = state->get<LockSet>();
 
   // FIXME: Better analysis requires IPA for wrappers.