Finish implementing __builtin_classify_type()...


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40951 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/AST/Type.cpp b/AST/Type.cpp
index afdd3cc..27453ca 100644
--- a/AST/Type.cpp
+++ b/AST/Type.cpp
@@ -340,6 +340,26 @@
   return false;
 }
 
+bool Type::isEnumeralType() const {
+  if (const TagType *TT = dyn_cast<TagType>(CanonicalType))
+    return TT->getDecl()->getKind() == Decl::Enum;
+  return false;
+}
+
+bool Type::isBooleanType() const {
+  if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
+    return BT->getKind() == BuiltinType::Bool;
+  return false;
+}
+
+bool Type::isCharType() const {
+  if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
+    return BT->getKind() == BuiltinType::Char_U ||
+           BT->getKind() == BuiltinType::UChar ||
+           BT->getKind() == BuiltinType::Char_S;
+  return false;
+}
+
 bool Type::isSignedIntegerType() const {
   if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType)) {
     return BT->getKind() >= BuiltinType::Char_S &&