Debian Codegraph @

gcc/testsuite/gcc.dg/sarif-output/missing-semicolon.c

raw
1 /* { dg-do compile } */
2 /* { dg-options "-fdiagnostics-format=sarif-file" } */
3
4 /* Verify that SARIF output can capture secondary locations
5 relating to a diagnostic. */
6
7 int missing_semicolon (void)
8 {
9 return 42
10 }
11
12 /* We expect a failing compile due to the error, but the use of
13 -fdiagnostics-format=sarif-file means there should be no output to stderr.
14 DejaGnu injects this message; ignore it:
15 { dg-prune-output "exit status is 1" } */
16
17 /* Verify that some JSON was written to a file with the expected name:
18 { dg-final { verify-sarif-file } } */
19
20 /* Use a Python script to verify various properties about the generated
21 .sarif file:
22 { dg-final { run-sarif-pytest missing-semicolon.c "missing-semicolon.py" } } */