1 RUN: diagtool list-warnings > %t 2>&1 2 RUN: FileCheck --input-file=%t %s 3 4 This test serves two purposes: 5 6 (1) It documents all existing warnings that currently have no associated -W flag, 7 and ensures that the list never grows. 8 9 If you take an existing warning and add a flag, this test will fail. 10 To fix this test, simply remove that warning from the list below. 11 12 (2) It prevents us adding new warnings to Clang that have no -W flag. All 13 new warnings should have -W flags. 14 15 If you add a new warning without a flag, this test will fail. To fix 16 this test, simply add a warning group to that warning. 17 18 19 The list of warnings below should NEVER grow. It should gradually shrink to 0. 20 21 CHECK: Warnings without flags (61): 22 23 CHECK-NEXT: ext_expected_semi_decl_list 24 CHECK-NEXT: ext_missing_whitespace_after_macro_name 25 CHECK-NEXT: ext_new_paren_array_nonconst 26 CHECK-NEXT: ext_plain_complex 27 CHECK-NEXT: ext_template_arg_extra_parens 28 CHECK-NEXT: ext_typecheck_cond_incompatible_operands 29 CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer 30 CHECK-NEXT: ext_using_undefined_std 31 CHECK-NEXT: pp_invalid_string_literal 32 CHECK-NEXT: pp_out_of_date_dependency 33 CHECK-NEXT: pp_poisoning_existing_macro 34 CHECK-NEXT: warn_accessor_property_type_mismatch 35 CHECK-NEXT: warn_arcmt_nsalloc_realloc 36 CHECK-NEXT: warn_asm_label_on_auto_decl 37 CHECK-NEXT: warn_c_kext 38 CHECK-NEXT: warn_call_wrong_number_of_arguments 39 CHECK-NEXT: warn_case_empty_range 40 CHECK-NEXT: warn_char_constant_too_large 41 CHECK-NEXT: warn_collection_expr_type 42 CHECK-NEXT: warn_conflicting_variadic 43 CHECK-NEXT: warn_delete_array_type 44 CHECK-NEXT: warn_double_const_requires_fp64 45 CHECK-NEXT: warn_drv_amdgpu_cov6 46 CHECK-NEXT: warn_drv_assuming_mfloat_abi_is 47 CHECK-NEXT: warn_drv_clang_unsupported 48 CHECK-NEXT: warn_drv_pch_not_first_include 49 CHECK-NEXT: warn_expected_qualified_after_typename 50 CHECK-NEXT: warn_fe_backend_unsupported 51 CHECK-NEXT: warn_fe_cc_log_diagnostics_failure 52 CHECK-NEXT: warn_fe_cc_print_header_failure 53 CHECK-NEXT: warn_fe_macro_contains_embedded_newline 54 CHECK-NEXT: warn_ignoring_ftabstop_value 55 CHECK-NEXT: warn_implements_nscopying 56 CHECK-NEXT: warn_incompatible_qualified_id 57 CHECK-NEXT: warn_invalid_cpu_supports 58 CHECK-NEXT: warn_maynot_respond 59 CHECK-NEXT: warn_method_param_redefinition 60 CHECK-NEXT: warn_missing_case_for_condition 61 CHECK-NEXT: warn_missing_dependent_template_keyword 62 CHECK-NEXT: warn_missing_whitespace_after_macro_name 63 CHECK-NEXT: warn_mt_message 64 CHECK-NEXT: warn_no_constructor_for_refconst 65 CHECK-NEXT: warn_not_compound_assign 66 CHECK-NEXT: warn_objc_property_copy_missing_on_block 67 CHECK-NEXT: warn_objc_protocol_qualifier_missing_id 68 CHECK-NEXT: warn_on_superclass_use 69 CHECK-NEXT: warn_pp_convert_to_positive 70 CHECK-NEXT: warn_pp_expr_overflow 71 CHECK-NEXT: warn_pp_line_decimal 72 CHECK-NEXT: warn_pragma_pack_pop_identifier_and_alignment 73 CHECK-NEXT: warn_pragma_pack_show 74 CHECK-NEXT: warn_property_getter_owning_mismatch 75 CHECK-NEXT: warn_register_objc_catch_parm 76 CHECK-NEXT: warn_related_result_type_compatibility_class 77 CHECK-NEXT: warn_related_result_type_compatibility_protocol 78 CHECK-NEXT: warn_template_export_unsupported 79 CHECK-NEXT: warn_undef_interface 80 CHECK-NEXT: warn_undef_interface_suggest 81 CHECK-NEXT: warn_undef_protocolref 82 CHECK-NEXT: warn_weak_identifier_undeclared 83 CHECK-NEXT: warn_weak_import 84 85 The list of warnings in -Wpedantic should NEVER grow. 86 87 CHECK: Number in -Wpedantic (not covered by other -W flags): 24 88