[analyzer] Address Jordan's nitpicks as per code review of r170625.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@170832 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
index 9fbf976..889b236 100644
--- a/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/CStringChecker.cpp
@@ -817,7 +817,7 @@
     // Invalidate this region.
     const LocationContext *LCtx = C.getPredecessor()->getLocationContext();
     return state->invalidateRegions(R, E, C.blockCount(), LCtx,
-                                    /*ResultsInPointerEscape*/ false);
+                                    /*CausedByPointerEscape*/ false);
   }
 
   // If we have a non-region value by chance, just remove the binding.
diff --git a/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp b/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp
index fa2c4ff..a6e0931 100644
--- a/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp
+++ b/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp
@@ -257,7 +257,7 @@
   /// \brief Called when pointers escape.
   ///
   /// This notifies the checkers about pointer escape, which occurs whenever
-  /// the analzyer cannot track the symbol any more. For example, as a
+  /// the analyzer cannot track the symbol any more. For example, as a
   /// result of assigning a pointer into a global or when it's passed to a 
   /// function call the analyzer cannot model.
   /// 
diff --git a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
index b57c6e2..150b4be 100644
--- a/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
+++ b/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp
@@ -3179,7 +3179,7 @@
 
     // Invalidate the argument region.
     state = state->invalidateRegions(ArgRegion, CE, C.blockCount(), LCtx,
-                                     /*ResultsInPointerEscape*/ false);
+                                     /*CausedByPointerEscape*/ false);
 
     // Restore the refcount status of the argument.
     if (Binding)
diff --git a/lib/StaticAnalyzer/Core/CallEvent.cpp b/lib/StaticAnalyzer/Core/CallEvent.cpp
index 3709fd9..a75efc6 100644
--- a/lib/StaticAnalyzer/Core/CallEvent.cpp
+++ b/lib/StaticAnalyzer/Core/CallEvent.cpp
@@ -199,7 +199,7 @@
   //  global variables.
   return Result->invalidateRegions(RegionsToInvalidate, getOriginExpr(),
                                    BlockCount, getLocationContext(),
-                                   /*ResultsInPointerEscape*/ true,
+                                   /*CausedByPointerEscape*/ true,
                                    /*Symbols=*/0, this);
 }
 
diff --git a/lib/StaticAnalyzer/Core/ExprEngine.cpp b/lib/StaticAnalyzer/Core/ExprEngine.cpp
index 6b33940..2e2f00d 100644
--- a/lib/StaticAnalyzer/Core/ExprEngine.cpp
+++ b/lib/StaticAnalyzer/Core/ExprEngine.cpp
@@ -1602,14 +1602,13 @@
 };
 } // end anonymous namespace
 
-/// Call PointerEscape callback when a value escapes as a result of bind.
-/// A value escapes in three possible cases:
-/// (1) we are binding to something that is not a memory region.
-/// (2) we are binding to a memregion that does not have stack storage
-/// (3) we are binding to a memregion with stack storage that the store
-///     does not understand.
+// A value escapes in three possible cases:
+// (1) We are binding to something that is not a memory region.
+// (2) We are binding to a MemrRegion that does not have stack storage.
+// (3) We are binding to a MemRegion with stack storage that the store
+//     does not understand.
 ProgramStateRef ExprEngine::processPointerEscapedOnBind(ProgramStateRef State,
-                                                       SVal Loc, SVal Val) {
+                                                        SVal Loc, SVal Val) {
   // Are we storing to something that causes the value to "escape"?
   bool escapes = true;
 
@@ -1647,8 +1646,6 @@
   return State;
 }
 
-/// Call PointerEscape callback when a value escapes as a result of
-/// region invalidation.
 ProgramStateRef 
 ExprEngine::processPointerEscapedOnInvalidateRegions(ProgramStateRef State,
     const InvalidatedSymbols *Invalidated,
diff --git a/lib/StaticAnalyzer/Core/ProgramState.cpp b/lib/StaticAnalyzer/Core/ProgramState.cpp
index 1566277..73350d8 100644
--- a/lib/StaticAnalyzer/Core/ProgramState.cpp
+++ b/lib/StaticAnalyzer/Core/ProgramState.cpp
@@ -144,16 +144,16 @@
 ProgramState::invalidateRegions(ArrayRef<const MemRegion *> Regions,
                                 const Expr *E, unsigned Count,
                                 const LocationContext *LCtx,
-                                bool ResultsInPointerEscape,
+                                bool CausedByPointerEscape,
                                 InvalidatedSymbols *IS,
                                 const CallEvent *Call) const {
   if (!IS) {
     InvalidatedSymbols invalidated;
     return invalidateRegionsImpl(Regions, E, Count, LCtx,
-                                 ResultsInPointerEscape,
+                                 CausedByPointerEscape,
                                  invalidated, Call);
   }
-  return invalidateRegionsImpl(Regions, E, Count, LCtx, ResultsInPointerEscape,
+  return invalidateRegionsImpl(Regions, E, Count, LCtx, CausedByPointerEscape,
                                *IS, Call);
 }
 
@@ -161,7 +161,7 @@
 ProgramState::invalidateRegionsImpl(ArrayRef<const MemRegion *> Regions,
                                     const Expr *E, unsigned Count,
                                     const LocationContext *LCtx,
-                                    bool ResultsInPointerEscape,
+                                    bool CausedByPointerEscape,
                                     InvalidatedSymbols &IS,
                                     const CallEvent *Call) const {
   ProgramStateManager &Mgr = getStateManager();
@@ -175,7 +175,7 @@
 
     ProgramStateRef newState = makeWithStore(newStore);
 
-    if (ResultsInPointerEscape)
+    if (CausedByPointerEscape)
       newState = Eng->processPointerEscapedOnInvalidateRegions(newState,
                                                &IS, Regions, Invalidated, Call);