| 1 |
// RUN: diagtool show-enabled %s | FileCheck %s |
| 2 |
// |
| 3 |
// This shows warnings which are on by default. |
| 4 |
// We just check a few to make sure it's doing something sensible. |
| 5 |
// |
| 6 |
// CHECK: ext_unterminated_char_or_string |
| 7 |
// CHECK: warn_condition_is_assignment |
| 8 |
// CHECK: warn_null_arg |
| 9 |
|
| 10 |
|
| 11 |
// RUN: diagtool show-enabled -Wno-everything -Rno-everything %s | count 0 |
| 12 |
|
| 13 |
|
| 14 |
// RUN: diagtool show-enabled -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-WARN %s |
| 15 |
// RUN: diagtool show-enabled -Wno-everything -Werror=objc-root-class %s | FileCheck -check-prefix CHECK-ERROR %s |
| 16 |
// RUN: diagtool show-enabled -Wno-everything -Wfatal-errors=objc-root-class %s | FileCheck -check-prefix CHECK-FATAL %s |
| 17 |
// |
| 18 |
// CHECK-WARN: W warn_objc_root_class_missing [-Wobjc-root-class] |
| 19 |
// CHECK-ERROR: E warn_objc_root_class_missing [-Wobjc-root-class] |
| 20 |
// CHECK-FATAL: F warn_objc_root_class_missing [-Wobjc-root-class] |
| 21 |
|
| 22 |
// RUN: diagtool show-enabled --no-levels -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-NO-LEVELS %s |
| 23 |
// |
| 24 |
// CHECK-NO-LEVELS-NOT: {{^W }} |
| 25 |
// CHECK-NO-LEVELS-NOT: {{^E }} |
| 26 |
// CHECK-NO-LEVELS-NOT: {{^F }} |
| 27 |
// CHECK-NO-LEVELS: warn_objc_root_class_missing [-Wobjc-root-class] |
| 28 |
|
| 29 |
// Test if EnumConversion is a subgroup of -Wconversion. Because no diagnostics |
| 30 |
// are grouped directly under -Wenum-conversion, we check for |
| 31 |
// -Wimplicit-enum-enum-cast instead (which is itself under -Wenum-conversion). |
| 32 |
// RUN: diagtool show-enabled --no-levels -Wno-conversion -Wenum-conversion %s | FileCheck --check-prefix CHECK-ENUM-CONVERSION %s |
| 33 |
// RUN: diagtool show-enabled --no-levels %s | FileCheck --check-prefix CHECK-ENUM-CONVERSION %s |
| 34 |
// RUN: diagtool show-enabled --no-levels -Wno-conversion %s | FileCheck --check-prefix CHECK-NO-ENUM-CONVERSION %s |
| 35 |
// |
| 36 |
// CHECK-ENUM-CONVERSION: -Wimplicit-enum-enum-cast |
| 37 |
// CHECK-NO-ENUM-CONVERSION-NOT: -Wimplicit-enum-enum-cast |
| 38 |
|
| 39 |
// Test if -Wshift-op-parentheses is a subgroup of -Wparentheses |
| 40 |
// RUN: diagtool show-enabled --no-levels -Wno-parentheses -Wshift-op-parentheses %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s |
| 41 |
// RUN: diagtool show-enabled --no-levels %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s |
| 42 |
// RUN: diagtool show-enabled --no-levels -Wno-parentheses %s | FileCheck --check-prefix CHECK-NO-SHIFT-OP-PARENTHESES %s |
| 43 |
// |
| 44 |
// CHECK-SHIFT-OP-PARENTHESES: -Wshift-op-parentheses |
| 45 |
// CHECK-NO-SHIFT-OP-PARENTHESES-NOT: -Wshift-op-parentheses |