Eliminate CXXRecordType

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp
index 00849a6..dd9c850 100644
--- a/lib/Sema/SemaLookup.cpp
+++ b/lib/Sema/SemaLookup.cpp
@@ -1232,13 +1232,14 @@
   //        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 CXXRecordType *ClassType 
-        = dyn_cast_or_null<CXXRecordType>(T->getAsRecordType())) {
-    addAssociatedClassesAndNamespaces(ClassType->getDecl(), 
-                                      Context, AssociatedNamespaces, 
-                                      AssociatedClasses);
-    return;
-  }
+  if (const RecordType *ClassType = T->getAsRecordType())
+    if (CXXRecordDecl *ClassDecl 
+        = dyn_cast<CXXRecordDecl>(ClassType->getDecl())) {
+      addAssociatedClassesAndNamespaces(ClassDecl, Context, 
+                                        AssociatedNamespaces, 
+                                        AssociatedClasses);
+      return;
+    }
 
   //     -- If T is an enumeration type, its associated namespace is
   //        the namespace in which it is defined. If it is class