File tree 2 files changed +11
-8
lines changed
2 files changed +11
-8
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 &,
You can’t perform that action at this time.
0 commit comments