Skip to content

Commit eed4d6c

Browse files
author
Daniel Kroening
committed
added override where needed
1 parent 31f7573 commit eed4d6c

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

src/analyses/ai.h

+11-10
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ class ai_domain_baset
5656
// no states
5757
virtual void make_bottom()=0;
5858

59-
// all states
59+
// all states -- the analysis doesn't use this,
60+
// and domains may refuse to implement it.
6061
virtual void make_top()=0;
6162

6263
// a reasonable entry-point state
@@ -267,7 +268,7 @@ class ait:public ai_baset
267268
return it->second;
268269
}
269270

270-
virtual void clear()
271+
virtual void clear() override
271272
{
272273
state_map.clear();
273274
ai_baset::clear();
@@ -278,33 +279,33 @@ class ait:public ai_baset
278279
state_mapt state_map;
279280

280281
// this one creates states, if need be
281-
virtual statet &get_state(locationt l)
282+
virtual statet &get_state(locationt l) override
282283
{
283284
return state_map[l]; // calls default constructor
284285
}
285286

286287
// this one just finds states
287-
virtual const statet &find_state(locationt l) const
288+
virtual const statet &find_state(locationt l) const override
288289
{
289290
typename state_mapt::const_iterator it=state_map.find(l);
290291
if(it==state_map.end()) throw "failed to find state";
291292
return it->second;
292293
}
293294

294-
virtual bool merge(const statet &src, locationt from, locationt to)
295+
virtual bool merge(const statet &src, locationt from, locationt to) override
295296
{
296297
statet &dest=get_state(to);
297298
return static_cast<domainT &>(dest).merge(static_cast<const domainT &>(src), from, to);
298299
}
299300

300-
virtual statet *make_temporary_state(const statet &s)
301+
virtual statet *make_temporary_state(const statet &s) override
301302
{
302303
return new domainT(static_cast<const domainT &>(s));
303304
}
304305

305306
virtual void fixedpoint(
306307
const goto_functionst &goto_functions,
307-
const namespacet &ns)
308+
const namespacet &ns) override
308309
{
309310
sequential_fixedpoint(goto_functions, ns);
310311
}
@@ -318,7 +319,7 @@ class ait:public ai_baset
318319
const statet &src,
319320
goto_programt::const_targett from,
320321
goto_programt::const_targett to,
321-
const namespacet &ns)
322+
const namespacet &ns) override
322323
{
323324
throw "not implemented";
324325
}
@@ -339,7 +340,7 @@ class concurrency_aware_ait:public ait<domainT>
339340
const statet &src,
340341
goto_programt::const_targett from,
341342
goto_programt::const_targett to,
342-
const namespacet &ns)
343+
const namespacet &ns) override
343344
{
344345
statet &dest=this->get_state(to);
345346
return static_cast<domainT &>(dest).merge_shared(static_cast<const domainT &>(src), from, to, ns);
@@ -348,7 +349,7 @@ class concurrency_aware_ait:public ait<domainT>
348349
protected:
349350
virtual void fixedpoint(
350351
const goto_functionst &goto_functions,
351-
const namespacet &ns)
352+
const namespacet &ns) override
352353
{
353354
this->concurrent_fixedpoint(goto_functions, ns);
354355
}

0 commit comments

Comments
 (0)