2012-07-25 15:12:13 +08:00
|
|
|
RUN: diagtool list-warnings > %t 2>&1
|
|
|
|
RUN: FileCheck --input-file=%t %s
|
2011-08-12 06:06:55 +08:00
|
|
|
|
|
|
|
This test serves two purposes:
|
|
|
|
|
|
|
|
(1) It documents all existing warnings that currently have no associated -W flag,
|
|
|
|
and ensures that the list never grows.
|
2013-11-13 02:07:35 +08:00
|
|
|
|
2017-05-09 01:06:17 +08:00
|
|
|
If you take an existing warning and add a flag, this test will fail.
|
|
|
|
To fix this test, simply remove that warning from the list below.
|
2013-11-13 02:07:35 +08:00
|
|
|
|
2011-08-12 06:06:55 +08:00
|
|
|
(2) It prevents us adding new warnings to Clang that have no -W flag. All
|
|
|
|
new warnings should have -W flags.
|
2013-11-13 02:07:35 +08:00
|
|
|
|
2011-08-12 06:06:55 +08:00
|
|
|
If you add a new warning without a flag, this test will fail. To fix
|
|
|
|
this test, simply add a warning group to that warning.
|
2013-11-13 02:07:35 +08:00
|
|
|
|
2011-08-12 06:06:55 +08:00
|
|
|
|
|
|
|
The list of warnings below should NEVER grow. It should gradually shrink to 0.
|
|
|
|
|
2020-09-20 06:49:44 +08:00
|
|
|
CHECK: Warnings without flags (68):
|
2020-06-10 20:55:42 +08:00
|
|
|
|
2012-08-11 04:50:00 +08:00
|
|
|
CHECK-NEXT: ext_expected_semi_decl_list
|
|
|
|
CHECK-NEXT: ext_explicit_specialization_storage_class
|
|
|
|
CHECK-NEXT: ext_missing_declspec
|
|
|
|
CHECK-NEXT: ext_missing_whitespace_after_macro_name
|
|
|
|
CHECK-NEXT: ext_new_paren_array_nonconst
|
|
|
|
CHECK-NEXT: ext_plain_complex
|
|
|
|
CHECK-NEXT: ext_template_arg_extra_parens
|
|
|
|
CHECK-NEXT: ext_typecheck_cond_incompatible_operands
|
|
|
|
CHECK-NEXT: ext_typecheck_ordered_comparison_of_pointer_integer
|
|
|
|
CHECK-NEXT: ext_using_undefined_std
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: pp_invalid_string_literal
|
|
|
|
CHECK-NEXT: pp_out_of_date_dependency
|
|
|
|
CHECK-NEXT: pp_poisoning_existing_macro
|
|
|
|
CHECK-NEXT: warn_accessor_property_type_mismatch
|
2014-05-20 07:48:49 +08:00
|
|
|
CHECK-NEXT: warn_arcmt_nsalloc_realloc
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_asm_label_on_auto_decl
|
|
|
|
CHECK-NEXT: warn_c_kext
|
|
|
|
CHECK-NEXT: warn_call_wrong_number_of_arguments
|
|
|
|
CHECK-NEXT: warn_case_empty_range
|
|
|
|
CHECK-NEXT: warn_char_constant_too_large
|
|
|
|
CHECK-NEXT: warn_collection_expr_type
|
|
|
|
CHECK-NEXT: warn_conflicting_variadic
|
|
|
|
CHECK-NEXT: warn_delete_array_type
|
|
|
|
CHECK-NEXT: warn_double_const_requires_fp64
|
|
|
|
CHECK-NEXT: warn_drv_assuming_mfloat_abi_is
|
|
|
|
CHECK-NEXT: warn_drv_clang_unsupported
|
|
|
|
CHECK-NEXT: warn_drv_pch_not_first_include
|
|
|
|
CHECK-NEXT: warn_dup_category_def
|
|
|
|
CHECK-NEXT: warn_enum_value_overflow
|
2012-08-11 04:50:00 +08:00
|
|
|
CHECK-NEXT: warn_expected_qualified_after_typename
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_extraneous_char_constant
|
2020-04-28 01:18:39 +08:00
|
|
|
CHECK-NEXT: warn_fe_backend_unsupported
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_fe_cc_log_diagnostics_failure
|
|
|
|
CHECK-NEXT: warn_fe_cc_print_header_failure
|
|
|
|
CHECK-NEXT: warn_fe_macro_contains_embedded_newline
|
|
|
|
CHECK-NEXT: warn_ignoring_ftabstop_value
|
|
|
|
CHECK-NEXT: warn_implements_nscopying
|
|
|
|
CHECK-NEXT: warn_incompatible_qualified_id
|
|
|
|
CHECK-NEXT: warn_invalid_asm_cast_lvalue
|
|
|
|
CHECK-NEXT: warn_maynot_respond
|
|
|
|
CHECK-NEXT: warn_method_param_redefinition
|
|
|
|
CHECK-NEXT: warn_missing_case_for_condition
|
2012-08-11 04:50:00 +08:00
|
|
|
CHECK-NEXT: warn_missing_dependent_template_keyword
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_missing_whitespace_after_macro_name
|
2014-01-26 13:07:32 +08:00
|
|
|
CHECK-NEXT: warn_mt_message
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_no_constructor_for_refconst
|
|
|
|
CHECK-NEXT: warn_not_compound_assign
|
|
|
|
CHECK-NEXT: warn_objc_property_copy_missing_on_block
|
|
|
|
CHECK-NEXT: warn_objc_protocol_qualifier_missing_id
|
|
|
|
CHECK-NEXT: warn_on_superclass_use
|
2015-11-14 10:09:55 +08:00
|
|
|
CHECK-NEXT: warn_pp_convert_to_positive
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_pp_expr_overflow
|
|
|
|
CHECK-NEXT: warn_pp_line_decimal
|
2018-04-06 23:14:32 +08:00
|
|
|
CHECK-NEXT: warn_pragma_pack_pop_identifier_and_alignment
|
2011-08-12 06:06:55 +08:00
|
|
|
CHECK-NEXT: warn_pragma_pack_show
|
|
|
|
CHECK-NEXT: warn_property_getter_owning_mismatch
|
|
|
|
CHECK-NEXT: warn_register_objc_catch_parm
|
|
|
|
CHECK-NEXT: warn_related_result_type_compatibility_class
|
|
|
|
CHECK-NEXT: warn_related_result_type_compatibility_protocol
|
|
|
|
CHECK-NEXT: warn_template_export_unsupported
|
|
|
|
CHECK-NEXT: warn_template_spec_extra_headers
|
|
|
|
CHECK-NEXT: warn_tentative_incomplete_array
|
|
|
|
CHECK-NEXT: warn_typecheck_function_qualifiers
|
|
|
|
CHECK-NEXT: warn_undef_interface
|
|
|
|
CHECK-NEXT: warn_undef_interface_suggest
|
|
|
|
CHECK-NEXT: warn_undef_protocolref
|
|
|
|
CHECK-NEXT: warn_weak_identifier_undeclared
|
|
|
|
CHECK-NEXT: warn_weak_import
|
2012-07-07 13:53:30 +08:00
|
|
|
|
2012-07-23 13:45:25 +08:00
|
|
|
The list of warnings in -Wpedantic should NEVER grow.
|
2012-07-07 14:30:31 +08:00
|
|
|
|
2019-07-30 04:00:46 +08:00
|
|
|
CHECK: Number in -Wpedantic (not covered by other -W flags): 27
|