File tree Expand file tree Collapse file tree 1 file changed +15
-24
lines changed Expand file tree Collapse file tree 1 file changed +15
-24
lines changed Original file line number Diff line number Diff line change @@ -168,31 +168,22 @@ void goto_convert_functionst::convert_function(
168
168
// we have a body, make sure all parameter names are valid
169
169
for (const auto &p : f.parameter_identifiers )
170
170
{
171
- if (p.empty ())
172
- {
173
- snprintf (parameter_error_message,
174
- ERROR_MSG_LEN - 1 ,
175
- " parameter identifier should not be empty\n "
176
- " function: %s\n "
177
- " parameter: %s" ,
178
- identifier.c_str (),
179
- p.c_str ());
180
- }
181
- DATA_INVARIANT (!p.empty (), parameter_error_message);
182
-
183
- if (!symbol_table.has_symbol (p))
184
- {
185
- snprintf (parameter_error_message,
186
- ERROR_MSG_LEN - 1 ,
187
- " parameter identifier must be a known symbol\n "
188
- " function: %s\n "
189
- " parameter: %s" ,
190
- identifier.c_str (),
191
- p.c_str ());
192
- }
193
- DATA_INVARIANT (
171
+ DATA_INVARIANT_WITH_DIAGNOSTICS (
172
+ !p.empty (),
173
+ " parameter identifier should not be empty" ,
174
+ parameter_error_message,
175
+ " function:" ,
176
+ identifier,
177
+ " parameter:" ,
178
+ p);
179
+
180
+ DATA_INVARIANT_WITH_DIAGNOSTICS (
194
181
symbol_table.has_symbol (p),
195
- parameter_error_message);
182
+ " parameter identifier must be a known symbol" ,
183
+ " function:" ,
184
+ identifier,
185
+ " parameter:" ,
186
+ p);
196
187
}
197
188
198
189
lifetimet parent_lifetime = lifetime;
You can’t perform that action at this time.
0 commit comments