| 1 |
/* { dg-do compile } */ |
| 2 |
/* { dg-options "-fdiagnostics-format=sarif-file" } */ |
| 3 |
/* { dg-excess-errors "The error is sent to the SARIF file, rather than stderr" } */ |
| 4 |
|
| 5 |
int test (void) |
| 6 |
{ |
| 7 |
int 文字化け = *42; |
| 8 |
} |
| 9 |
|
| 10 |
/* |
| 11 |
{ dg-final { verify-sarif-file } } |
| 12 |
|
| 13 |
{ dg-final { scan-sarif-file "\"level\": \"error\"" } } |
| 14 |
|
| 15 |
We expect the region expressed in display columns: |
| 16 |
{ dg-final { scan-sarif-file "\"startLine\": 7" } } |
| 17 |
{ dg-final { scan-sarif-file "\"startColumn\": 18" } } |
| 18 |
{ dg-final { scan-sarif-file "\"endColumn\": 21" } } |
| 19 |
|
| 20 |
{ dg-final { scan-sarif-file "\"text\": \" int \\u6587\\u5b57\\u5316\\u3051 = " } } |
| 21 |
*/ |