Skip to content

Commit 2e2b9f9

Browse files
author
martin
committed
Fix all of the non-ridiculous linting errors.
1 parent d90a4b8 commit 2e2b9f9

File tree

1 file changed

+18
-8
lines changed

1 file changed

+18
-8
lines changed

src/analyses/cfg_dominators.h

+18-8
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Author: Georg Weissenbacher, [email protected]
66
77
\*******************************************************************/
88

9-
#ifndef CPROVER_ANALYSES_CFG_DOMINATORS_H
10-
#define CPROVER_ANALYSES_CFG_DOMINATORS_H
9+
#ifndef CPROVER_SRC_ANALYSES_CFG_DOMINATORS_H
10+
#define CPROVER_SRC_ANALYSES_CFG_DOMINATORS_H
1111

1212
#include <set>
1313
#include <list>
@@ -144,13 +144,15 @@ void cfg_dominators_templatet<P, T, post_dom>::fixedpoint(P &program)
144144
bool changed=false;
145145
typename cfgt::nodet &node=cfg[cfg.entry_map[current]];
146146
if(node.dominators.empty())
147+
{
147148
for(const auto & edge : (post_dom?node.out:node.in))
148149
if(!cfg[edge.first].dominators.empty())
149150
{
150151
node.dominators=cfg[edge.first].dominators;
151152
node.dominators.insert(current);
152153
changed=true;
153154
}
155+
}
154156

155157
// compute intersection of predecessors
156158
for(const auto & edge : (post_dom?node.out:node.in))
@@ -165,10 +167,14 @@ void cfg_dominators_templatet<P, T, post_dom>::fixedpoint(P &program)
165167
// in-place intersection. not safe to use set_intersect
166168
while(n_it!=node.dominators.end() && o_it!=other.end())
167169
{
168-
if(*n_it==current) ++n_it;
169-
else if(*n_it<*o_it) { changed=true; node.dominators.erase(n_it++); }
170-
else if(*o_it<*n_it) ++o_it;
171-
else { ++n_it; ++o_it; }
170+
if(*n_it==current)
171+
++n_it;
172+
else if(*n_it<*o_it)
173+
{ changed=true; node.dominators.erase(n_it++); }
174+
else if(*o_it<*n_it)
175+
++o_it;
176+
else
177+
{ ++n_it; ++o_it; }
172178
}
173179

174180
while(n_it!=node.dominators.end())
@@ -248,10 +254,14 @@ void cfg_dominators_templatet<P, T, post_dom>::output(std::ostream &out) const
248254
}
249255
}
250256

251-
typedef cfg_dominators_templatet<const goto_programt, goto_programt::const_targett, false>
257+
typedef cfg_dominators_templatet<const goto_programt,
258+
goto_programt::const_targett,
259+
false>
252260
cfg_dominatorst;
253261

254-
typedef cfg_dominators_templatet<const goto_programt, goto_programt::const_targett, true>
262+
typedef cfg_dominators_templatet<const goto_programt,
263+
goto_programt::const_targett,
264+
true>
255265
cfg_post_dominatorst;
256266

257267
template<>

0 commit comments

Comments
 (0)