diff options
author | John McCall <rjmccall@apple.com> | 2009-09-21 23:43:11 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2009-09-21 23:43:11 +0000 |
commit | 183700f494ec9b6701b6efe82bcb25f4c79ba561 (patch) | |
tree | 797f214407f66937802226652d130f95d596e33b /lib/Sema/SemaLookup.cpp | |
parent | c32b24452ebb537934b20b7133a3a0cbce447666 (diff) |
Change all the Type::getAsFoo() methods to specializations of Type::getAs().
Several of the existing methods were identical to their respective
specializations, and so have been removed entirely. Several more 'leaf'
optimizations were introduced.
The getAsFoo() methods which imposed extra conditions, like
getAsObjCInterfacePointerType(), have been left in place.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@82501 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 70befd630c..44641b72e4 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1444,7 +1444,7 @@ addAssociatedClassesAndNamespaces(QualType T, // -- If T is a fundamental type, its associated sets of // namespaces and classes are both empty. - if (T->getAsBuiltinType()) + if (T->getAs<BuiltinType>()) return; // -- If T is a class type (including unions), its associated @@ -1465,7 +1465,7 @@ addAssociatedClassesAndNamespaces(QualType T, // the namespace in which it is defined. If it is class // member, its associated class is the member’s class; else // it has no associated class. - if (const EnumType *EnumT = T->getAsEnumType()) { + if (const EnumType *EnumT = T->getAs<EnumType>()) { EnumDecl *Enum = EnumT->getDecl(); DeclContext *Ctx = Enum->getDeclContext(); @@ -1483,13 +1483,13 @@ addAssociatedClassesAndNamespaces(QualType T, // -- If T is a function type, its associated namespaces and // classes are those associated with the function parameter // types and those associated with the return type. - if (const FunctionType *FunctionType = T->getAsFunctionType()) { + if (const FunctionType *FnType = T->getAs<FunctionType>()) { // Return type - addAssociatedClassesAndNamespaces(FunctionType->getResultType(), + addAssociatedClassesAndNamespaces(FnType->getResultType(), Context, AssociatedNamespaces, AssociatedClasses); - const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FunctionType); + const FunctionProtoType *Proto = dyn_cast<FunctionProtoType>(FnType); if (!Proto) return; @@ -1629,7 +1629,7 @@ IsAcceptableNonMemberOperatorCandidate(FunctionDecl *Fn, if (T1->isRecordType() || (!T2.isNull() && T2->isRecordType())) return true; - const FunctionProtoType *Proto = Fn->getType()->getAsFunctionProtoType(); + const FunctionProtoType *Proto = Fn->getType()->getAs<FunctionProtoType>(); if (Proto->getNumArgs() < 1) return false; |