aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/c-c++-common/diagnostic-format-sarif-file-header-role.c
blob: bfbbe4c2946b086b54e13d68560aeaea2467d632 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
/* { dg-do compile } */
/* { dg-options "-fdiagnostics-format=sarif-file" } */

/* Generate a warning in a header file.  */
#include "diagnostic-format-sarif-file-header-role.h"

/* Verify that some JSON was written to a file with the expected name.  */
/* { dg-final { verify-sarif-file } } */

/* Verify that the header file's "role" is "resultFile", as per "NOTE 3"
   in SARIF v2.1.0 section 3.24.6.  */
/* { dg-final { scan-sarif-file "\"roles\": \\\[\"resultFile\"\\\]" } } */