Commit f7f35397 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Skip using namespace directives when searching for declarations.

parent 5cd1cd10
......@@ -456,6 +456,8 @@ void ClassOrNamespace::lookup_helper(const Name *name, ClassOrNamespace *binding
foreach (Symbol *s, binding->symbols()) {
if (s->isFriend())
else if (s->isUsingNamespaceDirective())
if (Scope *scope = s->asScope()) {
if (Class *klass = scope->asClass()) {
......@@ -509,6 +511,8 @@ void CreateBindings::lookupInScope(const Name *name, Scope *scope,
for (Symbol *s = scope->find(id); s; s = s->next()) {
if (s->isFriend())
continue; // skip friends
else if (s->isUsingNamespaceDirective())
continue; // skip using namespace directives
else if (! id->isEqualTo(s->identifier()))
else if (s->name()->isQualifiedNameId())
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment