File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,10 @@ Author: Daniel Kroening
11
11
12
12
#include " graphml_witness.h"
13
13
14
+ #include < util/arith_tools.h>
14
15
#include < util/byte_operators.h>
15
16
#include < util/c_types.h>
16
- #include < util/arith_tools .h>
17
+ #include < util/cprover_prefix .h>
17
18
#include < util/prefix.h>
18
19
#include < util/ssa_expr.h>
19
20
@@ -189,7 +190,14 @@ static bool filter_out(
189
190
source_location.get_file ().empty () ||
190
191
source_location.is_built_in () ||
191
192
source_location.get_line ().empty ())
192
- return true ;
193
+ {
194
+ const irep_idt id = source_location.get_function ();
195
+ // Do not filter out assertions in functions the name of which starts with
196
+ // CPROVER_PREFIX, because we need to maintain those as violation nodes:
197
+ // these are assertions generated, for examples, for memory leaks.
198
+ if (!has_prefix (id2string (id), CPROVER_PREFIX) || !it->is_assert ())
199
+ return true ;
200
+ }
193
201
194
202
return false ;
195
203
}
You can’t perform that action at this time.
0 commit comments