| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fdiagnostics-add-output=sarif" } */ |
| 3 |
|
| 4 |
extern void foo (void); |
| 5 |
|
| 6 |
void test_nesting (void) |
| 7 |
{ |
| 8 |
foo (); /* { dg-error "top-level error" } */ |
| 9 |
} |
| 10 |
|
| 11 |
/* Verify that some JSON was written to a file with the expected name. */ |
| 12 |
/* { dg-final { verify-sarif-file } } */ |
| 13 |
|
| 14 |
/* Use a Python script to verify various properties about the generated |
| 15 |
.sarif file: |
| 16 |
{ dg-final { run-sarif-pytest diagnostic-test-nesting-sarif.c "diagnostic-test-nesting-sarif.py" } } */ |