@@ -298,10 +298,11 @@ void instrument_cover_goals(
298
298
source_locationt source_location=
299
299
basic_blocks.source_location_map [block_nr];
300
300
301
- if (source_location.get_file ()!=" " )
301
+ if (!source_location.get_file ().empty () &&
302
+ source_location.get_file ()[0 ]!=' <' )
302
303
{
303
304
std::string comment=
304
- " block " +source_location. as_string ()+ " " + i2string (i_it->location_number );
305
+ " block " +i2string (i_it->location_number );
305
306
306
307
goto_program.insert_before_swap (i_it);
307
308
i_it->make_assertion (false_exprt ());
@@ -351,13 +352,13 @@ void instrument_cover_goals(
351
352
352
353
for (const auto & c : conditions)
353
354
{
354
- std::string comment_t =" condition " +from_expr (ns, " " , c)+" true" ;
355
+ std::string comment_t =" condition ` " +from_expr (ns, " " , c)+" ' true" ;
355
356
goto_program.insert_before_swap (i_it);
356
357
i_it->make_assertion (c);
357
358
i_it->source_location =source_location;
358
359
i_it->source_location .set_comment (comment_t );
359
360
360
- std::string comment_f=" condition " +from_expr (ns, " " , c)+" false" ;
361
+ std::string comment_f=" condition ` " +from_expr (ns, " " , c)+" ' false" ;
361
362
goto_program.insert_before_swap (i_it);
362
363
i_it->make_assertion (not_exprt (c));
363
364
i_it->source_location =source_location;
@@ -379,13 +380,13 @@ void instrument_cover_goals(
379
380
380
381
for (const auto & d : decisions)
381
382
{
382
- std::string comment_t =" decision " +from_expr (ns, " " , d)+" true" ;
383
+ std::string comment_t =" decision ` " +from_expr (ns, " " , d)+" ' true" ;
383
384
goto_program.insert_before_swap (i_it);
384
385
i_it->make_assertion (d);
385
386
i_it->source_location =source_location;
386
387
i_it->source_location .set_comment (comment_t );
387
388
388
- std::string comment_f=" decision " +from_expr (ns, " " , d)+" false" ;
389
+ std::string comment_f=" decision ` " +from_expr (ns, " " , d)+" ' false" ;
389
390
goto_program.insert_before_swap (i_it);
390
391
i_it->make_assertion (not_exprt (d));
391
392
i_it->source_location =source_location;
0 commit comments