Commit cf4ae8c6 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

C++: Forward-declare NestedClassInstantiator



It is only used in LookupContext.cpp

Change-Id: I7b1b4a634fea8560102f2c17afcaacd2773de98a
Reviewed-by: default avatarNikolai Kosjar <nikolai.kosjar@theqtcompany.com>
parent afcf2afe
......@@ -538,6 +538,28 @@ ClassOrNamespace *LookupContext::lookupParent(Symbol *symbol) const
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)
: _factory(factory)
, _parent(parent)
......
......@@ -161,27 +161,7 @@ private:
Class *_rootClass;
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;
};
class NestedClassInstantiator;
public:
const Name *_name; // For debug
......
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