From: Steve Naroff Date: Thu, 23 Apr 2009 16:00:56 +0000 (+0000) Subject: More PushOnScopeChain() FIXME's. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8f06f84e8be64962cc478e3e8867336768cac79b;p=clang More PushOnScopeChain() FIXME's. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69894 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/PCHReader.cpp b/lib/Frontend/PCHReader.cpp index 0502a876a3..2f6206dd09 100644 --- a/lib/Frontend/PCHReader.cpp +++ b/lib/Frontend/PCHReader.cpp @@ -2743,7 +2743,6 @@ PCHReader::ReadDeclarationName(const RecordData &Record, unsigned &Idx) { case DeclarationName::ObjCOneArgSelector: case DeclarationName::ObjCMultiArgSelector: return DeclarationName(GetSelector(Record, Idx)); - break; case DeclarationName::CXXConstructorName: return Context.DeclarationNames.getCXXConstructorName( diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp index 7b23b04859..446b125866 100644 --- a/lib/Sema/SemaDeclObjC.cpp +++ b/lib/Sema/SemaDeclObjC.cpp @@ -206,8 +206,7 @@ Sema::DeclPtrTy Sema::ActOnCompatiblityAlias(SourceLocation AtLoc, ObjCAliasDecls[AliasName] = AliasDecl; - // FIXME: PushOnScopeChains? - CurContext->addDecl(Context, AliasDecl); + PushOnScopeChains(AliasDecl, TUScope); if (!CheckObjCDeclScope(AliasDecl)) TUScope->AddDecl(DeclPtrTy::make(AliasDecl)); @@ -1048,8 +1047,7 @@ Sema::ActOnForwardClassDeclaration(SourceLocation AtClassLoc, IdentList[i], SourceLocation(), true); ObjCInterfaceDecls[IdentList[i]] = IDecl; - // FIXME: PushOnScopeChains? - CurContext->addDecl(Context, IDecl); + PushOnScopeChains(IDecl, TUScope); // Remember that this needs to be removed when the scope is popped. TUScope->AddDecl(DeclPtrTy::make(IDecl)); } diff --git a/test/PCH/objc_methods.h b/test/PCH/objc_methods.h index 97617be293..4c6b1e1cce 100644 --- a/test/PCH/objc_methods.h +++ b/test/PCH/objc_methods.h @@ -4,3 +4,8 @@ + alloc; - (void)instMethod; @end + +@class TestForwardClassDecl; + +// FIXME: @compatibility_alias AliasForTestPCH TestPCH; + diff --git a/test/PCH/objc_methods.m b/test/PCH/objc_methods.m index 818c6145ed..2122ff6061 100644 --- a/test/PCH/objc_methods.m +++ b/test/PCH/objc_methods.m @@ -7,6 +7,10 @@ void func() { TestPCH *xx; + TestForwardClassDecl *yy; +// FIXME: +// AliasForTestPCH *zz; + #if 0 xx = [TestPCH alloc]; [xx instMethod];