C++: fix support for nested anonymous class

The case when anonymous class is inside function. Fixed:
* highlighting
* completion

Task-number: QTCREATORBUG-11711
Change-Id: Ic8fc5fdfb1aed62a74bf148ab7ed449d08214dda
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
This commit is contained in:
Przemyslaw Gorszkowski
2014-03-14 08:24:54 +01:00
committed by Erik Verbruggen
parent 31cad45c0e
commit 6bf75acac7
4 changed files with 45 additions and 1 deletions

View File

@@ -1630,7 +1630,8 @@ bool CreateBindings::visit(Block *block)
// nested ClassOrNamespaces)
if (! _currentClassOrNamespace->_blocks.empty()
|| ! _currentClassOrNamespace->_classOrNamespaces.empty()
|| ! _currentClassOrNamespace->_enums.empty()) {
|| ! _currentClassOrNamespace->_enums.empty()
|| ! _currentClassOrNamespace->_anonymouses.empty()) {
previous->_blocks[block] = binding;
_entities.append(binding);
} else {