forked from OSchip/llvm-project
Skip transparent contexts when performing C++ name lookup
llvm-svn: 79931
This commit is contained in:
parent
c327709db8
commit
f2270430a1
|
@ -755,6 +755,9 @@ Sema::CppLookupName(Scope *S, DeclarationName Name,
|
|||
|
||||
for (; S; S = S->getParent()) {
|
||||
DeclContext *Ctx = static_cast<DeclContext *>(S->getEntity());
|
||||
if (Ctx->isTransparentContext())
|
||||
continue;
|
||||
|
||||
assert(Ctx && Ctx->isFileContext() &&
|
||||
"We should have been looking only at file context here already.");
|
||||
|
||||
|
|
|
@ -25,3 +25,11 @@ extern "C" int const bar;
|
|||
// <rdar://problem/6895431>
|
||||
extern "C" struct bar d;
|
||||
extern struct bar e;
|
||||
|
||||
extern "C++" {
|
||||
namespace N0 {
|
||||
struct X0 {
|
||||
int foo(int x) { return x; }
|
||||
};
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue