diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-01-06 23:51:29 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-01-06 23:51:29 +0000 |
commit | 6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343 (patch) | |
tree | 56e7cd61b0d1d20a40f4edb5097519c9e3af9537 /clang/lib/Sema/SemaDecl.cpp | |
parent | 44a3da6c4dc98e9303c07836257ced0bc4a12cbb (diff) | |
download | bcm5719-llvm-6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343.tar.gz bcm5719-llvm-6ad0ef50918ed9cefff5fefb37d4f6dc2fac2343.zip |
Allow Objective-C entities to be declared within a transparent context
nested in the translation unit. This fixes <rdar://problem/6476070>.
llvm-svn: 61832
Diffstat (limited to 'clang/lib/Sema/SemaDecl.cpp')
-rw-r--r-- | clang/lib/Sema/SemaDecl.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/Sema/SemaDecl.cpp b/clang/lib/Sema/SemaDecl.cpp index 0e14150021e..79e443d0b44 100644 --- a/clang/lib/Sema/SemaDecl.cpp +++ b/clang/lib/Sema/SemaDecl.cpp @@ -156,9 +156,7 @@ void Sema::PushOnScopeChains(NamedDecl *D, Scope *S) { // We are pushing the name of a function, which might be an // overloaded name. FunctionDecl *FD = cast<FunctionDecl>(D); - DeclContext *DC = FD->getDeclContext(); - while (DC->isTransparentContext()) - DC = DC->getParent(); + DeclContext *DC = FD->getDeclContext()->getLookupContext(); IdentifierResolver::iterator Redecl = std::find_if(IdResolver.begin(FD->getDeclName(), DC, false/*LookInParentCtx*/), |