forked from qt-creator/qt-creator
C++: Forward-declare NestedClassInstantiator
It is only used in LookupContext.cpp Change-Id: I7b1b4a634fea8560102f2c17afcaacd2773de98a Reviewed-by: Nikolai Kosjar <nikolai.kosjar@theqtcompany.com>
This commit is contained in:
committed by
Orgad Shaneh
parent
afcf2afe5a
commit
cf4ae8c63f
@@ -538,6 +538,28 @@ ClassOrNamespace *LookupContext::lookupParent(Symbol *symbol) const
|
|||||||
return binding;
|
return binding;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
class ClassOrNamespace::NestedClassInstantiator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NestedClassInstantiator(CreateBindings *factory, Clone &cloner, Subst &subst)
|
||||||
|
: _factory(factory)
|
||||||
|
, _cloner(cloner)
|
||||||
|
, _subst(subst)
|
||||||
|
{}
|
||||||
|
void instantiate(ClassOrNamespace *enclosingTemplateClass,
|
||||||
|
ClassOrNamespace *enclosingTemplateClassInstantiation);
|
||||||
|
private:
|
||||||
|
bool isInstantiateNestedClassNeeded(const QList<Symbol *> &symbols) const;
|
||||||
|
bool containsTemplateType(Declaration *declaration) const;
|
||||||
|
bool containsTemplateType(Function *function) const;
|
||||||
|
NamedType *findNamedType(Type *memberType) const;
|
||||||
|
|
||||||
|
QSet<ClassOrNamespace *> _alreadyConsideredNestedClassInstantiations;
|
||||||
|
CreateBindings *_factory;
|
||||||
|
Clone &_cloner;
|
||||||
|
Subst &_subst;
|
||||||
|
};
|
||||||
|
|
||||||
ClassOrNamespace::ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent)
|
ClassOrNamespace::ClassOrNamespace(CreateBindings *factory, ClassOrNamespace *parent)
|
||||||
: _factory(factory)
|
: _factory(factory)
|
||||||
, _parent(parent)
|
, _parent(parent)
|
||||||
|
@@ -161,27 +161,7 @@ private:
|
|||||||
|
|
||||||
Class *_rootClass;
|
Class *_rootClass;
|
||||||
|
|
||||||
class NestedClassInstantiator
|
class NestedClassInstantiator;
|
||||||
{
|
|
||||||
public:
|
|
||||||
NestedClassInstantiator(CreateBindings *factory, Clone &cloner, Subst &subst)
|
|
||||||
: _factory(factory)
|
|
||||||
, _cloner(cloner)
|
|
||||||
, _subst(subst)
|
|
||||||
{}
|
|
||||||
void instantiate(ClassOrNamespace *enclosingTemplateClass,
|
|
||||||
ClassOrNamespace *enclosingTemplateClassInstantiation);
|
|
||||||
private:
|
|
||||||
bool isInstantiateNestedClassNeeded(const QList<Symbol *> &symbols) const;
|
|
||||||
bool containsTemplateType(Declaration *declaration) const;
|
|
||||||
bool containsTemplateType(Function *function) const;
|
|
||||||
NamedType *findNamedType(Type *memberType) const;
|
|
||||||
|
|
||||||
QSet<ClassOrNamespace *> _alreadyConsideredNestedClassInstantiations;
|
|
||||||
CreateBindings *_factory;
|
|
||||||
Clone &_cloner;
|
|
||||||
Subst &_subst;
|
|
||||||
};
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
const Name *_name; // For debug
|
const Name *_name; // For debug
|
||||||
|
Reference in New Issue
Block a user