Eliminate Sema::ObjCAliasDecls. This is based on Steve's fix, but also
updates name lookup so that we see through @compatibility_alias
declarations to their underlying interfaces.
llvm-svn: 69950
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp
index c30a7b2..f4014d1 100644
--- a/clang/lib/Sema/SemaDeclObjC.cpp
+++ b/clang/lib/Sema/SemaDeclObjC.cpp
@@ -201,12 +201,8 @@
ObjCCompatibleAliasDecl *AliasDecl =
ObjCCompatibleAliasDecl::Create(Context, CurContext, AtLoc, AliasName, CDecl);
- ObjCAliasDecls[AliasName] = AliasDecl;
-
- // FIXME: PushOnScopeChains?
- CurContext->addDecl(Context, AliasDecl);
if (!CheckObjCDeclScope(AliasDecl))
- TUScope->AddDecl(DeclPtrTy::make(AliasDecl));
+ PushOnScopeChains(AliasDecl, TUScope);
return DeclPtrTy::make(AliasDecl);
}