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_string 7 // CHECK: warn_condition_is_assignment 8 // CHECK: warn_null_arg 9 10 11 // RUN: diagtool show-enabled -Wno-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. 30 // RUN: diagtool show-enabled --no-levels -Wno-conversion -Wenum-conversion %s | FileCheck --check-prefix CHECK-ENUM-CONVERSION %s 31 // RUN: diagtool show-enabled --no-levels %s | FileCheck --check-prefix CHECK-ENUM-CONVERSION %s 32 // RUN: diagtool show-enabled --no-levels -Wno-conversion %s | FileCheck --check-prefix CHECK-NO-ENUM-CONVERSION %s 33 // 34 // CHECK-ENUM-CONVERSION: -Wenum-conversion 35 // CHECK-NO-ENUM-CONVERSION-NOT: -Wenum-conversion 36 37 // Test if -Wshift-op-parentheses is a subgroup of -Wparentheses 38 // RUN: diagtool show-enabled --no-levels -Wno-parentheses -Wshift-op-parentheses %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s 39 // RUN: diagtool show-enabled --no-levels %s | FileCheck --check-prefix CHECK-SHIFT-OP-PARENTHESES %s 40 // RUN: diagtool show-enabled --no-levels -Wno-parentheses %s | FileCheck --check-prefix CHECK-NO-SHIFT-OP-PARENTHESES %s 41 // 42 // CHECK-SHIFT-OP-PARENTHESES: -Wshift-op-parentheses 43 // CHECK-NO-SHIFT-OP-PARENTHESES-NOT: -Wshift-op-parentheses 44