diff options
author | Douglas Gregor <dgregor@apple.com> | 2008-04-13 21:07:44 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2008-04-13 21:07:44 +0000 |
commit | 2ce52f3fb95bf544db6bd3d91a72bce7d9cceb6c (patch) | |
tree | 733d57759dcbbc4c20909f051db94a367d6914f8 /lib/Sema/SemaType.cpp | |
parent | d98d975ccdce7ec442ac26f682404cb71df40ff8 (diff) |
Introduce support for finding class and enum names via ordinary name lookup in C++
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@49621 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaType.cpp')
-rw-r--r-- | lib/Sema/SemaType.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Sema/SemaType.cpp b/lib/Sema/SemaType.cpp index 223cb56636..33797c4255 100644 --- a/lib/Sema/SemaType.cpp +++ b/lib/Sema/SemaType.cpp @@ -105,7 +105,7 @@ QualType Sema::ConvertDeclSpecToType(DeclSpec &DS) { DS.getTypeSpecSign() == 0 && "Can't handle qualifiers on typedef names yet!"); // TypeQuals handled by caller. - Result = Context.getTagDeclType(cast<TagDecl>(D)); + Result = Context.getTypeDeclType(cast<TypeDecl>(D)); break; } case DeclSpec::TST_typedef: { @@ -114,6 +114,7 @@ QualType Sema::ConvertDeclSpecToType(DeclSpec &DS) { assert(DS.getTypeSpecWidth() == 0 && DS.getTypeSpecComplex() == 0 && DS.getTypeSpecSign() == 0 && "Can't handle qualifiers on typedef names yet!"); + // FIXME: Adding a TST_objcInterface clause doesn't seem ideal, so // we have this "hack" for now... if (ObjCInterfaceDecl *ObjCIntDecl = dyn_cast<ObjCInterfaceDecl>(D)) { @@ -140,7 +141,7 @@ QualType Sema::ConvertDeclSpecToType(DeclSpec &DS) { } } // TypeQuals handled by caller. - Result = Context.getTypedefType(cast<TypedefDecl>(D)); + Result = Context.getTypeDeclType(dyn_cast<TypeDecl>(D)); break; } case DeclSpec::TST_typeofType: |