blob: 50abbff6b5f52474bd2426c8baa1fff130fc6e13 [file] [log] [blame]
Ted Kremenek84251262011-08-11 22:06:55 +00001RUN: diagtool list-warnings 2>&1 | FileCheck %s
2
3This 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
18The list of warnings below should NEVER grow. It should gradually shrink to 0.
19
Douglas Gregore082af12011-08-31 21:52:21 +000020CHECK: Warnings without flags (311):
Ted Kremenek84251262011-08-11 22:06:55 +000021CHECK-NEXT: backslash_newline_space
22CHECK-NEXT: charize_microsoft_ext
23CHECK-NEXT: ext_anon_param_requires_type_specifier
24CHECK-NEXT: ext_anonymous_struct_union_qualified
25CHECK-NEXT: ext_array_init_copy
Richard Smith8f4fb192011-09-04 19:54:14 +000026CHECK-NEXT: ext_auto_storage_class
Ted Kremenek84251262011-08-11 22:06:55 +000027CHECK-NEXT: ext_binary_literal
28CHECK-NEXT: ext_c1x_generic_selection
29CHECK-NEXT: ext_c1x_static_assert
30CHECK-NEXT: ext_c99_array_usage
31CHECK-NEXT: ext_c99_compound_literal
32CHECK-NEXT: ext_c99_variable_decl_in_for_loop
33CHECK-NEXT: ext_c99_whitespace_required_after_macro_name
34CHECK-NEXT: ext_cast_fn_obj
35CHECK-NEXT: ext_catch_incomplete_ptr
36CHECK-NEXT: ext_catch_incomplete_ref
37CHECK-NEXT: ext_delete_void_ptr_operand
38CHECK-NEXT: ext_designated_init
39CHECK-NEXT: ext_designated_init_cxx
40CHECK-NEXT: ext_dollar_in_identifier
41CHECK-NEXT: ext_duplicate_declspec
42CHECK-NEXT: ext_ellipsis_exception_spec
43CHECK-NEXT: ext_embedded_directive
44CHECK-NEXT: ext_empty_fnmacro_arg
45CHECK-NEXT: ext_empty_source_file
46CHECK-NEXT: ext_enum_friend
47CHECK-NEXT: ext_enum_value_not_int
48CHECK-NEXT: ext_enumerator_list_comma
49CHECK-NEXT: ext_expected_semi_decl_list
50CHECK-NEXT: ext_explicit_instantiation_without_qualified_id
51CHECK-NEXT: ext_explicit_specialization_storage_class
52CHECK-NEXT: ext_expr_not_ice
53CHECK-NEXT: ext_extra_ivar_semi
54CHECK-NEXT: ext_extra_struct_semi
55CHECK-NEXT: ext_flexible_array_in_array
56CHECK-NEXT: ext_flexible_array_in_struct
57CHECK-NEXT: ext_forward_ref_enum
58CHECK-NEXT: ext_freestanding_complex
59CHECK-NEXT: ext_hexconstant_invalid
60CHECK-NEXT: ext_ident_list_in_param
61CHECK-NEXT: ext_imaginary_constant
62CHECK-NEXT: ext_implicit_lib_function_decl
63CHECK-NEXT: ext_in_class_initializer_non_constant
64CHECK-NEXT: ext_integer_complement_complex
65CHECK-NEXT: ext_integer_complex
66CHECK-NEXT: ext_integer_increment_complex
67CHECK-NEXT: ext_invalid_sign_spec
68CHECK-NEXT: ext_missing_declspec
69CHECK-NEXT: ext_missing_varargs_arg
70CHECK-NEXT: ext_missing_whitespace_after_macro_name
71CHECK-NEXT: ext_nested_pointer_qualifier_mismatch
72CHECK-NEXT: ext_new_paren_array_nonconst
73CHECK-NEXT: ext_nonstandard_escape
74CHECK-NEXT: ext_offsetof_extended_field_designator
75CHECK-NEXT: ext_param_not_declared
76CHECK-NEXT: ext_param_promoted_not_compatible_with_prototype
77CHECK-NEXT: ext_paste_comma
78CHECK-NEXT: ext_plain_complex
79CHECK-NEXT: ext_pp_bad_vaargs_use
80CHECK-NEXT: ext_pp_comma_expr
81CHECK-NEXT: ext_pp_ident_directive
82CHECK-NEXT: ext_pp_import_directive
83CHECK-NEXT: ext_pp_include_next_directive
84CHECK-NEXT: ext_pp_line_too_big
85CHECK-NEXT: ext_pp_macro_redef
86CHECK-NEXT: ext_pp_warning_directive
87CHECK-NEXT: ext_predef_outside_function
88CHECK-NEXT: ext_return_has_void_expr
89CHECK-NEXT: ext_subscript_non_lvalue
90CHECK-NEXT: ext_template_arg_extra_parens
91CHECK-NEXT: ext_thread_before
92CHECK-NEXT: ext_token_used
93CHECK-NEXT: ext_top_level_semi
94CHECK-NEXT: ext_typecheck_addrof_void
95CHECK-NEXT: ext_typecheck_cast_nonscalar
96CHECK-NEXT: ext_typecheck_cast_to_union
97CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers
98CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers_nonstandard
99CHECK-NEXT: ext_typecheck_comparison_of_fptr_to_void
100CHECK-NEXT: ext_typecheck_comparison_of_pointer_integer
101CHECK-NEXT: ext_typecheck_cond_incompatible_operands
102CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard
103CHECK-NEXT: ext_typecheck_cond_one_void
104CHECK-NEXT: ext_typecheck_convert_discards_qualifiers
105CHECK-NEXT: ext_typecheck_convert_int_pointer
106CHECK-NEXT: ext_typecheck_convert_pointer_int
107CHECK-NEXT: ext_typecheck_convert_pointer_void_func
108CHECK-NEXT: ext_typecheck_decl_incomplete_type
109CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers
110CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_and_zero
111CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer
112CHECK-NEXT: ext_typecheck_zero_array_size
113CHECK-NEXT: ext_unknown_escape
114CHECK-NEXT: ext_using_undefined_std
115CHECK-NEXT: ext_vla_folded_to_constant
116CHECK-NEXT: null_in_char
117CHECK-NEXT: null_in_file
118CHECK-NEXT: null_in_string
119CHECK-NEXT: pp_include_next_absolute_path
120CHECK-NEXT: pp_include_next_in_primary
121CHECK-NEXT: pp_invalid_string_literal
122CHECK-NEXT: pp_out_of_date_dependency
123CHECK-NEXT: pp_poisoning_existing_macro
124CHECK-NEXT: pp_pragma_once_in_main_file
125CHECK-NEXT: pp_pragma_sysheader_in_main_file
126CHECK-NEXT: pp_undef_builtin_macro
127CHECK-NEXT: w_asm_qualifier_ignored
128CHECK-NEXT: warn_accessor_property_type_mismatch
129CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size
130CHECK-NEXT: warn_asm_label_on_auto_decl
131CHECK-NEXT: warn_atomic_property_rule
132CHECK-NEXT: warn_attribute_ibaction
133CHECK-NEXT: warn_attribute_iboutlet
134CHECK-NEXT: warn_attribute_ignored
135CHECK-NEXT: warn_attribute_ignored_for_field_of_type
136CHECK-NEXT: warn_attribute_malloc_pointer_only
137CHECK-NEXT: warn_attribute_method_def
138CHECK-NEXT: warn_attribute_nonnull_no_pointers
139CHECK-NEXT: warn_attribute_precede_definition
140CHECK-NEXT: warn_attribute_sentinel_named_arguments
141CHECK-NEXT: warn_attribute_sentinel_not_variadic
142CHECK-NEXT: warn_attribute_type_not_supported
143CHECK-NEXT: warn_attribute_unknown_visibility
144CHECK-NEXT: warn_attribute_void_function_method
145CHECK-NEXT: warn_attribute_weak_import_invalid_on_definition
146CHECK-NEXT: warn_attribute_weak_on_field
147CHECK-NEXT: warn_attribute_weak_on_local
148CHECK-NEXT: warn_attribute_wrong_decl_type
149CHECK-NEXT: warn_availability_and_unavailable
150CHECK-NEXT: warn_availability_unknown_platform
151CHECK-NEXT: warn_availability_version_ordering
152CHECK-NEXT: warn_bad_receiver_type
153CHECK-NEXT: warn_bitfield_width_exceeds_type_size
154CHECK-NEXT: warn_bool_switch_condition
155CHECK-NEXT: warn_braces_around_scalar_init
156CHECK-NEXT: warn_builtin_unknown
157CHECK-NEXT: warn_c_kext
158CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor
159CHECK-NEXT: warn_call_wrong_number_of_arguments
160CHECK-NEXT: warn_case_empty_range
Ted Kremenek84251262011-08-11 22:06:55 +0000161CHECK-NEXT: warn_char_constant_too_large
162CHECK-NEXT: warn_class_method_not_found
163CHECK-NEXT: warn_cmdline_missing_macro_defs
164CHECK-NEXT: warn_collection_expr_type
165CHECK-NEXT: warn_conflicting_param_types
166CHECK-NEXT: warn_conflicting_ret_types
167CHECK-NEXT: warn_conflicting_variadic
168CHECK-NEXT: warn_conv_to_base_not_used
169CHECK-NEXT: warn_conv_to_self_not_used
170CHECK-NEXT: warn_conv_to_void_not_used
171CHECK-NEXT: warn_cxx0x_right_shift_in_template_arg
172CHECK-NEXT: warn_decl_in_param_list
173CHECK-NEXT: warn_delete_array_type
174CHECK-NEXT: warn_delete_incomplete
175CHECK-NEXT: warn_division_by_zero
176CHECK-NEXT: warn_double_const_requires_fp64
177CHECK-NEXT: warn_drv_assuming_mfloat_abi_is
178CHECK-NEXT: warn_drv_clang_unsupported
179CHECK-NEXT: warn_drv_conflicting_deployment_targets
180CHECK-NEXT: warn_drv_input_file_unused
181CHECK-NEXT: warn_drv_not_using_clang_arch
182CHECK-NEXT: warn_drv_not_using_clang_cpp
183CHECK-NEXT: warn_drv_not_using_clang_cxx
184CHECK-NEXT: warn_drv_objc_gc_unsupported
185CHECK-NEXT: warn_drv_pch_not_first_include
186CHECK-NEXT: warn_drv_pipe_ignored_with_save_temps
187CHECK-NEXT: warn_drv_preprocessed_input_file_unused
188CHECK-NEXT: warn_drv_unsupported_option_argument
189CHECK-NEXT: warn_drv_unused_argument
190CHECK-NEXT: warn_dup_category_def
191CHECK-NEXT: warn_duplicate_protocol_def
192CHECK-NEXT: warn_enum_too_large
193CHECK-NEXT: warn_enum_value_overflow
194CHECK-NEXT: warn_enumerator_too_large
195CHECK-NEXT: warn_exception_caught_by_earlier_handler
196CHECK-NEXT: warn_excess_initializers
197CHECK-NEXT: warn_excess_initializers_in_char_array_initializer
198CHECK-NEXT: warn_expected_qualified_after_typename
199CHECK-NEXT: warn_extern_init
200CHECK-NEXT: warn_extraneous_char_constant
201CHECK-NEXT: warn_fe_cc_log_diagnostics_failure
202CHECK-NEXT: warn_fe_cc_print_header_failure
203CHECK-NEXT: warn_fe_macro_contains_embedded_newline
204CHECK-NEXT: warn_file_asm_volatile
205CHECK-NEXT: warn_function_attribute_wrong_type
206CHECK-NEXT: warn_gc_attribute_weak_on_local
207CHECK-NEXT: warn_gnu_inline_attribute_requires_inline
208CHECK-NEXT: warn_hex_escape_too_large
209CHECK-NEXT: warn_ignoring_ftabstop_value
210CHECK-NEXT: warn_illegal_constant_array_size
211CHECK-NEXT: warn_implements_nscopying
212CHECK-NEXT: warn_implicit_decl_requires_setjmp
213CHECK-NEXT: warn_implicit_decl_requires_stdio
214CHECK-NEXT: warn_incompatible_qualified_id
215CHECK-NEXT: warn_initializer_string_for_char_array_too_long
216CHECK-NEXT: warn_inline_namespace_reopened_noninline
217CHECK-NEXT: warn_inst_method_not_found
218CHECK-NEXT: warn_instance_method_on_class_found
219CHECK-NEXT: warn_integer_too_large
220CHECK-NEXT: warn_integer_too_large_for_signed
221CHECK-NEXT: warn_invalid_asm_cast_lvalue
222CHECK-NEXT: warn_ivar_use_hidden
223CHECK-NEXT: warn_label_attribute_not_unused
Ted Kremenek84251262011-08-11 22:06:55 +0000224CHECK-NEXT: warn_many_braces_around_scalar_init
225CHECK-NEXT: warn_maynot_respond
226CHECK-NEXT: warn_member_extra_qualification
227CHECK-NEXT: warn_method_param_redefinition
228CHECK-NEXT: warn_mismatched_exception_spec
229CHECK-NEXT: warn_missing_case_for_condition
230CHECK-NEXT: warn_missing_dependent_template_keyword
231CHECK-NEXT: warn_missing_exception_specification
232CHECK-NEXT: warn_missing_whitespace_after_macro_name
233CHECK-NEXT: warn_multiple_method_decl
234CHECK-NEXT: warn_no_constructor_for_refconst
235CHECK-NEXT: warn_nonnull_pointers_only
236CHECK-NEXT: warn_not_compound_assign
237CHECK-NEXT: warn_ns_attribute_wrong_parameter_type
238CHECK-NEXT: warn_ns_attribute_wrong_return_type
239CHECK-NEXT: warn_objc_object_attribute_wrong_type
240CHECK-NEXT: warn_objc_property_copy_missing_on_block
241CHECK-NEXT: warn_objc_property_default_assign_on_object
242CHECK-NEXT: warn_objc_property_no_assignment_attribute
243CHECK-NEXT: warn_objc_protocol_qualifier_missing_id
244CHECK-NEXT: warn_octal_escape_too_large
245CHECK-NEXT: warn_odr_tag_type_inconsistent
246CHECK-NEXT: warn_on_superclass_use
247CHECK-NEXT: warn_ownin_getter_rule
248CHECK-NEXT: warn_param_default_argument_redefinition
249CHECK-NEXT: warn_parens_disambiguated_as_function_decl
250CHECK-NEXT: warn_partial_specs_not_deducible
251CHECK-NEXT: warn_pointer_attribute_wrong_type
252CHECK-NEXT: warn_pp_convert_lhs_to_positive
253CHECK-NEXT: warn_pp_convert_rhs_to_positive
254CHECK-NEXT: warn_pp_expr_overflow
Ted Kremenek84251262011-08-11 22:06:55 +0000255CHECK-NEXT: warn_pp_line_decimal
256CHECK-NEXT: warn_pragma_align_expected_equal
257CHECK-NEXT: warn_pragma_align_invalid_option
258CHECK-NEXT: warn_pragma_debug_unexpected_command
259CHECK-NEXT: warn_pragma_expected_colon
260CHECK-NEXT: warn_pragma_expected_enable_disable
261CHECK-NEXT: warn_pragma_expected_identifier
262CHECK-NEXT: warn_pragma_expected_lparen
263CHECK-NEXT: warn_pragma_expected_rparen
264CHECK-NEXT: warn_pragma_extra_tokens_at_eol
265CHECK-NEXT: warn_pragma_ms_struct
266CHECK-NEXT: warn_pragma_options_align_reset_failed
267CHECK-NEXT: warn_pragma_options_align_unsupported_option
268CHECK-NEXT: warn_pragma_options_expected_align
269CHECK-NEXT: warn_pragma_pack_invalid_action
270CHECK-NEXT: warn_pragma_pack_invalid_alignment
271CHECK-NEXT: warn_pragma_pack_invalid_constant
272CHECK-NEXT: warn_pragma_pack_malformed
273CHECK-NEXT: warn_pragma_pack_pop_failed
274CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment
275CHECK-NEXT: warn_pragma_pack_show
276CHECK-NEXT: warn_pragma_pop_macro_no_push
277CHECK-NEXT: warn_pragma_unknown_extension
278CHECK-NEXT: warn_pragma_unused_expected_punc
279CHECK-NEXT: warn_pragma_unused_expected_var
280CHECK-NEXT: warn_pragma_unused_expected_var_arg
281CHECK-NEXT: warn_pragma_unused_undeclared_var
282CHECK-NEXT: warn_previous_alias_decl
283CHECK-NEXT: warn_printf_asterisk_missing_arg
284CHECK-NEXT: warn_property_attr_mismatch
285CHECK-NEXT: warn_property_attribute
286CHECK-NEXT: warn_property_getter_owning_mismatch
287CHECK-NEXT: warn_property_types_are_incompatible
288CHECK-NEXT: warn_readonly_property
289CHECK-NEXT: warn_receiver_forward_class
290CHECK-NEXT: warn_redecl_library_builtin
291CHECK-NEXT: warn_redeclaration_without_attribute_prev_attribute_ignored
292CHECK-NEXT: warn_register_objc_catch_parm
293CHECK-NEXT: warn_related_result_type_compatibility_class
294CHECK-NEXT: warn_related_result_type_compatibility_protocol
295CHECK-NEXT: warn_remainder_by_zero
296CHECK-NEXT: warn_root_inst_method_not_found
297CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument
298CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible
299CHECK-NEXT: warn_setter_getter_impl_required
300CHECK-NEXT: warn_setter_getter_impl_required_in_category
301CHECK-NEXT: warn_shift_gt_typewidth
302CHECK-NEXT: warn_shift_negative
303CHECK-NEXT: warn_standalone_specifier
304CHECK-NEXT: warn_static_inline_explicit_inst_ignored
305CHECK-NEXT: warn_static_non_static
Ted Kremenek84251262011-08-11 22:06:55 +0000306CHECK-NEXT: warn_template_export_unsupported
307CHECK-NEXT: warn_template_spec_extra_headers
308CHECK-NEXT: warn_tentative_incomplete_array
309CHECK-NEXT: warn_transparent_union_attribute_field_size_align
310CHECK-NEXT: warn_transparent_union_attribute_floating
311CHECK-NEXT: warn_transparent_union_attribute_not_definition
312CHECK-NEXT: warn_transparent_union_attribute_zero_fields
313CHECK-NEXT: warn_transparent_union_nonpointer
314CHECK-NEXT: warn_typecheck_cond_incompatible_pointers
315CHECK-NEXT: warn_typecheck_cond_pointer_integer_mismatch
316CHECK-NEXT: warn_typecheck_function_qualifiers
Ted Kremenek84251262011-08-11 22:06:55 +0000317CHECK-NEXT: warn_ucn_escape_too_large
318CHECK-NEXT: warn_ucn_not_valid_in_c89
319CHECK-NEXT: warn_unavailable_fwdclass_message
320CHECK-NEXT: warn_undef_interface
321CHECK-NEXT: warn_undef_interface_suggest
322CHECK-NEXT: warn_undef_protocolref
323CHECK-NEXT: warn_undefined_internal
324CHECK-NEXT: warn_uninit_val
Chandler Carruth579a0522011-08-17 08:56:14 +0000325CHECK-NEXT: warn_unknown_analyzer_checker
Ted Kremenek84251262011-08-11 22:06:55 +0000326CHECK-NEXT: warn_unknown_method_family
Ted Kremenek84251262011-08-11 22:06:55 +0000327CHECK-NEXT: warn_unterminated_char
328CHECK-NEXT: warn_unterminated_string
Ted Kremenek84251262011-08-11 22:06:55 +0000329CHECK-NEXT: warn_use_out_of_scope_declaration
330CHECK-NEXT: warn_weak_identifier_undeclared
331CHECK-NEXT: warn_weak_import