Introduced FullySpecifiedType::copySpecifiers()

This commit is contained in:
Roberto Raggi
2009-10-27 14:59:10 +01:00
parent 4f9efcba7b
commit 9ff5676e72
2 changed files with 21 additions and 0 deletions

View File

@@ -80,6 +80,10 @@ FullySpecifiedType FullySpecifiedType::qualifiedType() const
ty.setExtern(false);
ty.setMutable(false);
ty.setTypedef(false);
ty.setInline(false);
ty.setVirtual(false);
ty.setExplicit(false);
return ty;
}
@@ -209,4 +213,19 @@ FullySpecifiedType FullySpecifiedType::simplified() const
return *this;
}
void FullySpecifiedType::copySpecifiers(const FullySpecifiedType &type)
{
// class storage specifiers
f._isFriend = type.f._isFriend;
f._isRegister = type.f._isRegister;
f._isStatic = type.f._isStatic;
f._isExtern = type.f._isExtern;
f._isMutable = type.f._isMutable;
f._isTypedef = type.f._isTypedef;
// function specifiers
f._isInline = type.f._isInline;
f._isVirtual = type.f._isVirtual;
f._isExplicit = type.f._isExplicit;
}

View File

@@ -121,6 +121,8 @@ public:
FullySpecifiedType simplified() const;
void copySpecifiers(const FullySpecifiedType &type);
private:
Type *_type;
struct Flags {