diff options
author | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-11 11:26:27 +0200 |
---|---|---|
committer | Roberto Raggi <roberto.raggi@nokia.com> | 2010-05-11 11:27:10 +0200 |
commit | 17fd33bdabe4b7c72b1f268767968dd945089335 (patch) | |
tree | 708e04d2717ce4cf51a20f71030f83a6788f05f2 /src/libs/cplusplus/LookupItem.cpp | |
parent | 37fde0c9d4791a2b39da03d66bad3f6dba1a185d (diff) |
Store the declaration (if any) associated with the LookupItem.
Diffstat (limited to 'src/libs/cplusplus/LookupItem.cpp')
-rw-r--r-- | src/libs/cplusplus/LookupItem.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/libs/cplusplus/LookupItem.cpp b/src/libs/cplusplus/LookupItem.cpp index c5e43674ef..a4ddfa77b7 100644 --- a/src/libs/cplusplus/LookupItem.cpp +++ b/src/libs/cplusplus/LookupItem.cpp @@ -44,11 +44,11 @@ uint CPlusPlus::qHash(const CPlusPlus::LookupItem &key) } LookupItem::LookupItem() - : _lastVisibleSymbol(0) + : _lastVisibleSymbol(0), _declaration(0) { } -LookupItem::LookupItem(const FullySpecifiedType &type, Symbol *lastVisibleSymbol) - : _type(type), _lastVisibleSymbol(lastVisibleSymbol) +LookupItem::LookupItem(const FullySpecifiedType &type, Symbol *lastVisibleSymbol, Symbol *declaration) + : _type(type), _lastVisibleSymbol(lastVisibleSymbol), _declaration(declaration) { } FullySpecifiedType LookupItem::type() const @@ -57,6 +57,12 @@ FullySpecifiedType LookupItem::type() const void LookupItem::setType(const FullySpecifiedType &type) { _type = type; } +Symbol *LookupItem::declaration() const +{ return _declaration; } + +void LookupItem::setDeclaration(Symbol *declaration) +{ _declaration = declaration; } + Symbol *LookupItem::lastVisibleSymbol() const { return _lastVisibleSymbol; } @@ -65,8 +71,8 @@ void LookupItem::setLastVisibleSymbol(Symbol *symbol) bool LookupItem::operator == (const LookupItem &other) const { - if (_type == other._type) - return _lastVisibleSymbol == other._lastVisibleSymbol; + if (_type == other._type && _declaration == other._declaration && _lastVisibleSymbol == other._lastVisibleSymbol) + return true; return false; } |