diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-02-28 01:32:25 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-02-28 01:32:25 +0000 |
commit | c1efaecf0373f1a55c5ef4c234357cf726fc0600 (patch) | |
tree | c449e41d3715898f32c75c618a20dea1b3910fd2 /lib/Sema/SemaLookup.cpp | |
parent | aca13a7df407b32a6ee497a0646f83184edefb49 (diff) |
Eliminate CXXRecordType
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65671 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaLookup.cpp')
-rw-r--r-- | lib/Sema/SemaLookup.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/Sema/SemaLookup.cpp b/lib/Sema/SemaLookup.cpp index 00849a6881..dd9c850d08 100644 --- a/lib/Sema/SemaLookup.cpp +++ b/lib/Sema/SemaLookup.cpp @@ -1232,13 +1232,14 @@ 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 CXXRecordType *ClassType - = dyn_cast_or_null<CXXRecordType>(T->getAsRecordType())) { - addAssociatedClassesAndNamespaces(ClassType->getDecl(), - Context, AssociatedNamespaces, - AssociatedClasses); - return; - } + if (const RecordType *ClassType = T->getAsRecordType()) + if (CXXRecordDecl *ClassDecl + = dyn_cast<CXXRecordDecl>(ClassType->getDecl())) { + addAssociatedClassesAndNamespaces(ClassDecl, Context, + AssociatedNamespaces, + AssociatedClasses); + return; + } // -- If T is an enumeration type, its associated namespace is // the namespace in which it is defined. If it is class |