From 0701bbb228dfd87e1fe82a0a4b7b9facfecb43da Mon Sep 17 00:00:00 2001 From: Steve Naroff Date: Thu, 8 Jan 2009 17:28:14 +0000 Subject: This is a large/messy diff that unifies the ObjC AST's with DeclContext. - ObjCContainerDecl's (ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl), ObjCCategoryImpl, & ObjCImplementation are all DeclContexts. - ObjCMethodDecl is now a ScopedDecl (so it can play nicely with DeclContext). - ObjCContainerDecl now does iteration/lookup using DeclContext infrastructure (no more linear search:-) - Removed ASTContext argument to DeclContext::lookup(). It wasn't being used and complicated it's use from an ObjC AST perspective. - Added Sema::ProcessPropertyDecl() and removed Sema::diagnosePropertySetterGetterMismatch(). - Simplified Sema::ActOnAtEnd() considerably. Still more work to do. - Fixed an incorrect casting assumption in Sema::getCurFunctionOrMethodDecl(), now that ObjCMethodDecl is a ScopedDecl. - Removed addPropertyMethods from ObjCInterfaceDecl/ObjCCategoryDecl/ObjCProtocolDecl. This passes all the tests on my machine. Since many of the changes are central to the way ObjC finds it's methods, I expect some fallout (and there are still a handful of FIXME's). Nevertheless, this should be a step in the right direction. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@61929 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Sema/SemaDecl.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/Sema/SemaDecl.cpp') diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 351694c74d..6585733ab3 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -287,7 +287,7 @@ Decl *Sema::LookupDecl(DeclarationName Name, unsigned NSI, Scope *S, // Perform qualified name lookup into the LookupCtx. // FIXME: Will need to look into base classes and such. DeclContext::lookup_const_iterator I, E; - for (llvm::tie(I, E) = LookupCtx->lookup(Context, Name); I != E; ++I) + for (llvm::tie(I, E) = LookupCtx->lookup(Name); I != E; ++I) if ((*I)->isInIdentifierNamespace(NS)) { // Ignore non-namespace names if we're only looking for namespaces. if (NamespaceNameOnly && !isa(*I)) continue; @@ -334,7 +334,7 @@ Decl *Sema::LookupDecl(DeclarationName Name, unsigned NSI, Scope *S, while (Ctx && (Ctx->isNamespace() || Ctx->isRecord())) { // Look for declarations of this name in this scope. DeclContext::lookup_const_iterator I, E; - for (llvm::tie(I, E) = Ctx->lookup(Context, Name); I != E; ++I) { + for (llvm::tie(I, E) = Ctx->lookup(Name); I != E; ++I) { // FIXME: Cache this result in the IdResolver if ((*I)->isInIdentifierNamespace(NS)) { if (NamespaceNameOnly && !isa(*I)) -- cgit v1.2.3