Rename DeclContext::insert to DeclContext::makeDeclVisibleInContext and document both it and DeclContext::addDecl properly

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62581 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/DeclBase.cpp b/lib/AST/DeclBase.cpp
index 5526be0..5ad7c26 100644
--- a/lib/AST/DeclBase.cpp
+++ b/lib/AST/DeclBase.cpp
@@ -529,7 +529,7 @@
   }
 
   if (NamedDecl *ND = dyn_cast<NamedDecl>(D))
-    ND->getDeclContext()->insert(ND);
+    ND->getDeclContext()->makeDeclVisibleInContext(ND);
 }
 
 /// buildLookup - Build the lookup data structure with all of the
@@ -541,7 +541,7 @@
          D != DEnd; ++D) {
       // Insert this declaration into the lookup structure
       if (NamedDecl *ND = dyn_cast<NamedDecl>(*D))
-        insertImpl(ND);
+        makeDeclVisibleInContextImpl(ND);
 
       // If this declaration is itself a transparent declaration context,
       // add its members (recursively).
@@ -600,10 +600,10 @@
   return Ctx;
 }
 
-void DeclContext::insert(NamedDecl *D) {
+void DeclContext::makeDeclVisibleInContext(NamedDecl *D) {
   DeclContext *PrimaryContext = getPrimaryContext();
   if (PrimaryContext != this) {
-    PrimaryContext->insert(D);
+    PrimaryContext->makeDeclVisibleInContext(D);
     return;
   }
 
@@ -611,15 +611,15 @@
   // into it. Otherwise, be lazy and don't build that structure until
   // someone asks for it.
   if (LookupPtr.getPointer())
-    insertImpl(D);
+    makeDeclVisibleInContextImpl(D);
 
   // If we are a transparent context, insert into our parent context,
   // too. This operation is recursive.
   if (isTransparentContext())
-    getParent()->insert(D);
+    getParent()->makeDeclVisibleInContext(D);
 }
 
-void DeclContext::insertImpl(NamedDecl *D) {
+void DeclContext::makeDeclVisibleInContextImpl(NamedDecl *D) {
   // Skip unnamed declarations.
   if (!D->getDeclName())
     return;
@@ -694,7 +694,7 @@
     LookupPtr.setPointer(Map);
     LookupPtr.setInt(LookupIsMap);
     for (unsigned Idx = 0; Idx != LookupIsMap - 1; ++Idx) 
-      insertImpl(Array[Idx]);
+      makeDeclVisibleInContextImpl(Array[Idx]);
     delete [] Array;
 
     // Fall through to perform insertion into the map.