aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2011-12-27 22:43:10 +0000
committerDouglas Gregor <dgregor@apple.com>2011-12-27 22:43:10 +0000
commit375bb1413c041055262c8a416f20d10474a5eda9 (patch)
tree66e5d219fe54a005bd13828eaab0234e08ca13fc /lib/Sema/SemaDeclObjC.cpp
parentfedb6ecbed93c6bf12a02d61b2421d6f0da3b4fc (diff)
Eliminate ObjCClassDecl, which is redundant now that ObjCInterfaceDecl
covers both declarations (@class) and definitions (@interface) of an Objective-C class. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@147299 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index c86f735d57..168ccfc3f5 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1775,21 +1775,12 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc,
= dyn_cast_or_null<ObjCInterfaceDecl>(PrevDecl);
ObjCInterfaceDecl *IDecl
= ObjCInterfaceDecl::Create(Context, CurContext, AtClassLoc,
- IdentList[i], PrevIDecl, IdentLocs[i], true);
+ IdentList[i], PrevIDecl, IdentLocs[i]);
IDecl->setAtEndRange(IdentLocs[i]);
- // Create the forward declaration. Note that we intentionally do this
- // before we add the ObjCInterfaceDecl we just created, so that the
- // rewriter sees the ObjCClassDecl first.
- // FIXME: ObjCClassDecl should probably just go away.
- ObjCClassDecl *CDecl = ObjCClassDecl::Create(Context, CurContext, AtClassLoc,
- IDecl, IdentLocs[i]);
- CurContext->addDecl(CDecl);
-
PushOnScopeChains(IDecl, TUScope);
-
- CheckObjCDeclScope(CDecl);
- DeclsInGroup.push_back(CDecl);
+ CheckObjCDeclScope(IDecl);
+ DeclsInGroup.push_back(IDecl);
}
return BuildDeclaratorGroup(DeclsInGroup.data(), DeclsInGroup.size(), false);