summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus
diff options
context:
space:
mode:
authorRoberto Raggi <roberto.raggi@nokia.com>2010-08-26 16:16:22 +0200
committerRoberto Raggi <roberto.raggi@nokia.com>2010-08-26 16:16:22 +0200
commit05f2fd666902e7246b7110187d4964644291e26f (patch)
tree26184894891d998e8e88e8826e3c3425ec7a9244 /src/shared/cplusplus
parent688d382ad947df8f4406d10846da0751839d61d1 (diff)
downloadqt-creator-05f2fd666902e7246b7110187d4964644291e26f.tar.gz
Renamed Symbol::scope() to Symbol::enclosingScope().
Diffstat (limited to 'src/shared/cplusplus')
-rw-r--r--src/shared/cplusplus/Scope.cpp2
-rw-r--r--src/shared/cplusplus/Symbol.cpp14
-rw-r--r--src/shared/cplusplus/Symbol.h4
3 files changed, 10 insertions, 10 deletions
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp
index e5bfee9e1c..72d2b774aa 100644
--- a/src/shared/cplusplus/Scope.cpp
+++ b/src/shared/cplusplus/Scope.cpp
@@ -143,7 +143,7 @@ void SymbolTable::enterSymbol(Symbol *symbol)
_symbols = reinterpret_cast<Symbol **>(realloc(_symbols, sizeof(Symbol *) * _allocatedSymbols));
}
- assert(! symbol->_scope || symbol->scope() == _owner);
+ assert(! symbol->_scope || symbol->enclosingScope() == _owner);
symbol->_index = _symbolCount;
symbol->_scope = _owner;
_symbols[_symbolCount] = symbol;
diff --git a/src/shared/cplusplus/Symbol.cpp b/src/shared/cplusplus/Symbol.cpp
index 40d51c65ca..4bc78da935 100644
--- a/src/shared/cplusplus/Symbol.cpp
+++ b/src/shared/cplusplus/Symbol.cpp
@@ -233,7 +233,7 @@ const Identifier *Symbol::identifier() const
return 0;
}
-Scope *Symbol::scope() const
+Scope *Symbol::enclosingScope() const
{ return _scope; }
void Symbol::setScope(Scope *scope)
@@ -244,7 +244,7 @@ void Symbol::setScope(Scope *scope)
Namespace *Symbol::enclosingNamespace() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Namespace *ns = s->asNamespace())
return ns;
}
@@ -253,7 +253,7 @@ Namespace *Symbol::enclosingNamespace() const
Template *Symbol::enclosingTemplate() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Template *templ = s->asTemplate())
return templ;
}
@@ -262,7 +262,7 @@ Template *Symbol::enclosingTemplate() const
Class *Symbol::enclosingClass() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Class *klass = s->asClass())
return klass;
}
@@ -271,7 +271,7 @@ Class *Symbol::enclosingClass() const
Enum *Symbol::enclosingEnum() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Enum *e = s->asEnum())
return e;
}
@@ -280,7 +280,7 @@ Enum *Symbol::enclosingEnum() const
Function *Symbol::enclosingFunction() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Function *fun = s->asFunction())
return fun;
}
@@ -289,7 +289,7 @@ Function *Symbol::enclosingFunction() const
Block *Symbol::enclosingBlock() const
{
- for (Scope *s = _scope; s; s = s->scope()) {
+ for (Scope *s = _scope; s; s = s->enclosingScope()) {
if (Block *block = s->asBlock())
return block;
}
diff --git a/src/shared/cplusplus/Symbol.h b/src/shared/cplusplus/Symbol.h
index 3781305fd9..96d8707cdb 100644
--- a/src/shared/cplusplus/Symbol.h
+++ b/src/shared/cplusplus/Symbol.h
@@ -287,7 +287,7 @@ public:
void setUnavailable(bool isUnavailable);
/// Returns this Symbol's eclosing scope.
- Scope *scope() const;
+ Scope *enclosingScope() const;
/// Returns the eclosing namespace scope.
Namespace *enclosingNamespace() const;
@@ -307,7 +307,7 @@ public:
/// Returns the enclosing Block scope.
Block *enclosingBlock() const;
- void setScope(Scope *scope); // ### make me private
+ void setScope(Scope *enclosingScope); // ### make me private
void setSourceLocation(unsigned sourceLocation, TranslationUnit *translationUnit); // ### make me private
void visitSymbol(SymbolVisitor *visitor);