]> granicus.if.org Git - clang/commitdiff
[AST] Type::isVoidType() is trivial and should be inlined.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 9 Mar 2012 01:51:56 +0000 (01:51 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 9 Mar 2012 01:51:56 +0000 (01:51 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152364 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/AST/Type.h
lib/AST/Type.cpp

index 3176f1909c4f6f8e3a57360ea971686d2d848e25..7bd367c054fa1f4d67a92fda63301bbbb6abece6 100644 (file)
@@ -4816,6 +4816,12 @@ inline bool Type::isNonOverloadPlaceholderType() const {
   return false;
 }
 
+inline bool Type::isVoidType() const {
+  if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
+    return BT->getKind() == BuiltinType::Void;
+  return false;
+}
+
 inline bool Type::isHalfType() const {
   if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
     return BT->getKind() == BuiltinType::Half;
index fd8a03fd1a1d947ef6fadbb5fc35173ed693af7a..d9fecd449f3bb64011ac20ae5b35fe1241bd2d2e 100644 (file)
@@ -309,13 +309,6 @@ const Type *Type::getUnqualifiedDesugaredType() const {
   }
 }
 
-/// isVoidType - Helper method to determine if this is the 'void' type.
-bool Type::isVoidType() const {
-  if (const BuiltinType *BT = dyn_cast<BuiltinType>(CanonicalType))
-    return BT->getKind() == BuiltinType::Void;
-  return false;
-}
-
 bool Type::isDerivedType() const {
   switch (CanonicalType->getTypeClass()) {
   case Pointer: