summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--clang/lib/Sema/SemaDeclObjC.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index c86f735d57d..168ccfc3f57 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/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);
OpenPOWER on IntegriCloud