C++: Handle recursive using/typedef declarations

Remember using/typedef declarations we have already looked up and
stop if we try it again.

Change-Id: I91bf0aef4df18539a47d015f0113543aef1f692a
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-06-11 10:22:10 +02:00
parent 8f1b665667
commit 50a900e509
4 changed files with 155 additions and 4 deletions

View File

@@ -289,7 +289,9 @@ public:
QList<LookupItem> lookup(const Name *name, Scope *scope) const;
ClassOrNamespace *lookupType(const Name *name, Scope *scope,
ClassOrNamespace* enclosingTemplateInstantiation = 0) const;
ClassOrNamespace* enclosingTemplateInstantiation = 0,
QSet<const Declaration *> typedefsBeingResolved
= QSet<const Declaration *>()) const;
ClassOrNamespace *lookupType(Symbol *symbol,
ClassOrNamespace* enclosingTemplateInstantiation = 0) const;
ClassOrNamespace *lookupParent(Symbol *symbol) const;