blob: 5968851d09b0f116b5ba72a5f2d95f678e0b1e1d [file] [log] [blame]
Ted Kremenekc0a43772012-07-25 07:12:13 +00001RUN: diagtool list-warnings > %t 2>&1
2RUN: FileCheck --input-file=%t %s
Ted Kremenek84251262011-08-11 22:06:55 +00003
4This 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
19The list of warnings below should NEVER grow. It should gradually shrink to 0.
20
Ted Kremenekbb5185c2012-08-10 20:50:00 +000021CHECK: Warnings without flags (159):
22CHECK-NEXT: ext_delete_void_ptr_operand
23CHECK-NEXT: ext_enum_friend
24CHECK-NEXT: ext_expected_semi_decl_list
25CHECK-NEXT: ext_explicit_specialization_storage_class
26CHECK-NEXT: ext_implicit_lib_function_decl
27CHECK-NEXT: ext_missing_declspec
28CHECK-NEXT: ext_missing_whitespace_after_macro_name
29CHECK-NEXT: ext_new_paren_array_nonconst
30CHECK-NEXT: ext_plain_complex
31CHECK-NEXT: ext_pp_macro_redef
32CHECK-NEXT: ext_template_arg_extra_parens
33CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers
34CHECK-NEXT: ext_typecheck_comparison_of_distinct_pointers_nonstandard
35CHECK-NEXT: ext_typecheck_comparison_of_pointer_integer
36CHECK-NEXT: ext_typecheck_cond_incompatible_operands
37CHECK-NEXT: ext_typecheck_cond_incompatible_operands_nonstandard
38CHECK-NEXT: ext_typecheck_ordered_comparison_of_function_pointers
39CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer
40CHECK-NEXT: ext_unknown_escape
41CHECK-NEXT: ext_using_undefined_std
Ted Kremenek84251262011-08-11 22:06:55 +000042CHECK-NEXT: pp_include_next_absolute_path
43CHECK-NEXT: pp_include_next_in_primary
44CHECK-NEXT: pp_invalid_string_literal
45CHECK-NEXT: pp_out_of_date_dependency
46CHECK-NEXT: pp_poisoning_existing_macro
47CHECK-NEXT: pp_pragma_once_in_main_file
48CHECK-NEXT: pp_pragma_sysheader_in_main_file
49CHECK-NEXT: pp_undef_builtin_macro
50CHECK-NEXT: w_asm_qualifier_ignored
51CHECK-NEXT: warn_accessor_property_type_mismatch
52CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size
53CHECK-NEXT: warn_asm_label_on_auto_decl
Ted Kremenek84251262011-08-11 22:06:55 +000054CHECK-NEXT: warn_bitfield_width_exceeds_type_size
55CHECK-NEXT: warn_bool_switch_condition
56CHECK-NEXT: warn_braces_around_scalar_init
Ted Kremenek84251262011-08-11 22:06:55 +000057CHECK-NEXT: warn_c_kext
58CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor
59CHECK-NEXT: warn_call_wrong_number_of_arguments
60CHECK-NEXT: warn_case_empty_range
Ted Kremenek84251262011-08-11 22:06:55 +000061CHECK-NEXT: warn_char_constant_too_large
Ted Kremenek84251262011-08-11 22:06:55 +000062CHECK-NEXT: warn_cmdline_missing_macro_defs
63CHECK-NEXT: warn_collection_expr_type
64CHECK-NEXT: warn_conflicting_param_types
65CHECK-NEXT: warn_conflicting_ret_types
66CHECK-NEXT: warn_conflicting_variadic
67CHECK-NEXT: warn_conv_to_base_not_used
68CHECK-NEXT: warn_conv_to_self_not_used
69CHECK-NEXT: warn_conv_to_void_not_used
Ted Kremenek84251262011-08-11 22:06:55 +000070CHECK-NEXT: warn_delete_array_type
Ted Kremenek84251262011-08-11 22:06:55 +000071CHECK-NEXT: warn_double_const_requires_fp64
72CHECK-NEXT: warn_drv_assuming_mfloat_abi_is
73CHECK-NEXT: warn_drv_clang_unsupported
Ted Kremenek84251262011-08-11 22:06:55 +000074CHECK-NEXT: warn_drv_not_using_clang_arch
75CHECK-NEXT: warn_drv_not_using_clang_cpp
76CHECK-NEXT: warn_drv_not_using_clang_cxx
77CHECK-NEXT: warn_drv_objc_gc_unsupported
78CHECK-NEXT: warn_drv_pch_not_first_include
Ted Kremenek84251262011-08-11 22:06:55 +000079CHECK-NEXT: warn_dup_category_def
80CHECK-NEXT: warn_duplicate_protocol_def
81CHECK-NEXT: warn_enum_too_large
82CHECK-NEXT: warn_enum_value_overflow
83CHECK-NEXT: warn_enumerator_too_large
84CHECK-NEXT: warn_exception_caught_by_earlier_handler
Ted Kremenekbb5185c2012-08-10 20:50:00 +000085CHECK-NEXT: warn_excess_initializers
86CHECK-NEXT: warn_excess_initializers_in_char_array_initializer
87CHECK-NEXT: warn_expected_qualified_after_typename
Ted Kremenek84251262011-08-11 22:06:55 +000088CHECK-NEXT: warn_extraneous_char_constant
89CHECK-NEXT: warn_fe_cc_log_diagnostics_failure
90CHECK-NEXT: warn_fe_cc_print_header_failure
91CHECK-NEXT: warn_fe_macro_contains_embedded_newline
92CHECK-NEXT: warn_file_asm_volatile
Ted Kremenekbb5185c2012-08-10 20:50:00 +000093CHECK-NEXT: warn_hex_escape_too_large
Ted Kremenek84251262011-08-11 22:06:55 +000094CHECK-NEXT: warn_ignoring_ftabstop_value
Ted Kremenek84251262011-08-11 22:06:55 +000095CHECK-NEXT: warn_implements_nscopying
Ted Kremenek84251262011-08-11 22:06:55 +000096CHECK-NEXT: warn_incompatible_qualified_id
Ted Kremenekbb5185c2012-08-10 20:50:00 +000097CHECK-NEXT: warn_initializer_string_for_char_array_too_long
Ted Kremenek84251262011-08-11 22:06:55 +000098CHECK-NEXT: warn_inline_namespace_reopened_noninline
Ted Kremenek84251262011-08-11 22:06:55 +000099CHECK-NEXT: warn_integer_too_large
100CHECK-NEXT: warn_integer_too_large_for_signed
101CHECK-NEXT: warn_invalid_asm_cast_lvalue
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000102CHECK-NEXT: warn_many_braces_around_scalar_init
Ted Kremenek84251262011-08-11 22:06:55 +0000103CHECK-NEXT: warn_maynot_respond
104CHECK-NEXT: warn_member_extra_qualification
105CHECK-NEXT: warn_method_param_redefinition
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000106CHECK-NEXT: warn_mismatched_exception_spec
Ted Kremenek84251262011-08-11 22:06:55 +0000107CHECK-NEXT: warn_missing_case_for_condition
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000108CHECK-NEXT: warn_missing_dependent_template_keyword
Ted Kremenek84251262011-08-11 22:06:55 +0000109CHECK-NEXT: warn_missing_exception_specification
110CHECK-NEXT: warn_missing_whitespace_after_macro_name
111CHECK-NEXT: warn_multiple_method_decl
112CHECK-NEXT: warn_no_constructor_for_refconst
113CHECK-NEXT: warn_nonnull_pointers_only
114CHECK-NEXT: warn_not_compound_assign
Ted Kremenek84251262011-08-11 22:06:55 +0000115CHECK-NEXT: warn_objc_property_copy_missing_on_block
Ted Kremenek84251262011-08-11 22:06:55 +0000116CHECK-NEXT: warn_objc_protocol_qualifier_missing_id
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000117CHECK-NEXT: warn_octal_escape_too_large
Ted Kremenek84251262011-08-11 22:06:55 +0000118CHECK-NEXT: warn_odr_tag_type_inconsistent
119CHECK-NEXT: warn_on_superclass_use
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000120CHECK-NEXT: warn_param_default_argument_redefinition
Ted Kremenek84251262011-08-11 22:06:55 +0000121CHECK-NEXT: warn_partial_specs_not_deducible
Ted Kremenek84251262011-08-11 22:06:55 +0000122CHECK-NEXT: warn_pp_convert_lhs_to_positive
123CHECK-NEXT: warn_pp_convert_rhs_to_positive
124CHECK-NEXT: warn_pp_expr_overflow
Ted Kremenek84251262011-08-11 22:06:55 +0000125CHECK-NEXT: warn_pp_line_decimal
126CHECK-NEXT: warn_pragma_align_expected_equal
127CHECK-NEXT: warn_pragma_align_invalid_option
128CHECK-NEXT: warn_pragma_debug_unexpected_command
129CHECK-NEXT: warn_pragma_expected_colon
130CHECK-NEXT: warn_pragma_expected_enable_disable
131CHECK-NEXT: warn_pragma_expected_identifier
132CHECK-NEXT: warn_pragma_expected_lparen
133CHECK-NEXT: warn_pragma_expected_rparen
134CHECK-NEXT: warn_pragma_extra_tokens_at_eol
135CHECK-NEXT: warn_pragma_ms_struct
136CHECK-NEXT: warn_pragma_options_align_reset_failed
137CHECK-NEXT: warn_pragma_options_align_unsupported_option
138CHECK-NEXT: warn_pragma_options_expected_align
139CHECK-NEXT: warn_pragma_pack_invalid_action
140CHECK-NEXT: warn_pragma_pack_invalid_alignment
Ted Kremenek84251262011-08-11 22:06:55 +0000141CHECK-NEXT: warn_pragma_pack_malformed
142CHECK-NEXT: warn_pragma_pack_pop_failed
143CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment
144CHECK-NEXT: warn_pragma_pack_show
145CHECK-NEXT: warn_pragma_pop_macro_no_push
146CHECK-NEXT: warn_pragma_unknown_extension
147CHECK-NEXT: warn_pragma_unused_expected_punc
148CHECK-NEXT: warn_pragma_unused_expected_var
149CHECK-NEXT: warn_pragma_unused_expected_var_arg
150CHECK-NEXT: warn_pragma_unused_undeclared_var
151CHECK-NEXT: warn_previous_alias_decl
152CHECK-NEXT: warn_printf_asterisk_missing_arg
153CHECK-NEXT: warn_property_attr_mismatch
154CHECK-NEXT: warn_property_attribute
155CHECK-NEXT: warn_property_getter_owning_mismatch
156CHECK-NEXT: warn_property_types_are_incompatible
157CHECK-NEXT: warn_readonly_property
Ted Kremenek84251262011-08-11 22:06:55 +0000158CHECK-NEXT: warn_redecl_library_builtin
159CHECK-NEXT: warn_redeclaration_without_attribute_prev_attribute_ignored
160CHECK-NEXT: warn_register_objc_catch_parm
161CHECK-NEXT: warn_related_result_type_compatibility_class
162CHECK-NEXT: warn_related_result_type_compatibility_protocol
Ted Kremenek84251262011-08-11 22:06:55 +0000163CHECK-NEXT: warn_second_parameter_of_va_start_not_last_named_argument
164CHECK-NEXT: warn_second_parameter_to_va_arg_never_compatible
Ted Kremenek84251262011-08-11 22:06:55 +0000165CHECK-NEXT: warn_standalone_specifier
166CHECK-NEXT: warn_static_inline_explicit_inst_ignored
Ted Kremenekbb5185c2012-08-10 20:50:00 +0000167CHECK-NEXT: warn_static_non_static
Ted Kremenek84251262011-08-11 22:06:55 +0000168CHECK-NEXT: warn_template_export_unsupported
169CHECK-NEXT: warn_template_spec_extra_headers
170CHECK-NEXT: warn_tentative_incomplete_array
Ted Kremenek84251262011-08-11 22:06:55 +0000171CHECK-NEXT: warn_typecheck_function_qualifiers
Ted Kremenek84251262011-08-11 22:06:55 +0000172CHECK-NEXT: warn_unavailable_fwdclass_message
173CHECK-NEXT: warn_undef_interface
174CHECK-NEXT: warn_undef_interface_suggest
175CHECK-NEXT: warn_undef_protocolref
176CHECK-NEXT: warn_undefined_internal
Ted Kremenek84251262011-08-11 22:06:55 +0000177CHECK-NEXT: warn_unknown_method_family
Ted Kremenek84251262011-08-11 22:06:55 +0000178CHECK-NEXT: warn_use_out_of_scope_declaration
179CHECK-NEXT: warn_weak_identifier_undeclared
180CHECK-NEXT: warn_weak_import
Ted Kremeneke8cf7d12012-07-07 05:53:30 +0000181
Richard Smitheab9d6f2012-07-23 05:45:25 +0000182The list of warnings in -Wpedantic should NEVER grow.
Ted Kremeneka437b842012-07-07 06:30:31 +0000183
Aaron Ballmanc8286202012-08-28 20:55:40 +0000184CHECK: Number in -Wpedantic (not covered by other -W flags): 38