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 take an existing warning and add a flag, this test will fail. To 10 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 (143): 22 CHECK-NEXT: ext_delete_void_ptr_operand 23 CHECK-NEXT: ext_enum_friend 24 CHECK-NEXT: ext_expected_semi_decl_list 25 CHECK-NEXT: ext_explicit_specialization_storage_class 26 CHECK-NEXT: ext_implicit_lib_function_decl 27 CHECK-NEXT: ext_missing_declspec 28 CHECK-NEXT: ext_missing_whitespace_after_macro_name 29 CHECK-NEXT: ext_new_paren_array_nonconst 30 CHECK-NEXT: ext_plain_complex 31 CHECK-NEXT: ext_pp_macro_redef 32 CHECK-NEXT: ext_template_arg_extra_parens 33 CHECK-NEXT: ext_typecheck_comparison_of_pointer_integer 34 CHECK-NEXT: ext_typecheck_cond_incompatible_operands 35 CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard 36 CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers 37 CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer 38 CHECK-NEXT: ext_unknown_escape 39 CHECK-NEXT: ext_using_undefined_std 40 CHECK-NEXT: pp_include_next_absolute_path 41 CHECK-NEXT: pp_include_next_in_primary 42 CHECK-NEXT: pp_invalid_string_literal 43 CHECK-NEXT: pp_out_of_date_dependency 44 CHECK-NEXT: pp_poisoning_existing_macro 45 CHECK-NEXT: pp_pragma_once_in_main_file 46 CHECK-NEXT: pp_pragma_sysheader_in_main_file 47 CHECK-NEXT: w_asm_qualifier_ignored 48 CHECK-NEXT: warn_accessor_property_type_mismatch 49 CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size 50 CHECK-NEXT: warn_asm_label_on_auto_decl 51 CHECK-NEXT: warn_bitfield_width_exceeds_type_size 52 CHECK-NEXT: warn_bool_switch_condition 53 CHECK-NEXT: warn_braces_around_scalar_init 54 CHECK-NEXT: warn_c_kext 55 CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor 56 CHECK-NEXT: warn_call_wrong_number_of_arguments 57 CHECK-NEXT: warn_case_empty_range 58 CHECK-NEXT: warn_char_constant_too_large 59 CHECK-NEXT: warn_collection_expr_type 60 CHECK-NEXT: warn_conflicting_variadic 61 CHECK-NEXT: warn_conv_to_base_not_used 62 CHECK-NEXT: warn_conv_to_self_not_used 63 CHECK-NEXT: warn_conv_to_void_not_used 64 CHECK-NEXT: warn_delete_array_type 65 CHECK-NEXT: warn_double_const_requires_fp64 66 CHECK-NEXT: warn_drv_assuming_mfloat_abi_is 67 CHECK-NEXT: warn_drv_clang_unsupported 68 CHECK-NEXT: warn_drv_objc_gc_unsupported 69 CHECK-NEXT: warn_drv_pch_not_first_include 70 CHECK-NEXT: warn_dup_category_def 71 CHECK-NEXT: warn_duplicate_protocol_def 72 CHECK-NEXT: warn_enum_too_large 73 CHECK-NEXT: warn_enum_value_overflow 74 CHECK-NEXT: warn_enumerator_too_large 75 CHECK-NEXT: warn_exception_caught_by_earlier_handler 76 CHECK-NEXT: warn_excess_initializers 77 CHECK-NEXT: warn_excess_initializers_in_char_array_initializer 78 CHECK-NEXT: warn_expected_qualified_after_typename 79 CHECK-NEXT: warn_extraneous_char_constant 80 CHECK-NEXT: warn_fe_cc_log_diagnostics_failure 81 CHECK-NEXT: warn_fe_cc_print_header_failure 82 CHECK-NEXT: warn_fe_macro_contains_embedded_newline 83 CHECK-NEXT: warn_file_asm_volatile 84 CHECK-NEXT: warn_hex_escape_too_large 85 CHECK-NEXT: warn_ignoring_ftabstop_value 86 CHECK-NEXT: warn_implements_nscopying 87 CHECK-NEXT: warn_incompatible_qualified_id 88 CHECK-NEXT: warn_initializer_string_for_char_array_too_long 89 CHECK-NEXT: warn_inline_namespace_reopened_noninline 90 CHECK-NEXT: warn_integer_too_large 91 CHECK-NEXT: warn_integer_too_large_for_signed 92 CHECK-NEXT: warn_invalid_asm_cast_lvalue 93 CHECK-NEXT: warn_many_braces_around_scalar_init 94 CHECK-NEXT: warn_maynot_respond 95 CHECK-NEXT: warn_method_param_redefinition 96 CHECK-NEXT: warn_mismatched_exception_spec 97 CHECK-NEXT: warn_missing_case_for_condition 98 CHECK-NEXT: warn_missing_dependent_template_keyword 99 CHECK-NEXT: warn_missing_exception_specification 100 CHECK-NEXT: warn_missing_whitespace_after_macro_name 101 CHECK-NEXT: warn_multiple_method_decl 102 CHECK-NEXT: warn_no_constructor_for_refconst 103 CHECK-NEXT: warn_nonnull_pointers_only 104 CHECK-NEXT: warn_not_compound_assign 105 CHECK-NEXT: warn_objc_property_copy_missing_on_block 106 CHECK-NEXT: warn_objc_protocol_qualifier_missing_id 107 CHECK-NEXT: warn_octal_escape_too_large 108 CHECK-NEXT: warn_on_superclass_use 109 CHECK-NEXT: warn_param_default_argument_redefinition 110 CHECK-NEXT: warn_partial_specs_not_deducible 111 CHECK-NEXT: warn_pp_convert_lhs_to_positive 112 CHECK-NEXT: warn_pp_convert_rhs_to_positive 113 CHECK-NEXT: warn_pp_expr_overflow 114 CHECK-NEXT: warn_pp_line_decimal 115 CHECK-NEXT: warn_pragma_align_expected_equal 116 CHECK-NEXT: warn_pragma_align_invalid_option 117 CHECK-NEXT: warn_pragma_debug_unexpected_command 118 CHECK-NEXT: warn_pragma_expected_colon 119 CHECK-NEXT: warn_pragma_expected_enable_disable 120 CHECK-NEXT: warn_pragma_expected_identifier 121 CHECK-NEXT: warn_pragma_expected_lparen 122 CHECK-NEXT: warn_pragma_expected_rparen 123 CHECK-NEXT: warn_pragma_extra_tokens_at_eol 124 CHECK-NEXT: warn_pragma_ms_struct 125 CHECK-NEXT: warn_pragma_options_align_reset_failed 126 CHECK-NEXT: warn_pragma_options_expected_align 127 CHECK-NEXT: warn_pragma_pack_invalid_action 128 CHECK-NEXT: warn_pragma_pack_invalid_alignment 129 CHECK-NEXT: warn_pragma_pack_malformed 130 CHECK-NEXT: warn_pragma_pack_pop_failed 131 CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment 132 CHECK-NEXT: warn_pragma_pack_show 133 CHECK-NEXT: warn_pragma_pop_macro_no_push 134 CHECK-NEXT: warn_pragma_unknown_extension 135 CHECK-NEXT: warn_pragma_unused_expected_punc 136 CHECK-NEXT: warn_pragma_unused_expected_var 137 CHECK-NEXT: warn_pragma_unused_expected_var_arg 138 CHECK-NEXT: warn_pragma_unused_undeclared_var 139 CHECK-NEXT: warn_previous_alias_decl 140 CHECK-NEXT: warn_property_attr_mismatch 141 CHECK-NEXT: warn_property_attribute 142 CHECK-NEXT: warn_property_getter_owning_mismatch 143 CHECK-NEXT: warn_property_types_are_incompatible 144 CHECK-NEXT: warn_readonly_property 145 CHECK-NEXT: warn_redeclaration_without_attribute_prev_attribute_ignored 146 CHECK-NEXT: warn_register_objc_catch_parm 147 CHECK-NEXT: warn_related_result_type_compatibility_class 148 CHECK-NEXT: warn_related_result_type_compatibility_protocol 149 CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument 150 CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible 151 CHECK-NEXT: warn_static_inline_explicit_inst_ignored 152 CHECK-NEXT: warn_static_non_static 153 CHECK-NEXT: warn_template_export_unsupported 154 CHECK-NEXT: warn_template_spec_extra_headers 155 CHECK-NEXT: warn_tentative_incomplete_array 156 CHECK-NEXT: warn_typecheck_function_qualifiers 157 CHECK-NEXT: warn_unavailable_fwdclass_message 158 CHECK-NEXT: warn_undef_interface 159 CHECK-NEXT: warn_undef_interface_suggest 160 CHECK-NEXT: warn_undef_protocolref 161 CHECK-NEXT: warn_unknown_method_family 162 CHECK-NEXT: warn_use_out_of_scope_declaration 163 CHECK-NEXT: warn_weak_identifier_undeclared 164 CHECK-NEXT: warn_weak_import 165 166 The list of warnings in -Wpedantic should NEVER grow. 167 168 CHECK: Number in -Wpedantic (not covered by other -W flags): 29 169