File tree Expand file tree Collapse file tree 3 files changed +21
-4
lines changed
regression/goto-instrument/store_goto_locations_json Expand file tree Collapse file tree 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change
1
+ int main (void )
2
+ {
3
+ return 0 ;
4
+ }
Original file line number Diff line number Diff line change
1
+ CORE
2
+ main.c
3
+ --show-goto-functions --json-ui --store-goto-locations
4
+ ^EXIT=0$
5
+ ^SIGNAL=0$
6
+ \"originalGOTOLocation\": \"0\"
7
+ --
8
+ --
9
+
10
+ Checks that generated JSON contains
11
+ original goto locations, if any
12
+
Original file line number Diff line number Diff line change @@ -63,15 +63,16 @@ json_objectt show_goto_functions_jsont::convert(
63
63
instruction_entry[" instructionId" ]=
64
64
json_stringt (instruction.to_string ());
65
65
66
- if (instruction.code . source_location () .is_not_nil ())
66
+ if (instruction.source_location .is_not_nil ())
67
67
{
68
68
instruction_entry[" sourceLocation" ]=
69
- json (instruction.code . source_location () );
69
+ json (instruction.source_location );
70
70
71
- if (instruction.code . source_location ().get_goto_location ()!= " " )
71
+ if (! instruction.source_location . get_goto_location ().empty () )
72
72
{
73
73
instruction_entry[" originalGOTOLocation" ]=
74
- json_stringt (id2string (instruction.code .source_location ().get_goto_location ()));
74
+ json_stringt (
75
+ id2string (instruction.source_location .get_goto_location ()));
75
76
}
76
77
}
77
78
You can’t perform that action at this time.
0 commit comments