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 | 9dd450bb781484ca4b870529f89842541045c153 (patch) | |
tree | b2033fb4eef5442d9d080df4ae39137b696dcd4e /clang/lib/Sema/SemaDeclObjC.cpp | |
parent | fd68c7bdc0ea3a61b90380eab3db89230c6b5f27 (diff) | |
download | bcm5719-llvm-9dd450bb781484ca4b870529f89842541045c153.tar.gz bcm5719-llvm-9dd450bb781484ca4b870529f89842541045c153.zip |
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.
llvm-svn: 82501
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 43d38f06799..c11b4e06667 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -143,7 +143,7 @@ ActOnStartClassInterface(SourceLocation AtInterfaceLoc, if (const TypedefDecl *TDecl = dyn_cast_or_null<TypedefDecl>(PrevDecl)) { QualType T = TDecl->getUnderlyingType(); if (T->isObjCInterfaceType()) { - if (NamedDecl *IDecl = T->getAsObjCInterfaceType()->getDecl()) + if (NamedDecl *IDecl = T->getAs<ObjCInterfaceType>()->getDecl()) SuperClassDecl = dyn_cast<ObjCInterfaceDecl>(IDecl); } } @@ -209,7 +209,7 @@ Sema::DeclPtrTy Sema::ActOnCompatiblityAlias(SourceLocation AtLoc, if (const TypedefDecl *TDecl = dyn_cast_or_null<TypedefDecl>(CDeclU)) { QualType T = TDecl->getUnderlyingType(); if (T->isObjCInterfaceType()) { - if (NamedDecl *IDecl = T->getAsObjCInterfaceType()->getDecl()) { + if (NamedDecl *IDecl = T->getAs<ObjCInterfaceType>()->getDecl()) { ClassName = IDecl->getIdentifier(); CDeclU = LookupName(TUScope, ClassName, LookupOrdinaryName); } @@ -1939,7 +1939,7 @@ Sema::DeclPtrTy Sema::ActOnProperty(Scope *S, SourceLocation AtLoc, if (T->isObjCObjectPointerType()) { QualType InterfaceTy = T->getPointeeType(); if (const ObjCInterfaceType *OIT = - InterfaceTy->getAsObjCInterfaceType()) { + InterfaceTy->getAs<ObjCInterfaceType>()) { ObjCInterfaceDecl *IDecl = OIT->getDecl(); if (IDecl) if (ObjCProtocolDecl* PNSCopying = |