@@ -53,7 +53,7 @@ std::size_t struct_union_typet::component_number(
53
53
return 0 ;
54
54
}
55
55
56
- // / Get the component with given name.
56
+ // / Get the reference to a component with given name.
57
57
const struct_union_typet::componentt &struct_union_typet::get_component (
58
58
const irep_idt &component_name) const
59
59
{
@@ -79,7 +79,10 @@ typet struct_union_typet::component_type(
79
79
return c.type ();
80
80
}
81
81
82
- // / Returns true if the object is a prefix of \param other.
82
+ // / Returns true if the struct is a prefix of \a other, i.e., if this struct
83
+ // / has n components then the component types and names of this struct must
84
+ // / match the first n components of \a other struct.
85
+ // / \param other Struct type to compare with.
83
86
bool struct_typet::is_prefix_of (const struct_typet &other) const
84
87
{
85
88
const componentst &ot_components=other.components ();
@@ -109,12 +112,14 @@ bool struct_typet::is_prefix_of(const struct_typet &other) const
109
112
return true ; // ok, *this is a prefix of ot
110
113
}
111
114
115
+ // / Returns true if the type is a reference.
112
116
bool is_reference (const typet &type)
113
117
{
114
118
return type.id ()==ID_pointer &&
115
119
type.get_bool (ID_C_reference);
116
120
}
117
121
122
+ // / Returns if the type is an R value reference.
118
123
bool is_rvalue_reference (const typet &type)
119
124
{
120
125
return type.id ()==ID_pointer &&
0 commit comments