File tree 7 files changed +19
-13
lines changed 7 files changed +19
-13
lines changed Original file line number Diff line number Diff line change @@ -186,19 +186,22 @@ void uncaught_exceptions_analysist::collect_uncaught_exceptions(
186
186
// / Prints the exceptions map that maps each method to the set of exceptions
187
187
// / that may escape it
188
188
void uncaught_exceptions_analysist::output (
189
- const goto_functionst &goto_functions)
189
+ const goto_functionst &goto_functions) const
190
190
{
191
191
#ifdef DEBUG
192
192
forall_goto_functions (it, goto_functions)
193
193
{
194
- if (exceptions_map[it->first ].size ()>0 )
194
+ const auto fn=it->first ;
195
+ const exceptions_mapt::const_iterator found=exceptions_map.find (fn);
196
+ INVARIANT (
197
+ found!=exceptions_map.end (),
198
+ " each function expected to be recorded in `exceptions_map`" );
199
+ const auto &fs=found->second ;
200
+ if (!fs.empty ())
195
201
{
196
202
std::cout << " Uncaught exceptions in function " <<
197
- it->first << " : " << std::endl;
198
- INVARIANT (
199
- exceptions_map.find (it->first )!=exceptions_map.end (),
200
- " each function expected to be recorded in `exceptions_map`" );
201
- for (auto exc_id : exceptions_map[it->first ])
203
+ fn << " : " << std::endl;
204
+ for (const auto exc_id : fs)
202
205
std::cout << id2string (exc_id) << " " ;
203
206
std::cout << std::endl;
204
207
}
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ class uncaught_exceptions_analysist
64
64
const goto_functionst &,
65
65
const namespacet &);
66
66
67
- void output (const goto_functionst &);
67
+ void output (const goto_functionst &) const ;
68
68
69
69
void operator ()(
70
70
const goto_functionst &,
Original file line number Diff line number Diff line change @@ -36,7 +36,7 @@ class path_nodet
36
36
{
37
37
}
38
38
39
- void output (const goto_programt &program, std::ostream &str);
39
+ void output (const goto_programt &program, std::ostream &str) const ;
40
40
41
41
goto_programt::targett loc;
42
42
const exprt guard;
Original file line number Diff line number Diff line change @@ -473,7 +473,7 @@ void trace_automatont::minimise()
473
473
determinise ();
474
474
}
475
475
476
- void automatont::output (std::ostream &str)
476
+ void automatont::output (std::ostream &str) const
477
477
{
478
478
str << " Init: " << init_state << ' \n ' ;
479
479
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class automatont
54
54
55
55
std::size_t count_transitions ();
56
56
57
- void output (std::ostream &str);
57
+ void output (std::ostream &str) const ;
58
58
59
59
void clear ()
60
60
{
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ Date: May 2016
28
28
#include < json/json_parser.h>
29
29
#include < util/message.h>
30
30
31
+ namespace
32
+ {
31
33
class basic_blockst
32
34
{
33
35
public:
@@ -237,7 +239,7 @@ class basic_blockst
237
239
}
238
240
}
239
241
240
- void output (std::ostream &out)
242
+ void output (std::ostream &out) const
241
243
{
242
244
for (block_mapt::const_iterator
243
245
b_it=block_map.begin ();
@@ -289,6 +291,7 @@ class basic_blockst
289
291
block_info.source_location .set_basic_block_covered_lines (covered_lines);
290
292
}
291
293
};
294
+ }
292
295
293
296
bool coverage_goalst::get_coverage_goals (
294
297
const std::string &coverage_file,
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ class goto_modelt
31
31
goto_functions.clear ();
32
32
}
33
33
34
- void output (std::ostream &out)
34
+ void output (std::ostream &out) const
35
35
{
36
36
namespacet ns (symbol_table);
37
37
goto_functions.output (ns, out);
You can’t perform that action at this time.
0 commit comments