Debian Codegraph @

gcc/testsuite/c-c++-common/diagnostic-format-json-5.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdiagnostics-format=json" } */
3
4 struct s { int color; };
5
6 int test (struct s *ptr)
7 {
8 return ptr->colour;
9 }
10
11 /* { dg-begin-multiline-output "" }
12 [{"kind": "error",
13 "message": "'struct s' has no member named 'colour'; did you mean 'color'?",
14 "children": [],
15 "column-origin": 1,
16 "locations": [{"caret": {"file":
17 "line": 8,
18 "display-column": 15,
19 "byte-column": 15,
20 "column": 15},
21 "finish": {"file":
22 "line": 8,
23 "display-column": 20,
24 "byte-column": 20,
25 "column": 20}}],
26 "fixits": [{"start": {"file":
27 "line": 8,
28 "display-column": 15,
29 "byte-column": 15,
30 "column": 15},
31 "next": {"file":
32 "line": 8,
33 "display-column": 21,
34 "byte-column": 21,
35 "column": 21},
36 "string": "color"}],
37 "escape-source": false}]
38 { dg-end-multiline-output "" } */