Home | History | Annotate | Download | only in Misc
      1 // RUN: diagtool tree | FileCheck -strict-whitespace %s
      2 // RUN: diagtool tree -Weverything | FileCheck -strict-whitespace %s
      3 // RUN: diagtool tree everything | FileCheck -strict-whitespace %s
      4 //
      5 // These three ways of running diagtool tree are the same:
      6 // they produce a tree for every top-level diagnostic flag.
      7 // Just check a few to make sure we're actually showing more than one group.
      8 //
      9 // CHECK: -W
     10 // CHECK:   -Wextra
     11 // CHECK:     -Wmissing-field-initializers
     12 // CHECK:       warn_missing_field_initializers
     13 // CHECK: -Wall
     14 // CHECK:   -Wmost
     15 
     16 // These flags are currently unimplemented; test that we output them anyway.
     17 // CHECK: -Wstrict-aliasing
     18 // CHECK-NEXT: -Wstrict-aliasing=0
     19 // CHECK-NEXT: -Wstrict-aliasing=1
     20 // CHECK-NEXT: -Wstrict-aliasing=2
     21 // CHECK: -Wstrict-overflow
     22 // CHECK-NEXT: -Wstrict-overflow=0
     23 // CHECK-NEXT: -Wstrict-overflow=1
     24 // CHECK-NEXT: -Wstrict-overflow=2
     25 // CHECK-NEXT: -Wstrict-overflow=3
     26 // CHECK-NEXT: -Wstrict-overflow=4
     27 // CHECK-NEXT: -Wstrict-overflow=5
     28 
     29 
     30 // RUN: not diagtool tree -Wthis-is-not-a-valid-flag
     31 
     32 
     33 // RUN: diagtool tree -Wgnu | FileCheck -strict-whitespace -check-prefix CHECK-GNU %s
     34 // CHECK-GNU: -Wgnu
     35 // CHECK-GNU:   -Wgnu-designator
     36 // CHECK-GNU:     ext_gnu_array_range
     37 // CHECK-GNU:     ext_gnu_missing_equal_designator
     38 // CHECK-GNU:     ext_gnu_old_style_field_designator
     39 // CHECK-GNU:   -Wvla-extension
     40 // CHECK-GNU:     ext_vla
     41 // There are more GNU extensions but we don't need to check them all.
     42 
     43 // RUN: diagtool tree --flags-only -Wgnu | FileCheck -check-prefix CHECK-FLAGS-ONLY %s
     44 // CHECK-FLAGS-ONLY: -Wgnu
     45 // CHECK-FLAGS-ONLY:   -Wgnu-designator
     46 // CHECK-FLAGS-ONLY-NOT:     ext_gnu_array_range
     47 // CHECK-FLAGS-ONLY-NOT:     ext_gnu_missing_equal_designator
     48 // CHECK-FLAGS-ONLY-NOT:     ext_gnu_old_style_field_designator
     49 // CHECK-FLAGS-ONLY:   -Wvla
     50 // CHECK-FLAGS-ONLY-NOT:     ext_vla
     51 // CHECK-FLAGS-ONLY-NOT:   ext_array_init_copy
     52 // CHECK-FLAGS-ONLY-NOT:   ext_empty_struct_union
     53 // CHECK-FLAGS-ONLY-NOT:   ext_expr_not_ice
     54