forked from qt-creator/qt-creator
FullySpecifiedType::simplified() strips references from the type.
This commit is contained in:
@@ -201,4 +201,12 @@ bool FullySpecifiedType::operator < (const FullySpecifiedType &other) const
|
||||
return _type < other._type;
|
||||
}
|
||||
|
||||
FullySpecifiedType FullySpecifiedType::simplified() const
|
||||
{
|
||||
if (const ReferenceType *refTy = type()->asReferenceType())
|
||||
return refTy->elementType().simplified();
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
CPLUSPLUS_END_NAMESPACE
|
||||
|
||||
@@ -119,6 +119,8 @@ public:
|
||||
bool operator != (const FullySpecifiedType &other) const;
|
||||
bool operator < (const FullySpecifiedType &other) const;
|
||||
|
||||
FullySpecifiedType simplified() const;
|
||||
|
||||
private:
|
||||
Type *_type;
|
||||
struct Flags {
|
||||
|
||||
Reference in New Issue
Block a user