This patch is just the easy part of the class names patch, which
allows the parsing of "class" in addition to "struct" and "union" to
declare a record.  So this patch allows:

 class C { };
 class C c1;

But it does not contain the lookup bits, so this won't work yet:

 C c2;

Patch by Doug Gregor!



git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49613 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index 637061c..5040b95 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -60,6 +60,12 @@
   }
 }
 
+bool Type::isClassType() const {
+  if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType))
+    if (RT->getDecl()->getKind() == Decl::Class)
+      return true;
+  return false;
+}
 bool Type::isStructureType() const {
   if (const RecordType *RT = dyn_cast<RecordType>(CanonicalType))
     if (RT->getDecl()->getKind() == Decl::Struct)