Commit 32a84df5 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Deprecated the current LookupContext.

parent 325bc666
......@@ -27,7 +27,7 @@
**
**************************************************************************/
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include "ResolveExpression.h"
#include "Overview.h"
#include "CppBindings.h"
......@@ -53,12 +53,12 @@ using namespace CPlusPlus;
/////////////////////////////////////////////////////////////////////
// LookupContext
/////////////////////////////////////////////////////////////////////
LookupContext::LookupContext(Control *control)
DeprecatedLookupContext::DeprecatedLookupContext(Control *control)
: _control(control),
_symbol(0)
{ }
LookupContext::LookupContext(Symbol *symbol,
DeprecatedLookupContext::DeprecatedLookupContext(Symbol *symbol,
Document::Ptr expressionDocument,
Document::Ptr thisDocument,
const Snapshot &snapshot)
......@@ -71,28 +71,28 @@ LookupContext::LookupContext(Symbol *symbol,
_visibleScopes = buildVisibleScopes();
}
bool LookupContext::isValid() const
bool DeprecatedLookupContext::isValid() const
{ return _control != 0; }
Control *LookupContext::control() const
Control *DeprecatedLookupContext::control() const
{ return _control; }
Symbol *LookupContext::symbol() const
Symbol *DeprecatedLookupContext::symbol() const
{ return _symbol; }
Document::Ptr LookupContext::expressionDocument() const
Document::Ptr DeprecatedLookupContext::expressionDocument() const
{ return _expressionDocument; }
Document::Ptr LookupContext::thisDocument() const
Document::Ptr DeprecatedLookupContext::thisDocument() const
{ return _thisDocument; }
Document::Ptr LookupContext::document(const QString &fileName) const
Document::Ptr DeprecatedLookupContext::document(const QString &fileName) const
{ return _snapshot.document(fileName); }
Snapshot LookupContext::snapshot() const
Snapshot DeprecatedLookupContext::snapshot() const
{ return _snapshot; }
bool LookupContext::maybeValidSymbol(Symbol *symbol,
bool DeprecatedLookupContext::maybeValidSymbol(Symbol *symbol,
ResolveMode mode,
const QList<Symbol *> &candidates)
{
......@@ -107,7 +107,7 @@ bool LookupContext::maybeValidSymbol(Symbol *symbol,
return false;
}
QList<Scope *> LookupContext::resolveNestedNameSpecifier(const QualifiedNameId *q,
QList<Scope *> DeprecatedLookupContext::resolveNestedNameSpecifier(const QualifiedNameId *q,
const QList<Scope *> &visibleScopes) const
{
QList<Symbol *> candidates;
......@@ -135,7 +135,7 @@ QList<Scope *> LookupContext::resolveNestedNameSpecifier(const QualifiedNameId *
return scopes;
}
QList<Symbol *> LookupContext::resolveQualifiedNameId(const QualifiedNameId *q,
QList<Symbol *> DeprecatedLookupContext::resolveQualifiedNameId(const QualifiedNameId *q,
const QList<Scope *> &visibleScopes,
ResolveMode mode) const
{
......@@ -203,7 +203,7 @@ QList<Symbol *> LookupContext::resolveQualifiedNameId(const QualifiedNameId *q,
return candidates;
}
QList<Symbol *> LookupContext::resolveOperatorNameId(const OperatorNameId *opId,
QList<Symbol *> DeprecatedLookupContext::resolveOperatorNameId(const OperatorNameId *opId,
const QList<Scope *> &visibleScopes,
ResolveMode) const
{
......@@ -224,7 +224,7 @@ QList<Symbol *> LookupContext::resolveOperatorNameId(const OperatorNameId *opId,
return candidates;
}
QList<Symbol *> LookupContext::resolve(const Name *name, const QList<Scope *> &visibleScopes,
QList<Symbol *> DeprecatedLookupContext::resolve(const Name *name, const QList<Scope *> &visibleScopes,
ResolveMode mode) const
{
QList<Symbol *> candidates;
......@@ -297,7 +297,7 @@ QList<Symbol *> LookupContext::resolve(const Name *name, const QList<Scope *> &v
return candidates;
}
const Identifier *LookupContext::identifier(const Name *name) const
const Identifier *DeprecatedLookupContext::identifier(const Name *name) const
{
if (name)
return name->identifier();
......@@ -305,7 +305,7 @@ const Identifier *LookupContext::identifier(const Name *name) const
return 0;
}
void LookupContext::buildVisibleScopes_helper(Document::Ptr doc, QList<Scope *> *scopes,
void DeprecatedLookupContext::buildVisibleScopes_helper(Document::Ptr doc, QList<Scope *> *scopes,
QSet<QString> *processed)
{
if (doc && ! processed->contains(doc->fileName())) {
......@@ -321,7 +321,7 @@ void LookupContext::buildVisibleScopes_helper(Document::Ptr doc, QList<Scope *>
}
}
QList<Scope *> LookupContext::buildVisibleScopes()
QList<Scope *> DeprecatedLookupContext::buildVisibleScopes()
{
QList<Scope *> scopes;
......@@ -355,10 +355,10 @@ QList<Scope *> LookupContext::buildVisibleScopes()
return scopes;
}
QList<Scope *> LookupContext::visibleScopes(const LookupItem &result) const
QList<Scope *> DeprecatedLookupContext::visibleScopes(const LookupItem &result) const
{ return visibleScopes(result.lastVisibleSymbol()); }
QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
QList<Scope *> DeprecatedLookupContext::visibleScopes(Symbol *symbol) const
{
QList<Scope *> scopes;
if (symbol) {
......@@ -370,7 +370,7 @@ QList<Scope *> LookupContext::visibleScopes(Symbol *symbol) const
return scopes;
}
void LookupContext::expandEnumOrAnonymousSymbol(ScopedSymbol *scopedSymbol,
void DeprecatedLookupContext::expandEnumOrAnonymousSymbol(ScopedSymbol *scopedSymbol,
QList<Scope *> *expandedScopes) const
{
if (! scopedSymbol || expandedScopes->contains(scopedSymbol->members()))
......@@ -395,21 +395,21 @@ void LookupContext::expandEnumOrAnonymousSymbol(ScopedSymbol *scopedSymbol,
}
}
QList<Scope *> LookupContext::expand(const QList<Scope *> &scopes) const
QList<Scope *> DeprecatedLookupContext::expand(const QList<Scope *> &scopes) const
{
QList<Scope *> expanded;
expand(scopes, &expanded);
return expanded;
}
void LookupContext::expand(const QList<Scope *> &scopes, QList<Scope *> *expandedScopes) const
void DeprecatedLookupContext::expand(const QList<Scope *> &scopes, QList<Scope *> *expandedScopes) const
{
for (int i = 0; i < scopes.size(); ++i) {
expand(scopes.at(i), scopes, expandedScopes);
}
}
void LookupContext::expandNamespace(Namespace *ns,
void DeprecatedLookupContext::expandNamespace(Namespace *ns,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -445,7 +445,7 @@ void LookupContext::expandNamespace(Namespace *ns,
}
}
void LookupContext::expandClass(Class *klass,
void DeprecatedLookupContext::expandClass(Class *klass,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -493,7 +493,7 @@ void LookupContext::expandClass(Class *klass,
}
}
void LookupContext::expandBlock(Block *blockSymbol,
void DeprecatedLookupContext::expandBlock(Block *blockSymbol,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -511,7 +511,7 @@ void LookupContext::expandBlock(Block *blockSymbol,
}
}
void LookupContext::expandFunction(Function *function,
void DeprecatedLookupContext::expandFunction(Function *function,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -536,7 +536,7 @@ void LookupContext::expandFunction(Function *function,
}
}
void LookupContext::expandObjCMethod(ObjCMethod *method,
void DeprecatedLookupContext::expandObjCMethod(ObjCMethod *method,
const QList<Scope *> &,
QList<Scope *> *expandedScopes) const
{
......@@ -544,7 +544,7 @@ void LookupContext::expandObjCMethod(ObjCMethod *method,
expandedScopes->append(method->arguments());
}
void LookupContext::expandObjCClass(ObjCClass *klass,
void DeprecatedLookupContext::expandObjCClass(ObjCClass *klass,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -592,7 +592,7 @@ void LookupContext::expandObjCClass(ObjCClass *klass,
}
}
void LookupContext::expandObjCProtocol(ObjCProtocol *protocol, const QList<Scope *> &visibleScopes, QList<Scope *> *expandedScopes) const
void DeprecatedLookupContext::expandObjCProtocol(ObjCProtocol *protocol, const QList<Scope *> &visibleScopes, QList<Scope *> *expandedScopes) const
{
// First expand the protocol itself
expand(protocol->members(), visibleScopes, expandedScopes);
......@@ -607,7 +607,7 @@ void LookupContext::expandObjCProtocol(ObjCProtocol *protocol, const QList<Scope
}
}
void LookupContext::expand(Scope *scope,
void DeprecatedLookupContext::expand(Scope *scope,
const QList<Scope *> &visibleScopes,
QList<Scope *> *expandedScopes) const
{
......@@ -666,10 +666,10 @@ static QList<ClassBinding *> visibleClassBindings(Symbol *symbol, NamespaceBindi
return classBindings;
}
Symbol *LookupContext::canonicalSymbol(Symbol *symbol,
Symbol *DeprecatedLookupContext::canonicalSymbol(Symbol *symbol,
NamespaceBinding *globalNamespace)
{
Symbol *canonicalSymbol = LookupContext::canonicalSymbol(symbol);
Symbol *canonicalSymbol = DeprecatedLookupContext::canonicalSymbol(symbol);
if (! canonicalSymbol)
return 0;
......@@ -691,7 +691,7 @@ Symbol *LookupContext::canonicalSymbol(Symbol *symbol,
continue;
else if (Function *f = c->type()->asFunctionType()) {
if (f->isVirtual())
return LookupContext::canonicalSymbol(f);
return DeprecatedLookupContext::canonicalSymbol(f);
}
}
}
......@@ -702,7 +702,7 @@ Symbol *LookupContext::canonicalSymbol(Symbol *symbol,
return canonicalSymbol;
}
Symbol *LookupContext::canonicalSymbol(const QList<Symbol *> &candidates,
Symbol *DeprecatedLookupContext::canonicalSymbol(const QList<Symbol *> &candidates,
NamespaceBinding *globalNamespaceBinding)
{
if (candidates.isEmpty())
......@@ -711,7 +711,7 @@ Symbol *LookupContext::canonicalSymbol(const QList<Symbol *> &candidates,
return canonicalSymbol(candidates.first(), globalNamespaceBinding);
}
Symbol *LookupContext::canonicalSymbol(const QList<LookupItem> &results,
Symbol *DeprecatedLookupContext::canonicalSymbol(const QList<LookupItem> &results,
NamespaceBinding *globalNamespaceBinding)
{
QList<Symbol *> candidates;
......@@ -723,7 +723,7 @@ Symbol *LookupContext::canonicalSymbol(const QList<LookupItem> &results,
}
Symbol *LookupContext::canonicalSymbol(Symbol *symbol)
Symbol *DeprecatedLookupContext::canonicalSymbol(Symbol *symbol)
{
Symbol *canonical = symbol;
Class *canonicalClass = 0;
......
......@@ -27,8 +27,8 @@
**
**************************************************************************/
#ifndef CPLUSPLUS_LOOKUPCONTEXT_H
#define CPLUSPLUS_LOOKUPCONTEXT_H
#ifndef CPLUSPLUS_DEPRECATEDLOOKUPCONTEXT_H
#define CPLUSPLUS_DEPRECATEDLOOKUPCONTEXT_H
#include "CppDocument.h"
#include <FullySpecifiedType.h>
......@@ -66,12 +66,12 @@ private:
Symbol *_lastVisibleSymbol;
};
class CPLUSPLUS_EXPORT LookupContext
class CPLUSPLUS_EXPORT DeprecatedLookupContext
{
public:
LookupContext(Control *control = 0);
DeprecatedLookupContext(Control *control = 0);
LookupContext(Symbol *symbol,
DeprecatedLookupContext(Symbol *symbol,
Document::Ptr expressionDocument,
Document::Ptr thisDocument,
const Snapshot &snapshot);
......@@ -238,4 +238,4 @@ uint qHash(const CPlusPlus::LookupItem &result);
inline uint qHash(const CPlusPlus::LookupItem &item) { return CPlusPlus::qHash(item); }
#endif
#endif // CPLUSPLUS_LOOKUPCONTEXT_H
#endif // CPLUSPLUS_DEPRECATEDLOOKUPCONTEXT_H
......@@ -141,7 +141,7 @@ void FindUsages::reportResult(unsigned tokenIndex)
bool FindUsages::checkCandidates(const QList<Symbol *> &candidates) const
{
if (Symbol *canonicalSymbol = LookupContext::canonicalSymbol(candidates, _globalNamespaceBinding.data())) {
if (Symbol *canonicalSymbol = DeprecatedLookupContext::canonicalSymbol(candidates, _globalNamespaceBinding.data())) {
#if 0
Symbol *c = candidates.first();
......@@ -201,7 +201,7 @@ bool FindUsages::checkSymbol(Symbol *symbol) const
return false;
}
LookupContext FindUsages::currentContext(AST *ast)
DeprecatedLookupContext FindUsages::currentContext(AST *ast)
{
unsigned line, column;
getTokenStartPosition(ast->firstToken(), &line, &column);
......@@ -217,7 +217,7 @@ LookupContext FindUsages::currentContext(AST *ast)
if (lastVisibleSymbol && lastVisibleSymbol == _previousContext.symbol())
return _previousContext;
LookupContext ctx(lastVisibleSymbol, _exprDoc, _doc, _snapshot);
DeprecatedLookupContext ctx(lastVisibleSymbol, _exprDoc, _doc, _snapshot);
_previousContext = ctx;
return _previousContext;
}
......@@ -235,7 +235,7 @@ bool FindUsages::visit(MemInitializerAST *ast)
SimpleNameAST *simple = ast->name->asSimpleName();
if (identifier(simple->identifier_token) == _id) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(simple->name);
reportResult(simple->identifier_token, candidates);
}
......@@ -365,7 +365,7 @@ bool FindUsages::visit(EnumeratorAST *ast)
{
const Identifier *id = identifier(ast->identifier_token);
if (id == _id) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(control()->nameId(id));
reportResult(ast->identifier_token, candidates);
}
......@@ -379,7 +379,7 @@ bool FindUsages::visit(SimpleNameAST *ast)
{
const Identifier *id = identifier(ast->identifier_token);
if (id == _id) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
reportResult(ast->identifier_token, candidates);
}
......@@ -391,7 +391,7 @@ bool FindUsages::visit(DestructorNameAST *ast)
{
const Identifier *id = identifier(ast->identifier_token);
if (id == _id) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
reportResult(ast->identifier_token, candidates);
}
......@@ -402,7 +402,7 @@ bool FindUsages::visit(DestructorNameAST *ast)
bool FindUsages::visit(TemplateIdAST *ast)
{
if (_id == identifier(ast->identifier_token)) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
reportResult(ast->identifier_token, candidates);
}
......@@ -478,7 +478,7 @@ bool FindUsages::visit(ObjCSelectorAST *ast)
if (ast->name) {
const Identifier *id = ast->name->identifier();
if (id == _id) {
LookupContext context = currentContext(ast);
DeprecatedLookupContext context = currentContext(ast);
const QList<Symbol *> candidates = context.resolve(ast->name);
reportResult(ast->firstToken(), candidates);
}
......
......@@ -30,7 +30,7 @@
#ifndef FINDUSAGES_H
#define FINDUSAGES_H
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include "CppDocument.h"
#include "CppBindings.h"
#include "Semantic.h"
......@@ -82,7 +82,7 @@ protected:
bool checkScope(Symbol *symbol, Symbol *otherSymbol) const;
void checkExpression(unsigned startToken, unsigned endToken);
LookupContext currentContext(AST *ast);
DeprecatedLookupContext currentContext(AST *ast);
void ensureNameIsValid(NameAST *ast);
......@@ -116,7 +116,7 @@ private:
QList<QualifiedNameAST *> _qualifiedNameStack;
QList<int> _references;
QList<Usage> _usages;
LookupContext _previousContext;
DeprecatedLookupContext _previousContext;
int _inSimpleDeclaration;
bool _inQProperty;
QSet<unsigned> _processed;
......
......@@ -47,7 +47,7 @@ namespace {
class ApplySubstitution
{
public:
ApplySubstitution(const LookupContext &context, Symbol *symbol, const GenTemplateInstance::Substitution &substitution);
ApplySubstitution(const DeprecatedLookupContext &context, Symbol *symbol, const GenTemplateInstance::Substitution &substitution);
~ApplySubstitution();
Control *control() const { return context.control(); }
......@@ -309,14 +309,14 @@ private:
};
public: // attributes
LookupContext context;
DeprecatedLookupContext context;
Symbol *symbol;
GenTemplateInstance::Substitution substitution;
ApplyToType applyToType;
ApplyToName applyToName;
};
ApplySubstitution::ApplySubstitution(const LookupContext &context, Symbol *symbol,
ApplySubstitution::ApplySubstitution(const DeprecatedLookupContext &context, Symbol *symbol,
const GenTemplateInstance::Substitution &substitution)
: context(context), symbol(symbol),
substitution(substitution),
......@@ -363,7 +363,7 @@ FullySpecifiedType ApplySubstitution::applySubstitution(int index) const
} // end of anonymous namespace
GenTemplateInstance::GenTemplateInstance(const LookupContext &context, const Substitution &substitution)
GenTemplateInstance::GenTemplateInstance(const DeprecatedLookupContext &context, const Substitution &substitution)
: _symbol(0),
_context(context),
_substitution(substitution)
......
......@@ -34,7 +34,7 @@
#include <NameVisitor.h>
#include <FullySpecifiedType.h>
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include <QtCore/QList>
#include <QtCore/QPair>
......@@ -47,7 +47,7 @@ public:
typedef QList< QPair<const Identifier *, FullySpecifiedType> > Substitution;
public:
GenTemplateInstance(const LookupContext &context, const Substitution &substitution);
GenTemplateInstance(const DeprecatedLookupContext &context, const Substitution &substitution);
FullySpecifiedType operator()(Symbol *symbol);
......@@ -55,7 +55,7 @@ public:
private:
Symbol *_symbol;
LookupContext _context;
DeprecatedLookupContext _context;
const Substitution _substitution;
};
......
......@@ -28,7 +28,7 @@
**************************************************************************/
#include "ResolveExpression.h"
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include "Overview.h"
#include "GenTemplateInstance.h"
......@@ -71,7 +71,7 @@ static QList<_Tp> removeDuplicates(const QList<_Tp> &results)
/////////////////////////////////////////////////////////////////////
// ResolveExpression
/////////////////////////////////////////////////////////////////////
ResolveExpression::ResolveExpression(const LookupContext &context)
ResolveExpression::ResolveExpression(const DeprecatedLookupContext &context)
: ASTVisitor(context.expressionDocument()->translationUnit()),
_context(context),
sem(context.expressionDocument()->translationUnit())
......@@ -845,7 +845,7 @@ ResolveClass::ResolveClass()
QList<Symbol *> ResolveClass::operator()(const Name *name,
const LookupItem &p,
const LookupContext &context)
const DeprecatedLookupContext &context)
{
const QList<LookupItem> previousBlackList = _blackList;
const QList<Symbol *> symbols = resolveClass(name, p, context);
......@@ -855,7 +855,7 @@ QList<Symbol *> ResolveClass::operator()(const Name *name,
QList<Symbol *> ResolveClass::resolveClass(const Name *name,
const LookupItem &p,
const LookupContext &context)
const DeprecatedLookupContext &context)
{
QList<Symbol *> resolvedSymbols;
......@@ -913,7 +913,7 @@ ResolveObjCClass::ResolveObjCClass()
QList<Symbol *> ResolveObjCClass::operator ()(const Name *name,
const LookupItem &p,
const LookupContext &context)
const DeprecatedLookupContext &context)
{
QList<Symbol *> resolvedSymbols;
......
......@@ -30,7 +30,7 @@
#ifndef CPLUSPLUS_RESOLVEEXPRESSION_H
#define CPLUSPLUS_RESOLVEEXPRESSION_H
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include <ASTVisitor.h>
#include <Semantic.h>
......@@ -41,7 +41,7 @@ namespace CPlusPlus {
class CPLUSPLUS_EXPORT ResolveExpression: protected ASTVisitor
{
public:
ResolveExpression(const LookupContext &context);
ResolveExpression(const DeprecatedLookupContext &context);
virtual ~ResolveExpression();
QList<LookupItem> operator()(ExpressionAST *ast);
......@@ -116,7 +116,7 @@ protected:
QList<Scope *> visibleScopes(const LookupItem &result) const;
private:
LookupContext _context;
DeprecatedLookupContext _context;
Semantic sem;
QList<LookupItem> _results;
Symbol *_declSymbol;
......@@ -129,12 +129,12 @@ public:
QList<Symbol *> operator()(const Name *name,
const LookupItem &p,
const LookupContext &context);
const DeprecatedLookupContext &context);
private:
QList<Symbol *> resolveClass(const Name *name,
const LookupItem &p,
const LookupContext &context);
const DeprecatedLookupContext &context);
private:
QList<LookupItem> _blackList;
......@@ -147,7 +147,7 @@ public:
QList<Symbol *> operator()(const Name *name,
const LookupItem &p,
const LookupContext &context);
const DeprecatedLookupContext &context);
};
......
......@@ -29,7 +29,7 @@
#include "TypeOfExpression.h"
#include <TranslationUnit.h>
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include "ResolveExpression.h"
#include "pp.h"
......@@ -51,7 +51,7 @@ Snapshot TypeOfExpression::snapshot() const
void TypeOfExpression::setSnapshot(const Snapshot &documents)
{
m_snapshot = documents;
m_lookupContext = LookupContext();
m_lookupContext = DeprecatedLookupContext();
}
QList<LookupItem> TypeOfExpression::operator()(const QString &expression,
......@@ -66,7 +66,7 @@ QList<LookupItem> TypeOfExpression::operator()(const QString &expression,
expressionDoc->check();
m_ast = extractExpressionAST(expressionDoc);
m_lookupContext = LookupContext(lastVisibleSymbol, expressionDoc,
m_lookupContext = DeprecatedLookupContext(lastVisibleSymbol, expressionDoc,
document, m_snapshot);
ResolveExpression resolveExpression(m_lookupContext);
......@@ -84,7 +84,7 @@ ExpressionAST *TypeOfExpression::ast() const
return m_ast;
}
const LookupContext &TypeOfExpression::lookupContext() const
const DeprecatedLookupContext &TypeOfExpression::lookupContext() const
{
return m_lookupContext;
}
......
......@@ -30,7 +30,7 @@
#define CPLUSPLUS_TYPEOFEXPRESSION_H
#include "CppDocument.h"
#include "LookupContext.h"
#include "DeprecatedLookupContext.h"
#include <ASTfwd.h>
#include <QtCore/QMap>
......@@ -89,7 +89,7 @@ public:
/**
* Returns the lookup context of the last evaluated expression.
*/
const LookupContext &lookupContext() const;