@@ -24,40 +24,20 @@ vsd_configt vsd_configt::from_options(const optionst &options)
2424 " --data-dependencies" };
2525 }
2626
27- config.value_abstract_type = option_to_abstract_type (
28- options,
29- " values" ,
30- value_option_mappings,
31- CONSTANT
32- );
27+ config.value_abstract_type =
28+ option_to_abstract_type (options, " values" , value_option_mappings, CONSTANT);
3329
3430 config.pointer_abstract_type = option_to_abstract_type (
35- options,
36- " pointers" ,
37- pointer_option_mappings,
38- POINTER_INSENSITIVE
39- );
31+ options, " pointers" , pointer_option_mappings, POINTER_INSENSITIVE);
4032
4133 config.struct_abstract_type = option_to_abstract_type (
42- options,
43- " structs" ,
44- struct_option_mappings,
45- STRUCT_INSENSITIVE
46- );
34+ options, " structs" , struct_option_mappings, STRUCT_INSENSITIVE);
4735
4836 config.array_abstract_type = option_to_abstract_type (
49- options,
50- " arrays" ,
51- array_option_mappings,
52- ARRAY_INSENSITIVE
53- );
37+ options, " arrays" , array_option_mappings, ARRAY_INSENSITIVE);
5438
5539 config.union_abstract_type = option_to_abstract_type (
56- options,
57- " unions" ,
58- union_option_mappings,
59- UNION_INSENSITIVE
60- );
40+ options, " unions" , union_option_mappings, UNION_INSENSITIVE);
6141
6242 // This should always be on (for efficeny with 3-way merge)
6343 // Does not work with value set
@@ -105,61 +85,57 @@ vsd_configt vsd_configt::intervals()
10585}
10686
10787const vsd_configt::option_mappingt vsd_configt::value_option_mappings = {
108- { " intervals" , INTERVAL },
109- { " constants" , CONSTANT },
110- { " set-of-constants" , VALUE_SET }
111- };
88+ {" intervals" , INTERVAL},
89+ {" constants" , CONSTANT},
90+ {" set-of-constants" , VALUE_SET}};
11291
11392const vsd_configt::option_mappingt vsd_configt::pointer_option_mappings = {
114- { " top-bottom" , POINTER_INSENSITIVE },
115- { " constants" , POINTER_SENSITIVE },
116- { " value-set" , VALUE_SET }
117- };
93+ {" top-bottom" , POINTER_INSENSITIVE},
94+ {" constants" , POINTER_SENSITIVE},
95+ {" value-set" , VALUE_SET}};
11896
11997const vsd_configt::option_mappingt vsd_configt::struct_option_mappings = {
120- { " top-bottom" , STRUCT_INSENSITIVE },
121- { " every-field" , STRUCT_SENSITIVE }
122- };
98+ {" top-bottom" , STRUCT_INSENSITIVE},
99+ {" every-field" , STRUCT_SENSITIVE}};
123100
124101const vsd_configt::option_mappingt vsd_configt::array_option_mappings = {
125- { " top-bottom" , ARRAY_INSENSITIVE },
126- { " every-element" , ARRAY_SENSITIVE }
127- };
102+ {" top-bottom" , ARRAY_INSENSITIVE},
103+ {" every-element" , ARRAY_SENSITIVE}};
128104
129105const vsd_configt::option_mappingt vsd_configt::union_option_mappings = {
130- { " top-bottom" , UNION_INSENSITIVE }
131- };
106+ {" top-bottom" , UNION_INSENSITIVE}};
132107
133108invalid_command_line_argument_exceptiont vsd_configt::invalid_argument (
134- const std::string& option_name,
135- const std::string& bad_argument,
136- const option_mappingt& mapping
137- ) {
109+ const std::string & option_name,
110+ const std::string & bad_argument,
111+ const option_mappingt & mapping)
112+ {
138113 auto option = " --vsd-" + option_name;
139114 auto choices = std::string (" " );
140- for (auto & kv : mapping) {
115+ for (auto &kv : mapping)
116+ {
141117 choices += (!choices.empty () ? " |" : " " );
142118 choices += kv.first ;
143119 }
144120
145- return invalid_command_line_argument_exceptiont {
146- " Unknown argument '" + bad_argument + " '" ,
147- option,
148- option + " " + choices };
121+ return invalid_command_line_argument_exceptiont{
122+ " Unknown argument '" + bad_argument + " '" , option, option + " " + choices};
149123}
150124
151125ABSTRACT_OBJECT_TYPET vsd_configt::option_to_abstract_type (
152- const optionst& options,
153- const std::string& option_name,
154- const option_mappingt& mapping,
155- ABSTRACT_OBJECT_TYPET default_type
156- ) {
126+ const optionst & options,
127+ const std::string & option_name,
128+ const option_mappingt & mapping,
129+ ABSTRACT_OBJECT_TYPET default_type)
130+ {
157131 const auto argument = options.get_option (option_name);
158132
159- if (argument.empty ()) return default_type;
133+ if (argument.empty ())
134+ return default_type;
160135
161136 auto selected = mapping.find (argument);
162- if (selected == mapping.end ()) {
137+ if (selected == mapping.end ())
138+ {
163139 throw invalid_argument (option_name, argument, mapping);
164140 }
165141 return selected->second ;
@@ -243,7 +219,8 @@ abstract_object_pointert initialize_abstract_object(
243219}
244220
245221ABSTRACT_OBJECT_TYPET
246- variable_sensitivity_object_factoryt::get_abstract_object_type (const typet& type) const
222+ variable_sensitivity_object_factoryt::get_abstract_object_type (
223+ const typet &type) const
247224{
248225 ABSTRACT_OBJECT_TYPET abstract_object_type = TWO_VALUE;
249226
@@ -288,7 +265,7 @@ variable_sensitivity_object_factoryt::get_abstract_object(
288265 const abstract_environmentt &environment,
289266 const namespacet &ns) const
290267{
291- const typet& followed_type = ns.follow (type);
268+ const typet & followed_type = ns.follow (type);
292269 ABSTRACT_OBJECT_TYPET abstract_object_type =
293270 get_abstract_object_type (followed_type);
294271
0 commit comments