summaryrefslogtreecommitdiffstats
path: root/clang/Sema/SemaType.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2007-09-06 21:24:23 +0000
committerSteve Naroff <snaroff@apple.com>2007-09-06 21:24:23 +0000
commit09bf815f8967664b9298a65ee2509e72c6a8f58d (patch)
tree7dbde50cb23759dcc5a5b361f2a81715eb7a4ea1 /clang/Sema/SemaType.cpp
parent517d5d8ebe06e9d55f10edde3c23a0355f481982 (diff)
downloadbcm5719-llvm-09bf815f8967664b9298a65ee2509e72c6a8f58d.tar.gz
bcm5719-llvm-09bf815f8967664b9298a65ee2509e72c6a8f58d.zip
The goal of this commit is to get just enough Sema support to recognize Objective-C classes
as types. That said, the AST nodes ObjcInterfaceDecl, ObjcInterfaceType, and ObjcClassDecl are *very* preliminary. The good news is we no longer need -parse-noop (aka MinimalActions) to parse cocoa.m. llvm-svn: 41752
Diffstat (limited to 'clang/Sema/SemaType.cpp')
-rw-r--r--clang/Sema/SemaType.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/Sema/SemaType.cpp b/clang/Sema/SemaType.cpp
index 17b34628b5f..75f07d8d54b 100644
--- a/clang/Sema/SemaType.cpp
+++ b/clang/Sema/SemaType.cpp
@@ -102,6 +102,10 @@ static QualType ConvertDeclSpecToType(const DeclSpec &DS, ASTContext &Ctx) {
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 (isa<ObjcInterfaceDecl>(D))
+ return Ctx.getObjcInterfaceType(cast<ObjcInterfaceDecl>(D));
// TypeQuals handled by caller.
return Ctx.getTypedefType(cast<TypedefDecl>(D));
}
OpenPOWER on IntegriCloud