83 lines · c
1RUN: diagtool list-warnings > %t 2>&12RUN: FileCheck --input-file=%t %s3 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 you take an existing warning and add a flag, this test will fail.10 To 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. All13 new warnings should have -W flags.14 15 If you add a new warning without a flag, this test will fail. To fix16 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 21CHECK: Warnings without flags (56):22 23CHECK-NEXT: ext_expected_semi_decl_list24CHECK-NEXT: ext_missing_whitespace_after_macro_name25CHECK-NEXT: ext_new_paren_array_nonconst26CHECK-NEXT: ext_plain_complex27CHECK-NEXT: ext_typecheck_cond_incompatible_operands28CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer29CHECK-NEXT: ext_using_undefined_std30CHECK-NEXT: pp_invalid_string_literal31CHECK-NEXT: pp_out_of_date_dependency32CHECK-NEXT: pp_poisoning_existing_macro33CHECK-NEXT: warn_accessor_property_type_mismatch34CHECK-NEXT: warn_asm_label_on_auto_decl35CHECK-NEXT: warn_c_kext36CHECK-NEXT: warn_call_wrong_number_of_arguments37CHECK-NEXT: warn_case_empty_range38CHECK-NEXT: warn_char_constant_too_large39CHECK-NEXT: warn_collection_expr_type40CHECK-NEXT: warn_conflicting_variadic41CHECK-NEXT: warn_delete_array_type42CHECK-NEXT: warn_double_const_requires_fp6443CHECK-NEXT: warn_drv_assuming_mfloat_abi_is44CHECK-NEXT: warn_drv_clang_unsupported45CHECK-NEXT: warn_drv_pch_not_first_include46CHECK-NEXT: warn_expected_qualified_after_typename47CHECK-NEXT: warn_fe_backend_unsupported48CHECK-NEXT: warn_fe_cc_log_diagnostics_failure49CHECK-NEXT: warn_fe_cc_print_header_failure50CHECK-NEXT: warn_fe_macro_contains_embedded_newline51CHECK-NEXT: warn_ignoring_ftabstop_value52CHECK-NEXT: warn_implements_nscopying53CHECK-NEXT: warn_incompatible_qualified_id54CHECK-NEXT: warn_invalid_cpu_supports55CHECK-NEXT: warn_maynot_respond56CHECK-NEXT: warn_method_param_redefinition57CHECK-NEXT: warn_missing_case_for_condition58CHECK-NEXT: warn_missing_dependent_template_keyword59CHECK-NEXT: warn_missing_whitespace_after_macro_name60CHECK-NEXT: warn_not_compound_assign61CHECK-NEXT: warn_objc_property_copy_missing_on_block62CHECK-NEXT: warn_objc_protocol_qualifier_missing_id63CHECK-NEXT: warn_on_superclass_use64CHECK-NEXT: warn_pp_convert_to_positive65CHECK-NEXT: warn_pp_expr_overflow66CHECK-NEXT: warn_pp_line_decimal67CHECK-NEXT: warn_pragma_pack_pop_identifier_and_alignment68CHECK-NEXT: warn_pragma_pack_show69CHECK-NEXT: warn_property_getter_owning_mismatch70CHECK-NEXT: warn_register_objc_catch_parm71CHECK-NEXT: warn_related_result_type_compatibility_class72CHECK-NEXT: warn_related_result_type_compatibility_protocol73CHECK-NEXT: warn_template_export_unsupported74CHECK-NEXT: warn_undef_interface75CHECK-NEXT: warn_undef_interface_suggest76CHECK-NEXT: warn_undef_protocolref77CHECK-NEXT: warn_weak_identifier_undeclared78CHECK-NEXT: warn_weak_import79 80The list of warnings in -Wpedantic should NEVER grow.81 82CHECK: Number in -Wpedantic (not covered by other -W flags): 2483