Commit 469b6ef7 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Get rid of useless overload of findType().

parent 31135d57
...@@ -218,18 +218,7 @@ QList<Symbol *> LookupContext::lookup(const Name *name, Scope *scope) const ...@@ -218,18 +218,7 @@ QList<Symbol *> LookupContext::lookup(const Name *name, Scope *scope) const
break; // it's a formal argument. break; // it's a formal argument.
if (fun->name() && fun->name()->isQualifiedNameId()) { if (fun->name() && fun->name()->isQualifiedNameId()) {
const QualifiedNameId *q = fun->name()->asQualifiedNameId(); if (ClassOrNamespace *binding = bindings()->lookupType(fun))
QList<const Name *> path = fullyQualifiedName(scope->owner());
for (unsigned index = 0; index < q->nameCount() - 1; ++index) { // ### TODO remove me.
const Name *name = q->nameAt(index);
if (name->isNameId() || name->isTemplateNameId())
path.append(name);
}
if (ClassOrNamespace *binding = bindings()->lookupType(path))
return binding->lookup(name); return binding->lookup(name);
} }
...@@ -647,12 +636,6 @@ ClassOrNamespace *CreateBindings::lookupType(Symbol *symbol) ...@@ -647,12 +636,6 @@ ClassOrNamespace *CreateBindings::lookupType(Symbol *symbol)
return b; return b;
} }
ClassOrNamespace *CreateBindings::lookupType(const QList<const Name *> &path)
{
ClassOrNamespace *e = _globalNamespace->findType(path);
return e;
}
void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace) void CreateBindings::process(Symbol *s, ClassOrNamespace *classOrNamespace)
{ {
ClassOrNamespace *previous = switchCurrentClassOrNamespace(classOrNamespace); ClassOrNamespace *previous = switchCurrentClassOrNamespace(classOrNamespace);
......
...@@ -126,10 +126,6 @@ public: ...@@ -126,10 +126,6 @@ public:
/// Finds the binding associated to the given symbol. /// Finds the binding associated to the given symbol.
ClassOrNamespace *lookupType(Symbol *symbol); ClassOrNamespace *lookupType(Symbol *symbol);
/// Find the binding with the given path.
/// \internal
ClassOrNamespace *lookupType(const QList<const Name *> &path);
/// Returns the Control that must be used to create temporary symbols. /// Returns the Control that must be used to create temporary symbols.
/// \internal /// \internal
Control *control() const; Control *control() const;
......
Markdown is supported
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