C++: Fix nested type resolving in member functions

Task-number: QTCREATORBUG-13976
Task-number: QTCREATORBUG-13978
Change-Id: I598f9cb99ffd044abfc6ed9aa16d4a3045985008
Reviewed-by: Przemyslaw Gorszkowski <pgorszkowski@gmail.com>
This commit is contained in:
Orgad Shaneh
2015-03-04 10:59:19 +02:00
committed by Orgad Shaneh
parent 0b996210f6
commit 93f57a99a1
2 changed files with 37 additions and 1 deletions

View File

@@ -1705,11 +1705,14 @@ bool CreateBindings::visit(Declaration *decl)
bool CreateBindings::visit(Function *function)
{
ClassOrNamespace *previous = _currentClassOrNamespace;
_currentClassOrNamespace = lookupType(function, previous);
for (unsigned i = 0, count = function->memberCount(); i < count; ++i) {
Symbol *s = function->memberAt(i);
if (Block *b = s->asBlock())
visit(b);
}
_currentClassOrNamespace = previous;
return false;
}