blob: 7ef5c94dbc8cf66ad4a50d3ee5c138513c74717c [file] [log] [blame]
Jordan Rose07645732012-06-22 00:33:20 +00001// RUN: diagtool show-enabled %s | FileCheck %s
Jordan Rose0832f822012-06-04 16:57:50 +00002//
3// This shows warnings which are on by default.
4// We just check a few to make sure it's doing something sensible.
5//
Richard Smithb6ebd442012-06-28 07:51:56 +00006// CHECK: ext_unterminated_string
Jordan Rose0832f822012-06-04 16:57:50 +00007// CHECK: warn_condition_is_assignment
8// CHECK: warn_null_arg
Jordan Rose0832f822012-06-04 16:57:50 +00009
10
Jordan Rose07645732012-06-22 00:33:20 +000011// RUN: diagtool show-enabled -Wno-everything %s | count 0
Jordan Rose0832f822012-06-04 16:57:50 +000012
13
Jordan Rose07645732012-06-22 00:33:20 +000014// 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
Jordan Rose0832f822012-06-04 16:57:50 +000017//
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
Jordan Rose07645732012-06-22 00:33:20 +000022// RUN: diagtool show-enabled --no-levels -Wno-everything -Wobjc-root-class %s | FileCheck -check-prefix CHECK-NO-LEVELS %s
Jordan Rose0832f822012-06-04 16:57:50 +000023//
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]