public override bool Equals(object obj) { if (!(obj is TemplateArgument)) { return(false); } var arg = (TemplateArgument)obj; if (Kind != arg.Kind) { return(false); } switch (Kind) { case ArgumentKind.Type: return(Type.Equals(arg.Type)); case ArgumentKind.Declaration: return(Declaration.Equals(arg.Declaration)); case ArgumentKind.Integral: return(Integral.Equals(arg.Integral)); case ArgumentKind.Expression: return(true); default: throw new Exception("Unknown TemplateArgument Kind"); } }
public override bool Equals(object obj) { var type = obj as TemplateParameterSubstitutionType; if (type == null) { return(false); } return(Replacement.Equals(type.Replacement)); }
public override bool Equals(object obj) { var decay = obj as DecayedType; if (decay == null) { return(false); } return(Original.Equals(decay.Original)); }
public override bool Equals(object obj) { var pointer = obj as MemberPointerType; if (pointer == null) { return(false); } return(QualifiedPointee.Equals(pointer.QualifiedPointee)); }
public override bool Equals(object obj) { var type = obj as FunctionType; if (type == null) { return(false); } return(ReturnType.Equals(type.ReturnType) && Parameters.SequenceEqual(type.Parameters)); }
public override bool Equals(object obj) { var attributed = obj as AttributedType; if (attributed == null) { return(false); } return(Modified.Equals(attributed.Modified) && Equivalent.Equals(attributed.Equivalent)); }
public override bool Equals(object obj) { var type = obj as PointerType; if (type == null) { return(false); } return(QualifiedPointee.Equals(type.QualifiedPointee) && Modifier == type.Modifier); }
public override bool Equals(object obj) { var type = obj as ArrayType; if (type == null) { return(false); } var equals = QualifiedType.Equals(type.QualifiedType) && SizeType.Equals(type.SizeType); if (SizeType == ArraySize.Constant) { equals &= Size.Equals(type.Size); } return(equals); }