(root)/
gcc-13.2.0/
gcc/
testsuite/
c-c++-common/
diagnostic-format-sarif-file-Wbidi-chars.c
       1  /* Adapted from Wbidi-chars-1.c */
       2  
       3  /* PR preprocessor/103026 */
       4  /* { dg-do compile } */
       5  /* { dg-options "-fdiagnostics-format=sarif-file" } */
       6  
       7  int main() {
       8      int isAdmin = 0;
       9      /*‮ } ⁦if (isAdmin)⁩ ⁦ begin admins only */
      10          __builtin_printf("You are an admin.\n");
      11      /* end admins only ‮ { ⁦*/
      12      return 0;
      13  }
      14  
      15  /* Verify that we generate a valid UTF-8 .sarif file.
      16  
      17       { dg-final { verify-sarif-file } }
      18  
      19     Verify that we captured the expected warnings.
      20  
      21       { dg-final { scan-sarif-file {"text": "unpaired UTF-8 bidirectional control characters detected"} } }
      22       { dg-final { scan-sarif-file {"text": "unpaired UTF-8 bidirectional control characters detected"} } }
      23  */