Skip to content

Commit fb32eb1

Browse files
authored
Merge pull request #5767 from tautschnig/forall-symbolptr_list
Remove {forall,Forall}_symbolptr_list
2 parents b2b09eb + edcbb26 commit fb32eb1

File tree

2 files changed

+4
-14
lines changed

2 files changed

+4
-14
lines changed

.clang-format

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,6 @@ ForEachMacros: [
4444
'Forall_operands',
4545
'forall_expr',
4646
'Forall_expr',
47-
'forall_symbolptr_list',
48-
'Forall_symbolptr_list',
4947
'forall_irep',
5048
'Forall_irep',
5149
'forall_named_irep',

src/util/get_module.cpp

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,6 @@ Author: Daniel Kroening, [email protected]
1919

2020
typedef std::list<const symbolt *> symbolptr_listt;
2121

22-
#define forall_symbolptr_list(it, list) \
23-
for(symbolptr_listt::const_iterator it=(list).begin(); \
24-
it!=(list).end(); ++it)
25-
26-
#define Forall_symbolptr_list(it, list) \
27-
for(symbolptr_listt::iterator it=(list).begin(); \
28-
it!=(list).end(); ++it)
29-
3022
const symbolt &get_module_by_name(
3123
const symbol_tablet &symbol_table,
3224
const std::string &module,
@@ -60,8 +52,8 @@ const symbolt &get_module_by_name(
6052
{
6153
message.error() << "module '" << module << "' does not uniquely resolve:\n";
6254

63-
forall_symbolptr_list(it, symbolptr_list)
64-
message.error() << " " << (*it)->name << '\n';
55+
for(const symbolt *symbol_ptr : symbolptr_list)
56+
message.error() << " " << symbol_ptr->name << '\n';
6557

6658
message.error() << messaget::eom;
6759
throw 0;
@@ -107,8 +99,8 @@ const symbolt &get_module(
10799
// sorted alphabetically
108100
std::set<std::string> modules;
109101

110-
forall_symbolptr_list(it, symbolptr_list)
111-
modules.insert(id2string((*it)->pretty_name));
102+
for(const symbolt *symbol_ptr : symbolptr_list)
103+
modules.insert(id2string(symbol_ptr->pretty_name));
112104

113105
message.error() << "multiple modules found, please select one:\n";
114106

0 commit comments

Comments
 (0)