aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/Type.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2011-06-20 01:23:19 +0000
committerChandler Carruth <chandlerc@gmail.com>2011-06-20 01:23:19 +0000
commitbc8d7f9fd4346cfcc285868be32b74e019a40f01 (patch)
tree84a36df59f9b9cf232b57ebbe842dd42db30088f /lib/AST/Type.cpp
parent085d09d14365cef1faa7a376730911227ee39ee3 (diff)
Restructure the API in Type based on a conversation with Richard Smith.
This makes 'isPointerLikeType' a little less confusing, and pulls the decay check into a separate interface that is much more clear and concrete. Also, just implement these as logical wrappers around other predicates. Having a switch based implementation isn't likely to be necessary. We can try to optimize them later if they show up on a profile. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@133405 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/Type.cpp')
-rw-r--r--lib/AST/Type.cpp26
1 files changed, 0 insertions, 26 deletions
diff --git a/lib/AST/Type.cpp b/lib/AST/Type.cpp
index b30f8966b6..583cb5d57c 100644
--- a/lib/AST/Type.cpp
+++ b/lib/AST/Type.cpp
@@ -288,32 +288,6 @@ bool Type::isDerivedType() const {
return false;
}
}
-
-/// \brief Tests whether the type behaves like a pointer type.
-///
-/// This includes all of the obviously pointer types including block pointers,
-/// member pointers, and ObjC Object pointers. It also includes function and
-/// array types which behave as pointers due to decay.
-///
-/// \returns True for types which act like pointer types.
-bool Type::isPointerLikeType() const {
- switch (CanonicalType->getTypeClass()) {
- case Pointer:
- case BlockPointer:
- case MemberPointer:
- case ConstantArray:
- case IncompleteArray:
- case VariableArray:
- case DependentSizedArray:
- case FunctionProto:
- case FunctionNoProto:
- case ObjCObjectPointer:
- return true;
- default:
- return false;
- }
-}
-
bool Type::isClassType() const {
if (const RecordType *RT = getAs<RecordType>())
return RT->getDecl()->isClass();