Change uses of:
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsRecordType() -> Type::getAs<RecordType>()
  Type::getAsPointerType() -> Type::getAs<PointerType>()
  Type::getAsBlockPointerType() -> Type::getAs<BlockPointerType>()
  Type::getAsLValueReferenceType() -> Type::getAs<LValueReferenceType>()
  Type::getAsRValueReferenceType() -> Type::getAs<RValueReferenceType>()
  Type::getAsMemberPointerType() -> Type::getAs<MemberPointerType>()
  Type::getAsReferenceType() -> Type::getAs<ReferenceType>()
  Type::getAsTagType() -> Type::getAs<TagType>()
  
And remove Type::getAsReferenceType(), etc.

This change is similar to one I made a couple weeks ago, but that was partly
reverted pending some additional design discussion. With Doug's pending smart
pointer changes for Types, it seemed natural to take this approach.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@77510 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 9f1ea4e..1fd6ae4 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -1387,7 +1387,7 @@
     for (CXXRecordDecl::base_class_iterator Base = Class->bases_begin(),
                                          BaseEnd = Class->bases_end();
          Base != BaseEnd; ++Base) {
-      const RecordType *BaseType = Base->getType()->getAsRecordType();
+      const RecordType *BaseType = Base->getType()->getAs<RecordType>();
       CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(BaseType->getDecl());
       if (AssociatedClasses.insert(BaseDecl)) {
         // Find the associated namespace for this base class.
@@ -1435,7 +1435,7 @@
   // We handle this by unwrapping pointer and array types immediately,
   // to avoid unnecessary recursion.
   while (true) {
-    if (const PointerType *Ptr = T->getAsPointerType())
+    if (const PointerType *Ptr = T->getAs<PointerType>())
       T = Ptr->getPointeeType();
     else if (const ArrayType *Ptr = Context.getAsArrayType(T))
       T = Ptr->getElementType();
@@ -1453,7 +1453,7 @@
   //        member, if any; and its direct and indirect base
   //        classes. Its associated namespaces are the namespaces in
   //        which its associated classes are defined. 
-  if (const RecordType *ClassType = T->getAsRecordType())
+  if (const RecordType *ClassType = T->getAs<RecordType>())
     if (CXXRecordDecl *ClassDecl 
         = dyn_cast<CXXRecordDecl>(ClassType->getDecl())) {
       addAssociatedClassesAndNamespaces(ClassDecl, Context, 
@@ -1519,7 +1519,7 @@
   //        associated namespaces and classes are those associated
   //        with the member type together with those associated with
   //        X. 
-  if (const MemberPointerType *MemberPtr = T->getAsMemberPointerType()) {
+  if (const MemberPointerType *MemberPtr = T->getAs<MemberPointerType>()) {
     // Handle the type that the pointer to member points to.
     addAssociatedClassesAndNamespaces(MemberPtr->getPointeeType(),
                                       Context,
@@ -1527,7 +1527,7 @@
                                       GlobalScope);
 
     // Handle the class type into which this points.
-    if (const RecordType *Class = MemberPtr->getClass()->getAsRecordType())
+    if (const RecordType *Class = MemberPtr->getClass()->getAs<RecordType>())
       addAssociatedClassesAndNamespaces(cast<CXXRecordDecl>(Class->getDecl()),
                                         Context,
                                         AssociatedNamespaces, AssociatedClasses,