Commit 0498fb68 authored by Nikolai Kosjar's avatar Nikolai Kosjar

C++: Revert lookup to 3.4.2

...which was least buggy.

The bugs fixed by the changes we revert here (highlighting/completion
for code involving templates) were minor compared to ones we currently
have. Those bugs will be addressed by the clang code model anyway.

Relevant commits were collected via:

  $ cd ${QTC}/src/libs/cplusplus
  $ git log \
   --no-merges \
   --format=oneline \
   v3.4.2..HEAD \
   -- LookupContext.* ResolveExpression.* TypeResolver.* TypeOfExpression.* \
      ../../plugins/cpptools/cppcompletion_test.cpp

From this list the following were skipped due to irrelevance:

  88c5b47e # CppTools: Minor cleanup in completion tests
  e5255a1f # CppTools: Add a test for ObjC not replacing dot with arrow
  5b12c8d6 # CppTools: Support ObjC in member access operator tests
  9fef4fb9 # CPlusPlus: Fix warnings about overriding visit(...) methods

There were only minor conflicts while reverting those.

This changes touches so many files because there were quite some
cleanups and renames after the 3.4.2 release.

Task-number: QTCREATORBUG-14889
Task-number: QTCREATORBUG-15211
Task-number: QTCREATORBUG-15213
Task-number: QTCREATORBUG-15257
Task-number: QTCREATORBUG-15264
Task-number: QTCREATORBUG-15291
Task-number: QTCREATORBUG-15329
Change-Id: I01f759f8f35ecb4228928a4f22086e279c1a5435
Reviewed-by: default avatarMarco Bubke <marco.bubke@theqtcompany.com>
parent c2a2883c
......@@ -3349,7 +3349,7 @@ public:
DeclarationAST *declaration;
public: // annotations
Scope *symbol;
Template *symbol;
public:
TemplateDeclarationAST()
......
......@@ -1917,19 +1917,9 @@ bool Bind::visit(SimpleDeclarationAST *ast)
methodKey = methodKeyForInvokableToken(tokenKind(ast->qt_invokable_token));
// unsigned qt_invokable_token = ast->qt_invokable_token;
const ExpressionAST *declTypeExpression = 0;
bool isTypedef = false;
FullySpecifiedType type;
for (SpecifierListAST *it = ast->decl_specifier_list; it; it = it->next) {
type = this->specifier(it->value, type);
if (type.isTypedef())
isTypedef = true;
type.setTypedef(isTypedef);
if (type.isDecltype()) {
if (DecltypeSpecifierAST *decltypeSpec = it->value->asDecltypeSpecifier())
declTypeExpression = decltypeSpec->expression;
}
}
List<Symbol *> **symbolTail = &ast->symbols;
......@@ -1985,8 +1975,6 @@ bool Bind::visit(SimpleDeclarationAST *ast)
translationUnit()->error(location(declaratorId->name, ast->firstToken()), "auto-initialized variable must have an initializer");
else if (initializer)
decl->setInitializer(asStringLiteral(initializer));
} else if (declTy.isDecltype()) {
decl->setInitializer(asStringLiteral(declTypeExpression));
}
if (_scope->isClass()) {
......@@ -2367,15 +2355,11 @@ bool Bind::visit(ParameterDeclarationAST *ast)
bool Bind::visit(TemplateDeclarationAST *ast)
{
Scope *scope = 0;
if (ast->less_token)
scope = control()->newTemplate(ast->firstToken(), 0);
else
scope = control()->newExplicitInstantiation(ast->firstToken(), 0);
scope->setStartOffset(tokenAt(ast->firstToken()).utf16charsBegin());
scope->setEndOffset(tokenAt(ast->lastToken() - 1).utf16charsEnd());
ast->symbol = scope;
Scope *previousScope = switchScope(scope);
Template *templ = control()->newTemplate(ast->firstToken(), 0);
templ->setStartOffset(tokenAt(ast->firstToken()).utf16charsBegin());
templ->setEndOffset(tokenAt(ast->lastToken() - 1).utf16charsEnd());
ast->symbol = templ;
Scope *previousScope = switchScope(templ);
for (DeclarationListAST *it = ast->template_parameter_list; it; it = it->next) {
this->declaration(it->value);
......@@ -2384,17 +2368,12 @@ bool Bind::visit(TemplateDeclarationAST *ast)
this->declaration(ast->declaration);
(void) switchScope(previousScope);
Symbol *decl = 0;
if (Template *templ = scope->asTemplate())
decl = templ->declaration();
else if (ExplicitInstantiation *inst = scope->asExplicitInstantiation())
decl = inst->declaration();
if (decl) {
scope->setSourceLocation(decl->sourceLocation(), translationUnit());
scope->setName(decl->name());
if (Symbol *decl = templ->declaration()) {
templ->setSourceLocation(decl->sourceLocation(), translationUnit());
templ->setName(decl->name());
}
_scope->addMember(scope);
_scope->addMember(templ);
return false;
}
......@@ -3039,7 +3018,6 @@ bool Bind::visit(TypeofSpecifierAST *ast)
bool Bind::visit(DecltypeSpecifierAST *ast)
{
_type = this->expression(ast->expression);
_type.setDecltype(true);
return false;
}
......
......@@ -112,7 +112,6 @@ class Function;
class Namespace;
class NamespaceAlias;
class Template;
class ExplicitInstantiation;
class BaseClass;
class Block;
class Class;
......
......@@ -366,16 +366,9 @@ public:
Template *newTemplate(unsigned sourceLocation, const Name *name)
{
Template *templ = new Template(translationUnit, sourceLocation, name);
symbols.push_back(templ);
return templ;
}
ExplicitInstantiation *newExplicitInstantiation(unsigned sourceLocation, const Name *name)
{
ExplicitInstantiation *inst = new ExplicitInstantiation(translationUnit, sourceLocation, name);
symbols.push_back(inst);
return inst;
Template *ns = new Template(translationUnit, sourceLocation, name);
symbols.push_back(ns);
return ns;
}
NamespaceAlias *newNamespaceAlias(unsigned sourceLocation, const Name *name)
......@@ -699,9 +692,6 @@ Namespace *Control::newNamespace(unsigned sourceLocation, const Name *name)
Template *Control::newTemplate(unsigned sourceLocation, const Name *name)
{ return d->newTemplate(sourceLocation, name); }
ExplicitInstantiation *Control::newExplicitInstantiation(unsigned sourceLocation, const Name *name)
{ return d->newExplicitInstantiation(sourceLocation, name); }
NamespaceAlias *Control::newNamespaceAlias(unsigned sourceLocation, const Name *name)
{ return d->newNamespaceAlias(sourceLocation, name); }
......
......@@ -120,9 +120,6 @@ public:
/// Creates a new Template symbol.
Template *newTemplate(unsigned sourceLocation, const Name *name = 0);
/// Creates a new ExplicitInstantiation symbol.
ExplicitInstantiation *newExplicitInstantiation(unsigned sourceLocation, const Name *name = 0);
/// Creates a new Namespace symbol.
NamespaceAlias *newNamespaceAlias(unsigned sourceLocation, const Name *name = 0);
......
......@@ -100,12 +100,6 @@ bool FullySpecifiedType::isAuto() const
void FullySpecifiedType::setAuto(bool isAuto)
{ f._isAuto = isAuto; }
bool FullySpecifiedType::isDecltype() const
{ return f._isDecltype; }
void FullySpecifiedType::setDecltype(bool isDecltype)
{ f._isDecltype = isDecltype; }
bool FullySpecifiedType::isRegister() const
{ return f._isRegister; }
......
......@@ -58,9 +58,6 @@ public:
bool isAuto() const;
void setAuto(bool isAuto);
bool isDecltype() const;
void setDecltype(bool isDecltype);
bool isRegister() const;
void setRegister(bool isRegister);
......@@ -128,7 +125,6 @@ private:
// storage class specifiers
unsigned _isFriend: 1;
unsigned _isAuto: 1;
unsigned _isDecltype: 1;
unsigned _isRegister: 1;
unsigned _isStatic: 1;
unsigned _isExtern: 1;
......
......@@ -218,17 +218,6 @@ bool Matcher::match(const Template *type, const Template *otherType)
return true;
}
bool Matcher::match(const ExplicitInstantiation *type, const ExplicitInstantiation *otherType)
{
if (type == otherType)
return true;
if (! Matcher::match(type->name(), otherType->name(), this))
return false;
return true;
}
bool Matcher::match(const ForwardClassDeclaration *type, const ForwardClassDeclaration *otherType)
{
if (type == otherType)
......
......@@ -61,7 +61,6 @@ public:
virtual bool match(const Enum *type, const Enum *otherType);
virtual bool match(const Namespace *type, const Namespace *otherType);
virtual bool match(const Template *type, const Template *otherType);
virtual bool match(const ExplicitInstantiation *type, const ExplicitInstantiation *otherType);
virtual bool match(const ForwardClassDeclaration *type, const ForwardClassDeclaration *otherType);
virtual bool match(const Class *type, const Class *otherType);
virtual bool match(const ObjCClass *type, const ObjCClass *otherType);
......
......@@ -100,7 +100,7 @@ public:
TemplateArgumentIterator firstTemplateArgument() const { return _templateArguments.begin(); }
TemplateArgumentIterator lastTemplateArgument() const { return _templateArguments.end(); }
bool isSpecialization() const { return _isSpecialization; }
// this is temporary solution needed in LookupScope::nestedType
// this is temporary solution needed in ClassOrNamespace::nestedType
// when we try to find correct specialization for instantiation
void setIsSpecialization(bool isSpecialization) { _isSpecialization = isSpecialization; }
......
......@@ -215,7 +215,7 @@ unsigned SymbolTable::symbolCount() const
Symbol *SymbolTable::symbolAt(unsigned index) const
{
if (! _symbols || index >= symbolCount())
if (! _symbols)
return 0;
return _symbols[index];
}
......
......@@ -361,9 +361,6 @@ bool Symbol::isNamespace() const
bool Symbol::isTemplate() const
{ return asTemplate() != 0; }
bool Symbol::isExplicitInstantiation() const
{ return asExplicitInstantiation() != 0; }
bool Symbol::isClass() const
{ return asClass() != 0; }
......
......@@ -135,7 +135,7 @@ public:
/// Returns true if this Symbol is an Enum.
bool isEnum() const;
/// Returns true if this Symbol is a Function.
/// Returns true if this Symbol is an Function.
bool isFunction() const;
/// Returns true if this Symbol is a Namespace.
......@@ -144,9 +144,6 @@ public:
/// Returns true if this Symbol is a Template.
bool isTemplate() const;
/// Returns true if this Symbol is an ExplicitInstantiation.
bool isExplicitInstantiation() const;
/// Returns true if this Symbol is a Class.
bool isClass() const;
......@@ -206,7 +203,6 @@ public:
virtual const Function *asFunction() const { return 0; }
virtual const Namespace *asNamespace() const { return 0; }
virtual const Template *asTemplate() const { return 0; }
virtual const ExplicitInstantiation *asExplicitInstantiation() const { return 0; }
virtual const NamespaceAlias *asNamespaceAlias() const { return 0; }
virtual const Class *asClass() const { return 0; }
virtual const Block *asBlock() const { return 0; }
......@@ -233,7 +229,6 @@ public:
virtual Function *asFunction() { return 0; }
virtual Namespace *asNamespace() { return 0; }
virtual Template *asTemplate() { return 0; }
virtual ExplicitInstantiation *asExplicitInstantiation() { return 0; }
virtual NamespaceAlias *asNamespaceAlias() { return 0; }
virtual Class *asClass() { return 0; }
virtual Block *asBlock() { return 0; }
......
......@@ -51,7 +51,6 @@ public:
virtual bool visit(Function *) { return true; }
virtual bool visit(Namespace *) { return true; }
virtual bool visit(Template *) { return true; }
virtual bool visit(ExplicitInstantiation *) { return true; }
virtual bool visit(Class *) { return true; }
virtual bool visit(Block *) { return true; }
virtual bool visit(ForwardClassDeclaration *) { return true; }
......
......@@ -481,12 +481,10 @@ void Enum::visitSymbol0(SymbolVisitor *visitor)
Template::Template(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name)
: Scope(translationUnit, sourceLocation, name)
, _isExplicitInstantiation(false)
{ }
Template::Template(Clone *clone, Subst *subst, Template *original)
: Scope(clone, subst, original)
, _isExplicitInstantiation(original->_isExplicitInstantiation)
{ }
Template::~Template()
......@@ -539,56 +537,6 @@ bool Template::match0(const Type *otherType, Matcher *matcher) const
return false;
}
ExplicitInstantiation::ExplicitInstantiation(TranslationUnit *translationUnit,
unsigned sourceLocation, const Name *name)
: Scope(translationUnit, sourceLocation, name)
{ }
ExplicitInstantiation::ExplicitInstantiation(Clone *clone, Subst *subst, ExplicitInstantiation *original)
: Scope(clone, subst, original)
{ }
ExplicitInstantiation::~ExplicitInstantiation()
{ }
Symbol *ExplicitInstantiation::declaration() const
{
if (isEmpty())
return 0;
if (Symbol *s = memberAt(memberCount() - 1)) {
if (s->isClass() || s->isForwardClassDeclaration() ||
s->isTemplate() || s->isExplicitInstantiation() ||
s->isFunction() || s->isDeclaration()) {
return s;
}
}
return 0;
}
FullySpecifiedType ExplicitInstantiation::type() const
{ return FullySpecifiedType(const_cast<ExplicitInstantiation *>(this)); }
void ExplicitInstantiation::visitSymbol0(SymbolVisitor *visitor)
{
if (visitor->visit(this)) {
for (unsigned i = 0; i < memberCount(); ++i) {
visitSymbol(memberAt(i), visitor);
}
}
}
void ExplicitInstantiation::accept0(TypeVisitor *visitor)
{ visitor->visit(this); }
bool ExplicitInstantiation::match0(const Type *otherType, Matcher *matcher) const
{
if (const ExplicitInstantiation *otherTy = otherType->asExplicitInstantiationType())
return matcher->match(this, otherTy);
return false;
}
Namespace::Namespace(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name)
: Scope(translationUnit, sourceLocation, name)
, _isInline(false)
......
......@@ -423,41 +423,8 @@ protected:
virtual void visitSymbol0(SymbolVisitor *visitor);
virtual void accept0(TypeVisitor *visitor);
virtual bool match0(const Type *otherType, Matcher *matcher) const;
private:
bool _isExplicitInstantiation;
};
class CPLUSPLUS_EXPORT ExplicitInstantiation : public Scope, public Type
{
public:
ExplicitInstantiation(TranslationUnit *translationUnit, unsigned sourceLocation, const Name *name);
ExplicitInstantiation(Clone *clone, Subst *subst, ExplicitInstantiation *original);
virtual ~ExplicitInstantiation();
Symbol *declaration() const;
// Symbol's interface
virtual FullySpecifiedType type() const;
virtual const ExplicitInstantiation *asExplicitInstantiation() const
{ return this; }
virtual ExplicitInstantiation *asExplicitInstantiation()
{ return this; }
// Type's interface
virtual const ExplicitInstantiation *asExplicitInstantiationType() const
{ return this; }
virtual ExplicitInstantiation *asExplicitInstantiationType()
{ return this; }
protected:
virtual void visitSymbol0(SymbolVisitor *visitor);
virtual void accept0(TypeVisitor *visitor);
virtual bool match0(const Type *otherType, Matcher *matcher) const;
};
class CPLUSPLUS_EXPORT Namespace: public Scope, public Type
{
......
......@@ -125,12 +125,6 @@ void CloneType::visit(Template *type)
_type = templ;
}
void CloneType::visit(ExplicitInstantiation *type)
{
ExplicitInstantiation *inst = _clone->symbol(type, _subst)->asExplicitInstantiation();
_type = inst;
}
void CloneType::visit(Class *type)
{
Class *klass = _clone->symbol(type, _subst)->asClass();
......@@ -194,8 +188,10 @@ Symbol *CloneSymbol::cloneSymbol(Symbol *symbol, Subst *subst)
SymbolSubstPair symbolSubstPair = std::make_pair(symbol, subst);
auto it = _cache.find(symbolSubstPair);
if (it != _cache.end())
return it->second;
if (it != _cache.end()) {
if (it->second->enclosingScope() == symbol->enclosingScope())
return it->second;
}
Symbol *r = 0;
std::swap(_subst, subst);
......@@ -297,14 +293,6 @@ bool CloneSymbol::visit(Template *symbol)
return false;
}
bool CloneSymbol::visit(ExplicitInstantiation *symbol)
{
ExplicitInstantiation *inst = new ExplicitInstantiation(_clone, _subst, symbol);
_symbol = inst;
_control->addSymbol(inst);
return false;
}
bool CloneSymbol::visit(Class *symbol)
{
Class *klass = new Class(_clone, _subst, symbol);
......
......@@ -85,7 +85,6 @@ protected:
virtual void visit(Function *type);
virtual void visit(Namespace *type);
virtual void visit(Template *type);
virtual void visit(ExplicitInstantiation *type);
virtual void visit(Class *type);
virtual void visit(Enum *type);
virtual void visit(ForwardClassDeclaration *type);
......@@ -153,7 +152,6 @@ protected:
virtual bool visit(Function *symbol);
virtual bool visit(Namespace *symbol);
virtual bool visit(Template *symbol);
virtual bool visit(ExplicitInstantiation *symbol);
virtual bool visit(Class *symbol);
virtual bool visit(Block *symbol);
virtual bool visit(ForwardClassDeclaration *symbol);
......
......@@ -68,9 +68,6 @@ bool Type::isNamespaceType() const
bool Type::isTemplateType() const
{ return asTemplateType() != 0; }
bool Type::isExplicitInstantiationType() const
{ return asExplicitInstantiationType() != 0; }
bool Type::isClassType() const
{ return asClassType() != 0; }
......
......@@ -43,7 +43,6 @@ public:
bool isFunctionType() const;
bool isNamespaceType() const;
bool isTemplateType() const;
bool isExplicitInstantiationType() const;
bool isClassType() const;
bool isEnumType() const;
bool isForwardClassDeclarationType() const;
......@@ -65,7 +64,6 @@ public:
virtual const Function *asFunctionType() const { return 0; }
virtual const Namespace *asNamespaceType() const { return 0; }
virtual const Template *asTemplateType() const { return 0; }
virtual const ExplicitInstantiation *asExplicitInstantiationType() const { return 0; }
virtual const Class *asClassType() const { return 0; }
virtual const Enum *asEnumType() const { return 0; }
virtual const ForwardClassDeclaration *asForwardClassDeclarationType() const { return 0; }
......@@ -87,7 +85,6 @@ public:
virtual Function *asFunctionType() { return 0; }
virtual Namespace *asNamespaceType() { return 0; }
virtual Template *asTemplateType() { return 0; }
virtual ExplicitInstantiation *asExplicitInstantiationType() { return 0; }
virtual Class *asClassType() { return 0; }
virtual Enum *asEnumType() { return 0; }
virtual ForwardClassDeclaration *asForwardClassDeclarationType() { return 0; }
......
......@@ -51,7 +51,6 @@ public:
virtual void visit(Function *) {}
virtual void visit(Namespace *) {}
virtual void visit(Template *) {}
virtual void visit(ExplicitInstantiation *) {}
virtual void visit(Class *) {}
virtual void visit(Enum *) {}
virtual void visit(ForwardClassDeclaration *) {}
......
......@@ -379,7 +379,7 @@ FullySpecifiedType SubstitutionMap::apply(const Name *name, Rewrite *) const
}
UseMinimalNames::UseMinimalNames(LookupScope *target)
UseMinimalNames::UseMinimalNames(ClassOrNamespace *target)
: _target(target)
{
......
......@@ -89,13 +89,13 @@ private:
class CPLUSPLUS_EXPORT UseMinimalNames: public Substitution
{
public:
UseMinimalNames(LookupScope *target);
UseMinimalNames(ClassOrNamespace *target);
virtual ~UseMinimalNames();
virtual FullySpecifiedType apply(const Name *name, Rewrite *rewrite) const;
private:
LookupScope *_target;
ClassOrNamespace *_target;
};
class CPLUSPLUS_EXPORT UseQualifiedNames: public UseMinimalNames
......
This diff is collapsed.
......@@ -28,41 +28,36 @@
**
****************************************************************************/
#ifndef TYPERESOLVER_H
#define TYPERESOLVER_H
#ifndef CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H
#define CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H
#include "LookupContext.h"
#include <cplusplus/TypeVisitor.h>
#include <cplusplus/NameVisitor.h>
#include <cplusplus/FullySpecifiedType.h>
#include <QList>
#include <QPair>
#include <QSharedPointer>
namespace CPlusPlus {
class TypeResolver
class CPLUSPLUS_EXPORT DeprecatedGenTemplateInstance
{
public:
TypeResolver(CreateBindings &factory) : _factory(factory) {}
void resolve(FullySpecifiedType *type, Scope **scope, LookupScope *binding);
static QList<LookupItem> resolveDeclInitializer(
CreateBindings &factory, const Declaration *decl,
const QSet<const Declaration *> &declarationsBeingResolved,
const Identifier *id = 0);
private:
NamedType *getNamedType(FullySpecifiedType& type) const;
QList<LookupItem> getNamedTypeItems(const Name *name, Scope *scope,
LookupScope *binding) const;
typedef QList< QPair<const Identifier *, FullySpecifiedType> > Substitution;
static QList<LookupItem> typedefsFromScopeUpToFunctionScope(const Name *name, Scope *scope);
static bool isTypedefWithName(const Declaration *declaration, const Name *name);
public:
static FullySpecifiedType instantiate(const Name *className, Symbol *candidate, QSharedPointer<Control> control);
bool findTypedef(const QList<LookupItem>& namedTypeItems, FullySpecifiedType *type,
Scope **scope, QSet<Symbol *>& visited);
private:
DeprecatedGenTemplateInstance(QSharedPointer<Control> control, const Substitution &substitution);
FullySpecifiedType gen(Symbol *symbol);
CreateBindings &_factory;
// binding has to be remembered in case of resolving typedefs for templates
LookupScope *_binding;
private:
QSharedPointer<Control> _control;
const Substitution _substitution;
};
} // namespace CPlusPlus
#endif // TYPERESOLVER_H
#endif // CPLUSPLUS_DEPRECATEDGENTEMPLATEINSTANCE_H
......@@ -532,7 +532,7 @@ void FindUsages::memInitializer(MemInitializerAST *ast)
if (_currentScope->isFunction()) {
Class *classScope = _currentScope->enclosingClass();
if (! classScope) {
if (LookupScope *binding = _context.lookupType(_currentScope)) {
if (ClassOrNamespace *binding = _context.lookupType(_currentScope)) {
foreach (Symbol *s, binding->symbols()) {
if (Class *k = s->asClass()) {
classScope = k;
......
This diff is collapsed.
This diff is collapsed.
......@@ -77,10 +77,10 @@ Scope *LookupItem::scope() const
void LookupItem::setScope(Scope *scope)
{ _scope = scope; }
LookupScope *LookupItem::binding() const
ClassOrNamespace *LookupItem::binding() const
{ return _binding; }
void LookupItem::setBinding(LookupScope *binding)
void LookupItem::setBinding(ClassOrNamespace *binding)
{ _binding = binding; }
bool LookupItem::operator == (const LookupItem &other) const
......
......@@ -37,7 +37,7 @@
namespace CPlusPlus {
class LookupScope;
class ClassOrNamespace;
class CPLUSPLUS_EXPORT LookupItem
{
......@@ -63,8 +63,8 @@ public:
/// Sets this item's scope.
void setScope(Scope *scope);
LookupScope *binding() const;
void setBinding(LookupScope *binding);
ClassOrNamespace *binding() const;
void setBinding(ClassOrNamespace *binding);
bool operator == (const LookupItem &other) const;
bool operator != (const LookupItem &other) const;
......@@ -73,7 +73,7 @@ private:
FullySpecifiedType _type;
Scope *_scope;
Symbol *_declaration;
LookupScope *_binding;
ClassOrNamespace *_binding;
};
uint qHash(const CPlusPlus::LookupItem &result);
......
This diff is collapsed.
......@@ -53,25 +53,26 @@ public:
QList<LookupItem> resolve(ExpressionAST *ast, Scope *scope, bool ref = false);
QList<LookupItem> reference(ExpressionAST *ast, Scope *scope);
LookupScope *baseExpression(const QList<LookupItem> &baseResults,
ClassOrNamespace *baseExpression(const QList<LookupItem> &baseResults,
int accessOp,
bool *replacedDotOperator = 0) const;
const LookupContext &context() const;
protected:
LookupScope *findClass(const FullySpecifiedType &ty, Scope *scope,
LookupScope *enclosingBinding = 0) const;
ClassOrNamespace *findClass(const FullySpecifiedType &ty, Scope *scope,
ClassOrNamespace *enclosingBinding = 0) const;
QList<LookupItem> expression(ExpressionAST *ast);
QList<LookupItem> switchResults(const QList<LookupItem> &symbols);
FullySpecifiedType instantiate(const Name *className, Symbol *candidate) const;
QList<LookupItem> getMembers(LookupScope *binding, const Name *memberName) const;
QList<LookupItem> getMembers(ClassOrNamespace *binding, const Name *memberName) const;
void thisObject();
void addResult(const FullySpecifiedType &ty, Scope *scope, LookupScope *binding = 0);
void addResult(const FullySpecifiedType &ty, Scope *scope, ClassOrNamespace *binding = 0);
void addResults(const QList<Symbol *> &symbols);
void addResults(const QList<LookupItem> &items);
......@@ -125,6 +126,10 @@ protected: