Fix PR clang/3291

llvm-svn: 61886
This commit is contained in:
Douglas Gregor 2009-01-07 21:36:02 +00:00
parent f09c2dc8e0
commit f325278799
2 changed files with 16 additions and 4 deletions

View File

@ -343,11 +343,11 @@ Decl *Sema::LookupDecl(DeclarationName Name, unsigned NSI, Scope *S,
}
}
if (!LookInParent && !Ctx->isTransparentContext())
return 0;
Ctx = Ctx->getParent();
}
if (!LookInParent && !Ctx->isTransparentContext())
return 0;
}
}

View File

@ -1,5 +1,4 @@
// RUN: clang -fsyntax-only -verify %s
namespace Ns {
int f(); // expected-note{{previous declaration is here}}
@ -71,5 +70,18 @@ namespace a {
}
}
// PR clang/3291
namespace a {
namespace a { // A1
namespace a { // A2
int i;
}
}
}
void test_a() {
a::a::i = 3; // expected-error{{no member named 'i'}}
a::a::a::i = 4;
}