Debian Codegraph @

gcc/testsuite/gcc.dg/analyzer/warning-emoji.c

raw
1 /* Verify that the final event in an analyzer path gets a "warning" emoji
2 when -fdiagnostics-text-art-charset=emoji (and
3 -fdiagnostics-path-format=inline-events). */
4
5 /* { dg-additional-options "-fdiagnostics-show-line-numbers" } */
6 /* { dg-additional-options "-fdiagnostics-show-caret" } */
7 /* { dg-additional-options "-fdiagnostics-path-format=inline-events" } */
8 /* { dg-additional-options "-fdiagnostics-text-art-charset=emoji" } */
9 /* { dg-enable-nn-line-numbers "" } */
10
11 void test (void *p)
12 {
13 __builtin_free (p);
14 __builtin_free (p); /* { dg-warning "double-'free'" } */
15 }
16
17 /* { dg-begin-multiline-output "" }
18 NN | __builtin_free (p);
19 | ^~~~~~~~~~~~~~~~~~
20 'test': events 1-2
21 NN | __builtin_free (p);
22 | ^~~~~~~~~~~~~~~~~~
23 | |
24 | (1) first 'free' here
25 NN | __builtin_free (p);
26 | ~~~~~~~~~~~~~~~~~~
27 | |
28 | (2) ⚠️ second 'free' here; first 'free' was at (1)
29 { dg-end-multiline-output "" } */