We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 83c10bc commit 26f7b71Copy full SHA for 26f7b71
src/analyses/goto_check.cpp
@@ -276,21 +276,14 @@ void goto_checkt::invalidate(const exprt &lhs)
276
else if(lhs.id()==ID_symbol)
277
{
278
// clear all assertions about 'symbol'
279
- find_symbols_sett find_symbols_set;
280
- find_symbols_set.insert(to_symbol_expr(lhs).get_identifier());
+ find_symbols_sett find_symbols_set{to_symbol_expr(lhs).get_identifier()};
281
282
- for(assertionst::iterator
283
- it=assertions.begin();
284
- it!=assertions.end();
285
- ) // no it++
+ for(auto it = assertions.begin(); it != assertions.end();)
286
287
- assertionst::iterator next=it;
288
- next++;
289
-
290
if(has_symbol(*it, find_symbols_set) || has_subexpr(*it, ID_dereference))
291
- assertions.erase(it);
292
293
- it=next;
+ it = assertions.erase(it);
+ else
+ ++it;
294
}
295
296
else
0 commit comments