Jordan Rose | 0832f82 | 2012-06-04 16:57:50 +0000 | [diff] [blame^] | 1 | // RUN: diagtool show-enabled %s 2>&1 | 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: warn_condition_is_assignment |
| 7 | // CHECK: warn_null_arg |
| 8 | // CHECK: warn_unterminated_string |
| 9 | |
| 10 | |
| 11 | // RUN: diagtool show-enabled -Wno-everything %s 2>&1 | count 0 |
| 12 | |
| 13 | |
| 14 | // RUN: diagtool show-enabled -Wno-everything -Wobjc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-WARN %s |
| 15 | // RUN: diagtool show-enabled -Wno-everything -Werror=objc-root-class %s 2>&1 | FileCheck -check-prefix CHECK-ERROR %s |
| 16 | // RUN: diagtool show-enabled -Wno-everything -Wfatal-errors=objc-root-class %s 2>&1 | 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 2>&1 | 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] |