1 RUN: diagtool list-warnings 2>&1 | FileCheck %s 2 3 This test serves two purposes: 4 5 (1) It documents all existing warnings that currently have no associated -W flag, 6 and ensures that the list never grows. 7 8 If take an existing warning and add a flag, this test will fail. To 9 fix this test, simply remove that warning from the list below. 10 11 (2) It prevents us adding new warnings to Clang that have no -W flag. All 12 new warnings should have -W flags. 13 14 If you add a new warning without a flag, this test will fail. To fix 15 this test, simply add a warning group to that warning. 16 17 18 The list of warnings below should NEVER grow. It should gradually shrink to 0. 19 20 CHECK: Warnings without flags (253): 21 CHECK-NEXT: ext_anonymous_struct_union_qualified 22 CHECK-NEXT: ext_binary_literal 23 CHECK-NEXT: ext_cast_fn_obj 24 CHECK-NEXT: ext_delete_void_ptr_operand 25 CHECK-NEXT: ext_designated_init 26 CHECK-NEXT: ext_duplicate_declspec 27 CHECK-NEXT: ext_ellipsis_exception_spec 28 CHECK-NEXT: ext_empty_fnmacro_arg 29 CHECK-NEXT: ext_empty_source_file 30 CHECK-NEXT: ext_enum_friend 31 CHECK-NEXT: ext_enum_value_not_int 32 CHECK-NEXT: ext_enumerator_list_comma 33 CHECK-NEXT: ext_expected_semi_decl_list 34 CHECK-NEXT: ext_explicit_instantiation_without_qualified_id 35 CHECK-NEXT: ext_explicit_specialization_storage_class 36 CHECK-NEXT: ext_extra_ivar_semi 37 CHECK-NEXT: ext_extra_struct_semi 38 CHECK-NEXT: ext_forward_ref_enum 39 CHECK-NEXT: ext_freestanding_complex 40 CHECK-NEXT: ext_hexconstant_invalid 41 CHECK-NEXT: ext_ident_list_in_param 42 CHECK-NEXT: ext_imaginary_constant 43 CHECK-NEXT: ext_implicit_lib_function_decl 44 CHECK-NEXT: ext_in_class_initializer_non_constant 45 CHECK-NEXT: ext_integer_complement_complex 46 CHECK-NEXT: ext_integer_complex 47 CHECK-NEXT: ext_integer_increment_complex 48 CHECK-NEXT: ext_invalid_sign_spec 49 CHECK-NEXT: ext_missing_declspec 50 CHECK-NEXT: ext_missing_varargs_arg 51 CHECK-NEXT: ext_missing_whitespace_after_macro_name 52 CHECK-NEXT: ext_new_paren_array_nonconst 53 CHECK-NEXT: ext_nonstandard_escape 54 CHECK-NEXT: ext_param_not_declared 55 CHECK-NEXT: ext_paste_comma 56 CHECK-NEXT: ext_plain_complex 57 CHECK-NEXT: ext_pp_bad_vaargs_use 58 CHECK-NEXT: ext_pp_comma_expr 59 CHECK-NEXT: ext_pp_ident_directive 60 CHECK-NEXT: ext_pp_include_next_directive 61 CHECK-NEXT: ext_pp_line_too_big 62 CHECK-NEXT: ext_pp_macro_redef 63 CHECK-NEXT: ext_pp_warning_directive 64 CHECK-NEXT: ext_return_has_void_expr 65 CHECK-NEXT: ext_subscript_non_lvalue 66 CHECK-NEXT: ext_template_arg_extra_parens 67 CHECK-NEXT: ext_thread_before 68 CHECK-NEXT: ext_top_level_semi 69 CHECK-NEXT: ext_typecheck_addrof_void 70 CHECK-NEXT: ext_typecheck_cast_nonscalar 71 CHECK-NEXT: ext_typecheck_cast_to_union 72 CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers 73 CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers_nonstandard 74 CHECK-NEXT: ext_typecheck_comparison_of_fptr_to_void 75 CHECK-NEXT: ext_typecheck_comparison_of_pointer_integer 76 CHECK-NEXT: ext_typecheck_cond_incompatible_operands 77 CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard 78 CHECK-NEXT: ext_typecheck_cond_one_void 79 CHECK-NEXT: ext_typecheck_convert_pointer_void_func 80 CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers 81 CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_and_zero 82 CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer 83 CHECK-NEXT: ext_typecheck_zero_array_size 84 CHECK-NEXT: ext_unknown_escape 85 CHECK-NEXT: ext_using_undefined_std 86 CHECK-NEXT: ext_vla_folded_to_constant 87 CHECK-NEXT: pp_include_next_absolute_path 88 CHECK-NEXT: pp_include_next_in_primary 89 CHECK-NEXT: pp_invalid_string_literal 90 CHECK-NEXT: pp_out_of_date_dependency 91 CHECK-NEXT: pp_poisoning_existing_macro 92 CHECK-NEXT: pp_pragma_once_in_main_file 93 CHECK-NEXT: pp_pragma_sysheader_in_main_file 94 CHECK-NEXT: pp_undef_builtin_macro 95 CHECK-NEXT: w_asm_qualifier_ignored 96 CHECK-NEXT: warn_accessor_property_type_mismatch 97 CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size 98 CHECK-NEXT: warn_asm_label_on_auto_decl 99 CHECK-NEXT: warn_attribute_ibaction 100 CHECK-NEXT: warn_attribute_iboutlet 101 CHECK-NEXT: warn_attribute_ignored 102 CHECK-NEXT: warn_attribute_ignored_for_field_of_type 103 CHECK-NEXT: warn_attribute_malloc_pointer_only 104 CHECK-NEXT: warn_attribute_nonnull_no_pointers 105 CHECK-NEXT: warn_attribute_precede_definition 106 CHECK-NEXT: warn_attribute_sentinel_named_arguments 107 CHECK-NEXT: warn_attribute_sentinel_not_variadic 108 CHECK-NEXT: warn_attribute_type_not_supported 109 CHECK-NEXT: warn_attribute_unknown_visibility 110 CHECK-NEXT: warn_attribute_void_function_method 111 CHECK-NEXT: warn_attribute_weak_import_invalid_on_definition 112 CHECK-NEXT: warn_attribute_weak_on_field 113 CHECK-NEXT: warn_attribute_weak_on_local 114 CHECK-NEXT: warn_attribute_wrong_decl_type 115 CHECK-NEXT: warn_availability_and_unavailable 116 CHECK-NEXT: warn_availability_unknown_platform 117 CHECK-NEXT: warn_availability_version_ordering 118 CHECK-NEXT: warn_bad_receiver_type 119 CHECK-NEXT: warn_bitfield_width_exceeds_type_size 120 CHECK-NEXT: warn_bool_switch_condition 121 CHECK-NEXT: warn_braces_around_scalar_init 122 CHECK-NEXT: warn_c_kext 123 CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor 124 CHECK-NEXT: warn_call_wrong_number_of_arguments 125 CHECK-NEXT: warn_case_empty_range 126 CHECK-NEXT: warn_char_constant_too_large 127 CHECK-NEXT: warn_class_method_not_found 128 CHECK-NEXT: warn_cmdline_missing_macro_defs 129 CHECK-NEXT: warn_collection_expr_type 130 CHECK-NEXT: warn_conflicting_param_types 131 CHECK-NEXT: warn_conflicting_ret_types 132 CHECK-NEXT: warn_conflicting_variadic 133 CHECK-NEXT: warn_conv_to_base_not_used 134 CHECK-NEXT: warn_conv_to_self_not_used 135 CHECK-NEXT: warn_conv_to_void_not_used 136 CHECK-NEXT: warn_cxx0x_right_shift_in_template_arg 137 CHECK-NEXT: warn_delete_array_type 138 CHECK-NEXT: warn_division_by_zero 139 CHECK-NEXT: warn_double_const_requires_fp64 140 CHECK-NEXT: warn_drv_assuming_mfloat_abi_is 141 CHECK-NEXT: warn_drv_clang_unsupported 142 CHECK-NEXT: warn_drv_input_file_unused 143 CHECK-NEXT: warn_drv_not_using_clang_arch 144 CHECK-NEXT: warn_drv_not_using_clang_cpp 145 CHECK-NEXT: warn_drv_not_using_clang_cxx 146 CHECK-NEXT: warn_drv_objc_gc_unsupported 147 CHECK-NEXT: warn_drv_pch_not_first_include 148 CHECK-NEXT: warn_drv_preprocessed_input_file_unused 149 CHECK-NEXT: warn_dup_category_def 150 CHECK-NEXT: warn_duplicate_protocol_def 151 CHECK-NEXT: warn_enum_too_large 152 CHECK-NEXT: warn_enum_value_overflow 153 CHECK-NEXT: warn_enumerator_too_large 154 CHECK-NEXT: warn_exception_caught_by_earlier_handler 155 CHECK-NEXT: warn_excess_initializers 156 CHECK-NEXT: warn_excess_initializers_in_char_array_initializer 157 CHECK-NEXT: warn_expected_qualified_after_typename 158 CHECK-NEXT: warn_extern_init 159 CHECK-NEXT: warn_extraneous_char_constant 160 CHECK-NEXT: warn_fe_cc_log_diagnostics_failure 161 CHECK-NEXT: warn_fe_cc_print_header_failure 162 CHECK-NEXT: warn_fe_macro_contains_embedded_newline 163 CHECK-NEXT: warn_file_asm_volatile 164 CHECK-NEXT: warn_function_attribute_wrong_type 165 CHECK-NEXT: warn_gc_attribute_weak_on_local 166 CHECK-NEXT: warn_gnu_inline_attribute_requires_inline 167 CHECK-NEXT: warn_hex_escape_too_large 168 CHECK-NEXT: warn_ignoring_ftabstop_value 169 CHECK-NEXT: warn_illegal_constant_array_size 170 CHECK-NEXT: warn_implements_nscopying 171 CHECK-NEXT: warn_incompatible_qualified_id 172 CHECK-NEXT: warn_initializer_string_for_char_array_too_long 173 CHECK-NEXT: warn_inline_namespace_reopened_noninline 174 CHECK-NEXT: warn_inst_method_not_found 175 CHECK-NEXT: warn_instance_method_on_class_found 176 CHECK-NEXT: warn_integer_too_large 177 CHECK-NEXT: warn_integer_too_large_for_signed 178 CHECK-NEXT: warn_invalid_asm_cast_lvalue 179 CHECK-NEXT: warn_many_braces_around_scalar_init 180 CHECK-NEXT: warn_maynot_respond 181 CHECK-NEXT: warn_member_extra_qualification 182 CHECK-NEXT: warn_method_param_redefinition 183 CHECK-NEXT: warn_mismatched_exception_spec 184 CHECK-NEXT: warn_missing_case_for_condition 185 CHECK-NEXT: warn_missing_dependent_template_keyword 186 CHECK-NEXT: warn_missing_exception_specification 187 CHECK-NEXT: warn_missing_whitespace_after_macro_name 188 CHECK-NEXT: warn_multiple_method_decl 189 CHECK-NEXT: warn_no_constructor_for_refconst 190 CHECK-NEXT: warn_nonnull_pointers_only 191 CHECK-NEXT: warn_not_compound_assign 192 CHECK-NEXT: warn_ns_attribute_wrong_parameter_type 193 CHECK-NEXT: warn_ns_attribute_wrong_return_type 194 CHECK-NEXT: warn_objc_object_attribute_wrong_type 195 CHECK-NEXT: warn_objc_property_copy_missing_on_block 196 CHECK-NEXT: warn_objc_property_default_assign_on_object 197 CHECK-NEXT: warn_objc_property_no_assignment_attribute 198 CHECK-NEXT: warn_objc_protocol_qualifier_missing_id 199 CHECK-NEXT: warn_octal_escape_too_large 200 CHECK-NEXT: warn_odr_tag_type_inconsistent 201 CHECK-NEXT: warn_on_superclass_use 202 CHECK-NEXT: warn_param_default_argument_redefinition 203 CHECK-NEXT: warn_partial_specs_not_deducible 204 CHECK-NEXT: warn_pointer_attribute_wrong_type 205 CHECK-NEXT: warn_pp_convert_lhs_to_positive 206 CHECK-NEXT: warn_pp_convert_rhs_to_positive 207 CHECK-NEXT: warn_pp_expr_overflow 208 CHECK-NEXT: warn_pp_line_decimal 209 CHECK-NEXT: warn_pragma_align_expected_equal 210 CHECK-NEXT: warn_pragma_align_invalid_option 211 CHECK-NEXT: warn_pragma_debug_unexpected_command 212 CHECK-NEXT: warn_pragma_expected_colon 213 CHECK-NEXT: warn_pragma_expected_enable_disable 214 CHECK-NEXT: warn_pragma_expected_identifier 215 CHECK-NEXT: warn_pragma_expected_lparen 216 CHECK-NEXT: warn_pragma_expected_rparen 217 CHECK-NEXT: warn_pragma_extra_tokens_at_eol 218 CHECK-NEXT: warn_pragma_ms_struct 219 CHECK-NEXT: warn_pragma_options_align_reset_failed 220 CHECK-NEXT: warn_pragma_options_align_unsupported_option 221 CHECK-NEXT: warn_pragma_options_expected_align 222 CHECK-NEXT: warn_pragma_pack_invalid_action 223 CHECK-NEXT: warn_pragma_pack_invalid_alignment 224 CHECK-NEXT: warn_pragma_pack_malformed 225 CHECK-NEXT: warn_pragma_pack_pop_failed 226 CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment 227 CHECK-NEXT: warn_pragma_pack_show 228 CHECK-NEXT: warn_pragma_pop_macro_no_push 229 CHECK-NEXT: warn_pragma_unknown_extension 230 CHECK-NEXT: warn_pragma_unused_expected_punc 231 CHECK-NEXT: warn_pragma_unused_expected_var 232 CHECK-NEXT: warn_pragma_unused_expected_var_arg 233 CHECK-NEXT: warn_pragma_unused_undeclared_var 234 CHECK-NEXT: warn_previous_alias_decl 235 CHECK-NEXT: warn_printf_asterisk_missing_arg 236 CHECK-NEXT: warn_property_attr_mismatch 237 CHECK-NEXT: warn_property_attribute 238 CHECK-NEXT: warn_property_getter_owning_mismatch 239 CHECK-NEXT: warn_property_types_are_incompatible 240 CHECK-NEXT: warn_readonly_property 241 CHECK-NEXT: warn_receiver_forward_class 242 CHECK-NEXT: warn_redecl_library_builtin 243 CHECK-NEXT: warn_redeclaration_without_attribute_prev_attribute_ignored 244 CHECK-NEXT: warn_register_objc_catch_parm 245 CHECK-NEXT: warn_related_result_type_compatibility_class 246 CHECK-NEXT: warn_related_result_type_compatibility_protocol 247 CHECK-NEXT: warn_remainder_by_zero 248 CHECK-NEXT: warn_root_inst_method_not_found 249 CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument 250 CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible 251 CHECK-NEXT: warn_standalone_specifier 252 CHECK-NEXT: warn_static_inline_explicit_inst_ignored 253 CHECK-NEXT: warn_static_non_static 254 CHECK-NEXT: warn_template_export_unsupported 255 CHECK-NEXT: warn_template_spec_extra_headers 256 CHECK-NEXT: warn_tentative_incomplete_array 257 CHECK-NEXT: warn_transparent_union_attribute_field_size_align 258 CHECK-NEXT: warn_transparent_union_attribute_floating 259 CHECK-NEXT: warn_transparent_union_attribute_not_definition 260 CHECK-NEXT: warn_transparent_union_attribute_zero_fields 261 CHECK-NEXT: warn_typecheck_function_qualifiers 262 CHECK-NEXT: warn_unavailable_fwdclass_message 263 CHECK-NEXT: warn_undef_interface 264 CHECK-NEXT: warn_undef_interface_suggest 265 CHECK-NEXT: warn_undef_protocolref 266 CHECK-NEXT: warn_undefined_internal 267 CHECK-NEXT: warn_unknown_analyzer_checker 268 CHECK-NEXT: warn_unknown_method_family 269 CHECK-NEXT: warn_unterminated_char 270 CHECK-NEXT: warn_unterminated_string 271 CHECK-NEXT: warn_use_out_of_scope_declaration 272 CHECK-NEXT: warn_weak_identifier_undeclared 273 CHECK-NEXT: warn_weak_import 274