FullySpecifiedType::simplified() strips references from the type.

This commit is contained in:
Roberto Raggi
2009-09-30 11:24:00 +02:00
parent 7a5b1bdd82
commit cae8a31a7d
3 changed files with 16 additions and 19 deletions

View File

@@ -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

View File

@@ -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 {