1 | // RUN: diagtool tree --internal | FileCheck -strict-whitespace %s |
2 | // RUN: diagtool tree --internal -Weverything | FileCheck -strict-whitespace %s |
3 | // RUN: diagtool tree --internal 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 | // RUN: diagtool tree --internal -Wgnu | FileCheck -strict-whitespace -check-prefix CHECK-GNU %s |
33 | // CHECK-GNU: -Wgnu |
34 | // CHECK-GNU: -Wgnu-designator |
35 | // CHECK-GNU: ext_gnu_array_range |
36 | // CHECK-GNU: ext_gnu_missing_equal_designator |
37 | // CHECK-GNU: ext_gnu_old_style_field_designator |
38 | // CHECK-GNU: -Wvla-extension |
39 | // CHECK-GNU: ext_vla |
40 | // 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 %s |
43 | // CHECK-FLAGS-ONLY: -Wgnu |
44 | // CHECK-FLAGS-ONLY: -Wgnu-designator |
45 | // CHECK-FLAGS-ONLY-NOT: ext_gnu_array_range |
46 | // CHECK-FLAGS-ONLY-NOT: ext_gnu_missing_equal_designator |
47 | // CHECK-FLAGS-ONLY-NOT: ext_gnu_old_style_field_designator |
48 | // CHECK-FLAGS-ONLY: -Wvla |
49 | // CHECK-FLAGS-ONLY-NOT: ext_vla |
50 | // CHECK-FLAGS-ONLY-NOT: ext_array_init_copy |
51 | // CHECK-FLAGS-ONLY-NOT: ext_empty_struct_union |
52 | // CHECK-FLAGS-ONLY-NOT: ext_expr_not_ice |
53 | |