File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change 14
14
#include < util/c_types.h>
15
15
#include < util/config.h>
16
16
#include < util/expr_initializer.h>
17
+ #include < util/range.h>
17
18
18
19
#include " ansi_c_declaration.h"
19
20
@@ -152,11 +153,12 @@ void c_typecheck_baset::typecheck_asm(code_asmt &code)
152
153
153
154
typecheck_expr (code_asm_gcc.asm_text ());
154
155
155
- for (std::size_t i = 1 ; i < code_asm_gcc.operands ().size (); i++)
156
+ // the operands are lists of expressions
157
+ for (auto &op : ranget<exprt::operandst::iterator>(
158
+ code_asm_gcc.operands ().begin () + 1 , code_asm_gcc.operands ().end ()))
156
159
{
157
- exprt &list = code_asm_gcc.operands ()[i];
158
- Forall_operands (it, list)
159
- typecheck_expr (*it);
160
+ for (auto &expr : op.operands ())
161
+ typecheck_expr (expr);
160
162
}
161
163
}
162
164
else if (flavor==ID_msc)
You can’t perform that action at this time.
0 commit comments