File tree Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Expand file tree Collapse file tree 1 file changed +14
-26
lines changed Original file line number Diff line number Diff line change @@ -163,36 +163,24 @@ void goto_convert_functionst::convert_function(
163
163
symbol.is_compiled ()) /* goto_inline may have removed the body */
164
164
return ;
165
165
166
- const size_t ERROR_MSG_LEN = 512 ;
167
- char parameter_error_message[ERROR_MSG_LEN];
168
166
// we have a body, make sure all parameter names are valid
169
167
for (const auto &p : f.parameter_identifiers )
170
168
{
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 (
169
+ DATA_INVARIANT_WITH_DIAGNOSTICS (
170
+ !p.empty (),
171
+ " parameter identifier should not be empty" ,
172
+ " function:" ,
173
+ identifier,
174
+ " parameter:" ,
175
+ p);
176
+
177
+ DATA_INVARIANT_WITH_DIAGNOSTICS (
194
178
symbol_table.has_symbol (p),
195
- parameter_error_message);
179
+ " parameter identifier must be a known symbol" ,
180
+ " function:" ,
181
+ identifier,
182
+ " parameter:" ,
183
+ p);
196
184
}
197
185
198
186
lifetimet parent_lifetime = lifetime;
You can’t perform that action at this time.
0 commit comments