Adjust method calls to reflect name changes in
ImmutableSet/ImmtuableMap/ImmutableList APIs.

Along the way, clean up some method names in
the static analyzer so that they are more
descriptive and/or start with lowercase letters.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@120071 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Checker/CFRefCount.cpp b/lib/Checker/CFRefCount.cpp
index 8d1f4ba..80cbfc5 100644
--- a/lib/Checker/CFRefCount.cpp
+++ b/lib/Checker/CFRefCount.cpp
@@ -762,7 +762,7 @@
   }
 
   void addPanicSummary(const char* Cls, ...) {
-    RetainSummary* Summ = getPersistentSummary(AF.GetEmptyMap(),
+    RetainSummary* Summ = getPersistentSummary(AF.getEmptyMap(),
                                                RetEffect::MakeNoRet(),
                                                DoNothing,  DoNothing, true);
     va_list argp;
@@ -776,12 +776,12 @@
   RetainSummaryManager(ASTContext& ctx, bool gcenabled)
    : Ctx(ctx),
      CFDictionaryCreateII(&ctx.Idents.get("CFDictionaryCreate")),
-     GCEnabled(gcenabled), AF(BPAlloc), ScratchArgs(AF.GetEmptyMap()),
+     GCEnabled(gcenabled), AF(BPAlloc), ScratchArgs(AF.getEmptyMap()),
      ObjCAllocRetE(gcenabled ? RetEffect::MakeGCNotOwned()
                              : RetEffect::MakeOwned(RetEffect::ObjC, true)),
      ObjCInitRetE(gcenabled ? RetEffect::MakeGCNotOwned()
                             : RetEffect::MakeOwnedWhenTrackedReceiver()),
-     DefaultSummary(AF.GetEmptyMap() /* per-argument effects (none) */,
+     DefaultSummary(AF.getEmptyMap() /* per-argument effects (none) */,
                     RetEffect::MakeNoRet() /* return effect */,
                     MayEscape, /* default argument effect */
                     DoNothing /* receiver effect */),
@@ -881,7 +881,7 @@
 
 ArgEffects RetainSummaryManager::getArgEffects() {
   ArgEffects AE = ScratchArgs;
-  ScratchArgs = AF.GetEmptyMap();
+  ScratchArgs = AF.getEmptyMap();
   return AE;
 }
 
@@ -967,13 +967,13 @@
       // FIXES: <rdar://problem/6326900>
       // This should be addressed using a API table.  This strcmp is also
       // a little gross, but there is no need to super optimize here.
-      ScratchArgs = AF.Add(ScratchArgs, 1, DecRef);
+      ScratchArgs = AF.add(ScratchArgs, 1, DecRef);
       S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
     } else if (FName == "IOServiceAddNotification" ||
                FName == "IOServiceAddMatchingNotification") {
       // Part of <rdar://problem/6961230>. (IOKit)
       // This should be addressed using a API table.
-      ScratchArgs = AF.Add(ScratchArgs, 2, DecRef);
+      ScratchArgs = AF.add(ScratchArgs, 2, DecRef);
       S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
     } else if (FName == "CVPixelBufferCreateWithBytes") {
       // FIXES: <rdar://problem/7283567>
@@ -982,14 +982,14 @@
       // a callback and doing full IPA to make sure this is done correctly.
       // FIXME: This function has an out parameter that returns an
       // allocated object.
-      ScratchArgs = AF.Add(ScratchArgs, 7, StopTracking);
+      ScratchArgs = AF.add(ScratchArgs, 7, StopTracking);
       S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
     } else if (FName == "CGBitmapContextCreateWithData") {
       // FIXES: <rdar://problem/7358899>
       // Eventually this can be improved by recognizing that 'releaseInfo'
       // passed to CGBitmapContextCreateWithData is released via
       // a callback and doing full IPA to make sure this is done correctly.
-      ScratchArgs = AF.Add(ScratchArgs, 8, StopTracking);
+      ScratchArgs = AF.add(ScratchArgs, 8, StopTracking);
       S = getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF, true),
                                DoNothing, DoNothing);
     } else if (FName == "CVPixelBufferCreateWithPlanarBytes") {
@@ -998,7 +998,7 @@
       // buffer passed to CVPixelBufferCreateWithPlanarBytes is released
       // via a callback and doing full IPA to make sure this is done
       // correctly.
-      ScratchArgs = AF.Add(ScratchArgs, 12, StopTracking);
+      ScratchArgs = AF.add(ScratchArgs, 12, StopTracking);
       S = getPersistentSummary(RetEffect::MakeNoRet(), DoNothing, DoNothing);
     }
 
@@ -1129,19 +1129,19 @@
 
   switch (func) {
     case cfretain: {
-      ScratchArgs = AF.Add(ScratchArgs, 0, IncRef);
+      ScratchArgs = AF.add(ScratchArgs, 0, IncRef);
       return getPersistentSummary(RetEffect::MakeAlias(0),
                                   DoNothing, DoNothing);
     }
 
     case cfrelease: {
-      ScratchArgs = AF.Add(ScratchArgs, 0, DecRef);
+      ScratchArgs = AF.add(ScratchArgs, 0, DecRef);
       return getPersistentSummary(RetEffect::MakeNoRet(),
                                   DoNothing, DoNothing);
     }
 
     case cfmakecollectable: {
-      ScratchArgs = AF.Add(ScratchArgs, 0, MakeCollectable);
+      ScratchArgs = AF.add(ScratchArgs, 0, MakeCollectable);
       return getPersistentSummary(RetEffect::MakeAlias(0),DoNothing, DoNothing);
     }
 
@@ -1156,8 +1156,8 @@
   assert (ScratchArgs.isEmpty());
 
   if (FD->getIdentifier() == CFDictionaryCreateII) {
-    ScratchArgs = AF.Add(ScratchArgs, 1, DoNothingByRef);
-    ScratchArgs = AF.Add(ScratchArgs, 2, DoNothingByRef);
+    ScratchArgs = AF.add(ScratchArgs, 1, DoNothingByRef);
+    ScratchArgs = AF.add(ScratchArgs, 2, DoNothingByRef);
   }
 
   return getPersistentSummary(RetEffect::MakeOwned(RetEffect::CF, true));
@@ -1263,7 +1263,7 @@
       if (ParmVarDecl *PD = *I) {
         QualType Ty = Ctx.getCanonicalType(PD->getType());
         if (Ty.getLocalUnqualifiedType() == Ctx.VoidPtrTy)
-          ScratchArgs = AF.Add(ScratchArgs, i, StopTracking);
+          ScratchArgs = AF.add(ScratchArgs, i, StopTracking);
       }
   }
 
@@ -1432,7 +1432,7 @@
                 getPersistentSummary(RetEffect::MakeNotOwned(RetEffect::ObjC)));
 
   // Create the [NSAutoreleasePool addObject:] summary.
-  ScratchArgs = AF.Add(ScratchArgs, 0, Autorelease);
+  ScratchArgs = AF.add(ScratchArgs, 0, Autorelease);
   addClassMethSummary("NSAutoreleasePool", "addObject",
                       getPersistentSummary(RetEffect::MakeNoRet(),
                                            DoNothing, Autorelease));
@@ -1627,10 +1627,10 @@
 
   if (cnts) {
     const unsigned *cnt = (*cnts).lookup(sym);
-    newCnts = F.Add(*cnts, sym, cnt ? *cnt  + 1 : 1);
+    newCnts = F.add(*cnts, sym, cnt ? *cnt  + 1 : 1);
   }
   else
-    newCnts = F.Add(F.GetEmptyMap(), sym, 1);
+    newCnts = F.add(F.getEmptyMap(), sym, 1);
 
   return state->set<AutoreleasePoolContents>(pool, newCnts);
 }
@@ -3016,7 +3016,7 @@
     // If this is the case, stop tracking the symbol.
     if (state->getSymVal(I.getKey())) {
       changed = true;
-      B = RefBFactory.Remove(B, I.getKey());
+      B = RefBFactory.remove(B, I.getKey());
     }
   }
 
@@ -3345,7 +3345,7 @@
   RefBindings::Factory& F = state->get_context<RefBindings>();
 
   for (SymbolReaper::dead_iterator I = SymReaper.dead_begin(),
-       E = SymReaper.dead_end(); I!=E; ++I) B = F.Remove(B, *I);
+       E = SymReaper.dead_end(); I!=E; ++I) B = F.remove(B, *I);
 
   state = state->set<RefBindings>(B);
   Builder.MakeNode(Dst, S, Pred, state);