C++: Fix names of functions dealing with enclosing scopes

...in order to better tell apart the type related functions
isScope()/asScope() and the functions dealing with enclosing scopes:

    * scope() --> enclosingScope()
    * setScope() --> setEnclosingScope()
    * resetScope() --> resetEnclosingScope()

Change-Id: Id743a7d1b6a1a1a0ffcd8568cbd8ebbdfc16eaa1
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
This commit is contained in:
Nikolai Kosjar
2013-07-08 15:28:07 +02:00
parent 42e0e229af
commit f7e26babba
9 changed files with 29 additions and 35 deletions

View File

@@ -256,7 +256,7 @@ QList<LookupItem> LookupContext::lookupByUsing(const Name *name, Scope *scope) c
// if it is not a global scope(scope of scope is not equal 0)
// then add current using declaration as a candidate
if (scope->scope()) {
if (scope->enclosingScope()) {
LookupItem item;
item.setDeclaration(u);
item.setScope(scope);
@@ -1087,7 +1087,7 @@ ClassOrNamespace *ClassOrNamespace::nestedType(const Name *name, ClassOrNamespac
foreach (Symbol *s, reference->symbols()) {
Symbol *clone = cloner.symbol(s, &subst);
clone->setScope(s->scope());
clone->setEnclosingScope(s->enclosingScope());
instantiation->_symbols.append(clone);
#ifdef DEBUG_LOOKUP
Overview oo;oo.showFunctionSignatures = true;
@@ -1242,7 +1242,7 @@ void ClassOrNamespace::NestedClassInstantiator::instantiate(ClassOrNamespace *en
foreach (Symbol *s, nestedClassOrNamespace->_symbols) {
Symbol *clone = _cloner.symbol(s, &_subst);
if (!clone->enclosingScope()) // Not from the cache but just cloned.
clone->setScope(s->enclosingScope());
clone->setEnclosingScope(s->enclosingScope());
nestedClassOrNamespaceInstantiation->_symbols.append(clone);
}
}