53 lines · c
1// RUN: diagtool tree --internal | FileCheck -strict-whitespace %s2// RUN: diagtool tree --internal -Weverything | FileCheck -strict-whitespace %s3// RUN: diagtool tree --internal everything | FileCheck -strict-whitespace %s4//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: -W10// CHECK: -Wextra11// CHECK: -Wmissing-field-initializers12// CHECK: warn_missing_field_initializers13// CHECK: -Wall14// CHECK: -Wmost15 16// These flags are currently unimplemented; test that we output them anyway.17// CHECK: -Wstrict-aliasing18// CHECK-NEXT: -Wstrict-aliasing=019// CHECK-NEXT: -Wstrict-aliasing=120// CHECK-NEXT: -Wstrict-aliasing=221// CHECK: -Wstrict-overflow22// CHECK-NEXT: -Wstrict-overflow=023// CHECK-NEXT: -Wstrict-overflow=124// CHECK-NEXT: -Wstrict-overflow=225// CHECK-NEXT: -Wstrict-overflow=326// CHECK-NEXT: -Wstrict-overflow=427// CHECK-NEXT: -Wstrict-overflow=528 29 30// RUN: not diagtool tree -Wthis-is-not-a-valid-flag31 32// RUN: diagtool tree --internal -Wgnu | FileCheck -strict-whitespace -check-prefix CHECK-GNU %s33// CHECK-GNU: -Wgnu34// CHECK-GNU: -Wgnu-designator35// CHECK-GNU: ext_gnu_array_range36// CHECK-GNU: ext_gnu_missing_equal_designator37// CHECK-GNU: ext_gnu_old_style_field_designator38// CHECK-GNU: -Wvla-extension39// CHECK-GNU: ext_vla40// There are more GNU extensions but we don't need to check them all.41 42// RUN: diagtool tree -Wgnu | FileCheck -check-prefix CHECK-FLAGS-ONLY %s43// CHECK-FLAGS-ONLY: -Wgnu44// CHECK-FLAGS-ONLY: -Wgnu-designator45// CHECK-FLAGS-ONLY-NOT: ext_gnu_array_range46// CHECK-FLAGS-ONLY-NOT: ext_gnu_missing_equal_designator47// CHECK-FLAGS-ONLY-NOT: ext_gnu_old_style_field_designator48// CHECK-FLAGS-ONLY: -Wvla49// CHECK-FLAGS-ONLY-NOT: ext_vla50// CHECK-FLAGS-ONLY-NOT: ext_array_init_copy51// CHECK-FLAGS-ONLY-NOT: ext_empty_struct_union52// CHECK-FLAGS-ONLY-NOT: ext_expr_not_ice53