(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
diagnostic-format-json-2.c
       1  /* { dg-do compile } */
       2  /* { dg-options "-fdiagnostics-format=json" } */
       3  
       4  #warning message
       5  
       6  /* Use dg-regexp to consume the JSON output starting with
       7     the innermost values, and working outwards.  */
       8  
       9  /* { dg-regexp "\"kind\": \"warning\"" } */
      10  /* { dg-regexp "\"column-origin\": 1" } */
      11  /* { dg-regexp "\"escape-source\": false" } */
      12  /* { dg-regexp "\"message\": \"#warning message\"" } */
      13  /* { dg-regexp "\"option\": \"-Wcpp\"" } */
      14  /* { dg-regexp "\"option_url\": \"https:\[^\n\r\"\]*#index-Wcpp\"" } */
      15  
      16  /* { dg-regexp "\"caret\": \{" } */
      17  /* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-2.c\"" } */
      18  /* { dg-regexp "\"line\": 4" } */
      19  /* { dg-regexp "\"column\": 2" } */
      20  /* { dg-regexp "\"display-column\": 2" } */
      21  /* { dg-regexp "\"byte-column\": 2" } */
      22  
      23  /* { dg-regexp "\"finish\": \{" } */
      24  /* { dg-regexp "\"file\": \"\[^\n\r\"\]*diagnostic-format-json-2.c\"" } */
      25  /* { dg-regexp "\"line\": 4" } */
      26  /* { dg-regexp "\"column\": 8" } */
      27  /* { dg-regexp "\"display-column\": 8" } */
      28  /* { dg-regexp "\"byte-column\": 8" } */
      29  
      30  /* { dg-regexp "\"locations\": \[\[\{\}, \]*\]" } */
      31  /* { dg-regexp "\"children\": \[\[\]\[\]\]" } */
      32  /* { dg-regexp "\[\[\{\}, \]*\]" } */