File tree 2 files changed +10
-5
lines changed
regression/cbmc-java/virtual7
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -3,6 +3,6 @@ test.class
3
3
--show-goto-functions --function test.main
4
4
^EXIT=0$
5
5
^SIGNAL=0$
6
- IF.*"java::C ".*THEN GOTO
7
- IF.*"java::D ".*THEN GOTO
6
+ IF.*"java::B ".*THEN GOTO
7
+ IF.*"java::E ".*THEN GOTO
8
8
IF.*"java::A".*THEN GOTO
Original file line number Diff line number Diff line change @@ -445,10 +445,15 @@ void remove_virtual_functionst::get_functions(
445
445
has_prefix (
446
446
id2string (b.symbol_expr .get_identifier ()), " java::java.lang.Object" ))
447
447
return true ;
448
- else if (a.symbol_expr .get_identifier () == b.symbol_expr .get_identifier ())
449
- return a.class_id < b.class_id ;
450
448
else
451
- return a.symbol_expr .get_identifier () < b.symbol_expr .get_identifier ();
449
+ {
450
+ int cmp = a.symbol_expr .get_identifier ().compare (
451
+ b.symbol_expr .get_identifier ());
452
+ if (cmp == 0 )
453
+ return a.class_id < b.class_id ;
454
+ else
455
+ return cmp < 0 ;
456
+ }
452
457
});
453
458
}
454
459
You can’t perform that action at this time.
0 commit comments