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