aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-04-13 21:07:44 +0000
committerDouglas Gregor <dgregor@apple.com>2008-04-13 21:07:44 +0000
commit2ce52f3fb95bf544db6bd3d91a72bce7d9cceb6c (patch)
tree733d57759dcbbc4c20909f051db94a367d6914f8 /lib/Sema/SemaType.cpp
parentd98d975ccdce7ec442ac26f682404cb71df40ff8 (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.cpp5
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: