diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-07-17 17:50:17 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-07-17 17:50:17 +0000 |
commit | 35366a67baa970c287c714c957cf78a4131cf60d (patch) | |
tree | 053ba730a50f0c434f8e6d6ca89d03d9cdcfc14d /lib/Sema/SemaLookup.cpp | |
parent | 01bc160ffccc03e4c0583acf82bd7ab80494219a (diff) |
Per offline discussion with Steve Naroff, add back Type::getAsXXXType() methods
until Doug Gregor's Type smart pointer code lands (or more discussion occurs).
These methods just call the new Type::getAs<XXX> methods, so we still have
reduced implementation redundancy. Having explicit getAsXXXType() methods makes
it easier to set breakpoints in the debugger.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@76193 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 1ca3412620..c88321e1a3 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1387,7 +1387,7 @@ addAssociatedClassesAndNamespaces(CXXRecordDecl *Class, for (CXXRecordDecl::base_class_iterator Base = Class->bases_begin(), BaseEnd = Class->bases_end(); Base != BaseEnd; ++Base) { - const RecordType *BaseType = Base->getType()->getAs<RecordType>(); + const RecordType *BaseType = Base->getType()->getAsRecordType(); CXXRecordDecl *BaseDecl = cast<CXXRecordDecl>(BaseType->getDecl()); if (AssociatedClasses.insert(BaseDecl)) { // Find the associated namespace for this base class. @@ -1435,7 +1435,7 @@ addAssociatedClassesAndNamespaces(QualType T, // We handle this by unwrapping pointer and array types immediately, // to avoid unnecessary recursion. while (true) { - if (const PointerType *Ptr = T->getAs<PointerType>()) + if (const PointerType *Ptr = T->getAsPointerType()) T = Ptr->getPointeeType(); else if (const ArrayType *Ptr = Context.getAsArrayType(T)) T = Ptr->getElementType(); @@ -1453,7 +1453,7 @@ addAssociatedClassesAndNamespaces(QualType T, // member, if any; and its direct and indirect base // classes. Its associated namespaces are the namespaces in // which its associated classes are defined. - if (const RecordType *ClassType = T->getAs<RecordType>()) + if (const RecordType *ClassType = T->getAsRecordType()) if (CXXRecordDecl *ClassDecl = dyn_cast<CXXRecordDecl>(ClassType->getDecl())) { addAssociatedClassesAndNamespaces(ClassDecl, Context, @@ -1519,7 +1519,7 @@ addAssociatedClassesAndNamespaces(QualType T, // associated namespaces and classes are those associated // with the member type together with those associated with // X. - if (const MemberPointerType *MemberPtr = T->getAs<MemberPointerType>()) { + if (const MemberPointerType *MemberPtr = T->getAsMemberPointerType()) { // Handle the type that the pointer to member points to. addAssociatedClassesAndNamespaces(MemberPtr->getPointeeType(), Context, @@ -1527,7 +1527,7 @@ addAssociatedClassesAndNamespaces(QualType T, GlobalScope); // Handle the class type into which this points. - if (const RecordType *Class = MemberPtr->getClass()->getAs<RecordType>()) + if (const RecordType *Class = MemberPtr->getClass()->getAsRecordType()) addAssociatedClassesAndNamespaces(cast<CXXRecordDecl>(Class->getDecl()), Context, AssociatedNamespaces, AssociatedClasses, |