Ted Kremenek | c0a4377 | 2012-07-25 07:12:13 +0000 | [diff] [blame] | 1 | RUN: diagtool list-warnings > %t 2>&1 |
| 2 | RUN: FileCheck --input-file=%t %s |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 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. |
Sylvestre Ledru | 1691dc4 | 2013-11-12 18:07:35 +0000 | [diff] [blame] | 8 | |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 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. |
Sylvestre Ledru | 1691dc4 | 2013-11-12 18:07:35 +0000 | [diff] [blame] | 11 | |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 12 | (2) It prevents us adding new warnings to Clang that have no -W flag. All |
| 13 | new warnings should have -W flags. |
Sylvestre Ledru | 1691dc4 | 2013-11-12 18:07:35 +0000 | [diff] [blame] | 14 | |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 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. |
Sylvestre Ledru | 1691dc4 | 2013-11-12 18:07:35 +0000 | [diff] [blame] | 17 | |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 18 | |
| 19 | The list of warnings below should NEVER grow. It should gradually shrink to 0. |
| 20 | |
Pirama Arumuga Nainar | 33337ca | 2015-05-06 11:48:57 -0700 | [diff] [blame] | 21 | CHECK: Warnings without flags (93): |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 22 | CHECK-NEXT: ext_excess_initializers |
| 23 | CHECK-NEXT: ext_excess_initializers_in_char_array_initializer |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 24 | CHECK-NEXT: ext_expected_semi_decl_list |
| 25 | CHECK-NEXT: ext_explicit_specialization_storage_class |
| 26 | CHECK-NEXT: ext_implicit_lib_function_decl |
Stephen Hines | 176edba | 2014-12-01 14:53:08 -0800 | [diff] [blame] | 27 | CHECK-NEXT: ext_initializer_string_for_char_array_too_long |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 28 | CHECK-NEXT: ext_missing_declspec |
| 29 | CHECK-NEXT: ext_missing_whitespace_after_macro_name |
| 30 | CHECK-NEXT: ext_new_paren_array_nonconst |
| 31 | CHECK-NEXT: ext_plain_complex |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 32 | CHECK-NEXT: ext_template_arg_extra_parens |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 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 |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 38 | CHECK-NEXT: ext_using_undefined_std |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 39 | CHECK-NEXT: pp_include_next_absolute_path |
| 40 | CHECK-NEXT: pp_include_next_in_primary |
| 41 | CHECK-NEXT: pp_invalid_string_literal |
| 42 | CHECK-NEXT: pp_out_of_date_dependency |
| 43 | CHECK-NEXT: pp_poisoning_existing_macro |
| 44 | CHECK-NEXT: pp_pragma_once_in_main_file |
| 45 | CHECK-NEXT: pp_pragma_sysheader_in_main_file |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 46 | CHECK-NEXT: w_asm_qualifier_ignored |
| 47 | CHECK-NEXT: warn_accessor_property_type_mismatch |
| 48 | CHECK-NEXT: warn_anon_bitfield_width_exceeds_type_size |
Stephen Hines | 6bcf27b | 2014-05-29 04:14:42 -0700 | [diff] [blame] | 49 | CHECK-NEXT: warn_arcmt_nsalloc_realloc |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 50 | CHECK-NEXT: warn_asm_label_on_auto_decl |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 51 | CHECK-NEXT: warn_bitfield_width_exceeds_type_size |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 52 | CHECK-NEXT: warn_c_kext |
| 53 | CHECK-NEXT: warn_call_to_pure_virtual_member_function_from_ctor_dtor |
| 54 | CHECK-NEXT: warn_call_wrong_number_of_arguments |
| 55 | CHECK-NEXT: warn_case_empty_range |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 56 | CHECK-NEXT: warn_char_constant_too_large |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 57 | CHECK-NEXT: warn_collection_expr_type |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 58 | CHECK-NEXT: warn_conflicting_variadic |
| 59 | CHECK-NEXT: warn_conv_to_base_not_used |
| 60 | CHECK-NEXT: warn_conv_to_self_not_used |
| 61 | CHECK-NEXT: warn_conv_to_void_not_used |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 62 | CHECK-NEXT: warn_delete_array_type |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 63 | CHECK-NEXT: warn_double_const_requires_fp64 |
| 64 | CHECK-NEXT: warn_drv_assuming_mfloat_abi_is |
| 65 | CHECK-NEXT: warn_drv_clang_unsupported |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 66 | CHECK-NEXT: warn_drv_objc_gc_unsupported |
| 67 | CHECK-NEXT: warn_drv_pch_not_first_include |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 68 | CHECK-NEXT: warn_dup_category_def |
| 69 | CHECK-NEXT: warn_duplicate_protocol_def |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 70 | CHECK-NEXT: warn_enum_value_overflow |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 71 | CHECK-NEXT: warn_expected_qualified_after_typename |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 72 | CHECK-NEXT: warn_extraneous_char_constant |
| 73 | CHECK-NEXT: warn_fe_cc_log_diagnostics_failure |
| 74 | CHECK-NEXT: warn_fe_cc_print_header_failure |
| 75 | CHECK-NEXT: warn_fe_macro_contains_embedded_newline |
| 76 | CHECK-NEXT: warn_file_asm_volatile |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 77 | CHECK-NEXT: warn_ignoring_ftabstop_value |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 78 | CHECK-NEXT: warn_implements_nscopying |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 79 | CHECK-NEXT: warn_incompatible_qualified_id |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 80 | CHECK-NEXT: warn_inline_namespace_reopened_noninline |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 81 | CHECK-NEXT: warn_invalid_asm_cast_lvalue |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 82 | CHECK-NEXT: warn_maynot_respond |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 83 | CHECK-NEXT: warn_method_param_redefinition |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 84 | CHECK-NEXT: warn_missing_case_for_condition |
Ted Kremenek | bb5185c | 2012-08-10 20:50:00 +0000 | [diff] [blame] | 85 | CHECK-NEXT: warn_missing_dependent_template_keyword |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 86 | CHECK-NEXT: warn_missing_exception_specification |
| 87 | CHECK-NEXT: warn_missing_whitespace_after_macro_name |
Stephen Hines | 651f13c | 2014-04-23 16:59:28 -0700 | [diff] [blame] | 88 | CHECK-NEXT: warn_mt_message |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 89 | CHECK-NEXT: warn_no_constructor_for_refconst |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 90 | CHECK-NEXT: warn_not_compound_assign |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 91 | CHECK-NEXT: warn_objc_property_copy_missing_on_block |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 92 | CHECK-NEXT: warn_objc_protocol_qualifier_missing_id |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 93 | CHECK-NEXT: warn_on_superclass_use |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 94 | CHECK-NEXT: warn_partial_specs_not_deducible |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 95 | CHECK-NEXT: warn_pp_convert_lhs_to_positive |
| 96 | CHECK-NEXT: warn_pp_convert_rhs_to_positive |
| 97 | CHECK-NEXT: warn_pp_expr_overflow |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 98 | CHECK-NEXT: warn_pp_line_decimal |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 99 | CHECK-NEXT: warn_pragma_pack_pop_identifer_and_alignment |
| 100 | CHECK-NEXT: warn_pragma_pack_show |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 101 | CHECK-NEXT: warn_property_getter_owning_mismatch |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 102 | CHECK-NEXT: warn_register_objc_catch_parm |
| 103 | CHECK-NEXT: warn_related_result_type_compatibility_class |
| 104 | CHECK-NEXT: warn_related_result_type_compatibility_protocol |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 105 | CHECK-NEXT: warn_template_export_unsupported |
| 106 | CHECK-NEXT: warn_template_spec_extra_headers |
| 107 | CHECK-NEXT: warn_tentative_incomplete_array |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 108 | CHECK-NEXT: warn_typecheck_function_qualifiers |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 109 | CHECK-NEXT: warn_undef_interface |
| 110 | CHECK-NEXT: warn_undef_interface_suggest |
| 111 | CHECK-NEXT: warn_undef_protocolref |
Ted Kremenek | 8425126 | 2011-08-11 22:06:55 +0000 | [diff] [blame] | 112 | CHECK-NEXT: warn_use_out_of_scope_declaration |
| 113 | CHECK-NEXT: warn_weak_identifier_undeclared |
| 114 | CHECK-NEXT: warn_weak_import |
Ted Kremenek | e8cf7d1 | 2012-07-07 05:53:30 +0000 | [diff] [blame] | 115 | |
Richard Smith | eab9d6f | 2012-07-23 05:45:25 +0000 | [diff] [blame] | 116 | The list of warnings in -Wpedantic should NEVER grow. |
Ted Kremenek | a437b84 | 2012-07-07 06:30:31 +0000 | [diff] [blame] | 117 | |
Eli Friedman | 5f33c37 | 2013-09-18 23:23:17 +0000 | [diff] [blame] | 118 | CHECK: Number in -Wpedantic (not covered by other -W flags): 28 |