diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-09-02 11:59:01 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-09-02 12:51:01 +0200 |
commit | c12866a467459f51e33252d5629edb8fbcd2201a (patch) | |
tree | e6f467fb02f751bed515d4348f7aa97119467af5 /src/shared/cplusplus/Scope.cpp | |
parent | 8b2eeb9c5f7f909a7067270854619af708e25e22 (diff) | |
download | qt-creator-c12866a467459f51e33252d5629edb8fbcd2201a.tar.gz |
Merge CPlusPlus::NameId and CPlusPlus::Identifier.
Diffstat (limited to 'src/shared/cplusplus/Scope.cpp')
-rw-r--r-- | src/shared/cplusplus/Scope.cpp | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/src/shared/cplusplus/Scope.cpp b/src/shared/cplusplus/Scope.cpp index 72d2b774aa..bc5eeb90bb 100644 --- a/src/shared/cplusplus/Scope.cpp +++ b/src/shared/cplusplus/Scope.cpp @@ -94,7 +94,6 @@ public: /// Returns the last Symbol in the scope. iterator lastSymbol() const; - Symbol *lookat(const Name *name) const; Symbol *lookat(const Identifier *id) const; Symbol *lookat(int operatorId) const; @@ -157,21 +156,6 @@ void SymbolTable::enterSymbol(Symbol *symbol) } } -Symbol *SymbolTable::lookat(const Name *name) const -{ - if (! name) - return 0; - - else if (const OperatorNameId *opId = name->asOperatorNameId()) - return lookat(opId->kind()); - - else if (const Identifier *id = name->identifier()) - return lookat(id); - - else - return 0; -} - Symbol *SymbolTable::lookat(const Identifier *id) const { if (! _hash || ! id) @@ -183,7 +167,7 @@ Symbol *SymbolTable::lookat(const Identifier *id) const const Name *identity = symbol->unqualifiedName(); if (! identity) { continue; - } else if (const NameId *nameId = identity->asNameId()) { + } else if (const Identifier *nameId = identity->asNameId()) { if (nameId->identifier()->isEqualTo(id)) break; } else if (const TemplateNameId *t = identity->asTemplateNameId()) { @@ -303,9 +287,6 @@ Scope::iterator Scope::firstMember() const Scope::iterator Scope::lastMember() const { return _members ? _members->lastSymbol() : 0; } -Symbol *Scope::find(const Name *name) const -{ return _members ? _members->lookat(name) : 0; } - Symbol *Scope::find(const Identifier *id) const { return _members ? _members->lookat(id) : 0; } |