diff options
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 247 |
1 files changed, 198 insertions, 49 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index c9343519e38b..9b2cfe495ce2 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -259,6 +259,9 @@ def err_anyx86_interrupt_attribute : Error< "a pointer as the first parameter|a %2 type as the second parameter}1">; def err_anyx86_interrupt_called : Error< "interrupt service routine cannot be called directly">; +def warn_arm_interrupt_calling_convention : Warning< + "call to function without interrupt attribute could clobber interruptee's VFP registers">, + InGroup<Extra>; def warn_mips_interrupt_attribute : Warning< "MIPS 'interrupt' attribute only applies to functions that have " "%select{no parameters|a 'void' return type}0">, @@ -316,6 +319,9 @@ def warn_unneeded_member_function : Warning< InGroup<UnneededMemberFunction>, DefaultIgnore; def warn_unused_private_field: Warning<"private field %0 is not used">, InGroup<UnusedPrivateField>, DefaultIgnore; +def warn_unused_lambda_capture: Warning<"lambda capture %0 is not " + "%select{used|required to be captured for this use}1">, + InGroup<UnusedLambdaCapture>, DefaultIgnore; def warn_parameter_size: Warning< "%0 is a large (%1 bytes) pass-by-value argument; " @@ -363,7 +369,9 @@ def warn_decl_shadow : "local variable|" "variable in %2|" "static data member of %2|" - "field of %2}1">, + "field of %2|" + "typedef in %2|" + "type alias in %2}1">, InGroup<Shadow>, DefaultIgnore; def warn_decl_shadow_uncaptured_local : Warning<warn_decl_shadow.Text>, @@ -1201,8 +1209,9 @@ def warn_cxx98_compat_unelaborated_friend_type : Warning< def err_qualified_friend_not_found : Error< "no function named %0 with type %1 was found in the specified scope">; def err_introducing_special_friend : Error< - "must use a qualified name when declaring a %select{constructor|" - "destructor|conversion operator}0 as a friend">; + "%plural{[0,2]:must use a qualified name when declaring|3:cannot declare}0" + " a %select{constructor|destructor|conversion operator|deduction guide}0 " + "as a friend">; def err_tagless_friend_type_template : Error< "friend type templates must use an elaborated type">; def err_no_matching_local_friend : Error< @@ -1447,6 +1456,15 @@ def err_nested_name_spec_is_not_class : Error< def ext_nested_name_spec_is_enum : ExtWarn< "use of enumeration in a nested name specifier is a C++11 extension">, InGroup<CXX11>; +def err_out_of_line_qualified_id_type_names_constructor : Error< + "qualified reference to %0 is a constructor name rather than a " + "%select{template name|type}1 in this context">; +def ext_out_of_line_qualified_id_type_names_constructor : ExtWarn< + "ISO C++ specifies that " + "qualified reference to %0 is a constructor name rather than a " + "%select{template name|type}1 in this context, despite preceding " + "%select{'typename'|'template'}2 keyword">, SFINAEFailure, + InGroup<DiagGroup<"injected-class-name">>; // C++ class members def err_storageclass_invalid_for_member : Error< @@ -1608,7 +1626,14 @@ def err_covariant_return_type_class_type_more_qualified : Error< "return type of virtual function %0 is not covariant with the return type of " "the function it overrides (class type %1 is more qualified than class " "type %2">; - + +// C++ implicit special member functions +def note_in_declaration_of_implicit_special_member : Note< + "while declaring the implicit " + "%select{default constructor|copy constructor|move constructor|" + "copy assignment operator|move assignment operator|destructor}1" + " for %0">; + // C++ constructors def err_constructor_cannot_be : Error<"constructor cannot be declared '%0'">; def err_invalid_qualified_constructor : Error< @@ -1664,8 +1689,8 @@ def err_init_conversion_failed : Error< "cannot initialize %select{a variable|a parameter|return object|an " "exception object|a member subobject|an array element|a new value|a value|a " "base class|a constructor delegation|a vector element|a block element|a " - "complex element|a lambda capture|a compound literal initializer|a " - "related result|a parameter of CF audited function}0 " + "block element|a complex element|a lambda capture|a compound literal " + "initializer|a related result|a parameter of CF audited function}0 " "%diff{of type $ with an %select{rvalue|lvalue}2 of type $|" "with an %select{rvalue|lvalue}2 of incompatible type}1,3" "%select{|: different classes%diff{ ($ vs $)|}5,6" @@ -1791,8 +1816,9 @@ def note_uninit_fixit_remove_cond : Note< "remove the %select{'%1' if its condition|condition if it}0 " "is always %select{false|true}2">; def err_init_incomplete_type : Error<"initialization of incomplete type %0">; -def err_list_init_in_parens : Error<"list-initializer for non-class type %0 " - "must not be parenthesized">; +def err_list_init_in_parens : Error< + "cannot initialize %select{non-class|reference}0 type %1 with a " + "parenthesized initializer list">; def warn_unsequenced_mod_mod : Warning< "multiple unsequenced modifications to %0">, InGroup<Unsequenced>; @@ -1833,8 +1859,8 @@ def warn_cxx98_compat_temp_copy : Warning< InGroup<CXX98CompatBindToTemporaryCopy>, DefaultIgnore; def err_selected_explicit_constructor : Error< "chosen constructor is explicit in copy-initialization">; -def note_constructor_declared_here : Note< - "constructor declared here">; +def note_explicit_ctor_deduction_guide_here : Note< + "explicit %select{constructor|deduction guide}0 declared here">; // C++11 decltype def err_decltype_in_declarator : Error< @@ -1845,8 +1871,8 @@ def warn_cxx98_compat_auto_type_specifier : Warning< "'auto' type specifier is incompatible with C++98">, InGroup<CXX98Compat>, DefaultIgnore; def err_auto_variable_cannot_appear_in_own_initializer : Error< - "variable %0 declared with %select{'auto'|'decltype(auto)'|'__auto_type'}1 " - "type cannot appear in its own initializer">; + "variable %0 declared with deduced type %1 " + "cannot appear in its own initializer">; def err_binding_cannot_appear_in_own_initializer : Error< "binding %0 cannot appear in the initializer of its own " "decomposition declaration">; @@ -1855,20 +1881,29 @@ def err_illegal_decl_array_of_auto : Error< def err_new_array_of_auto : Error< "cannot allocate array of 'auto'">; def err_auto_not_allowed : Error< - "%select{'auto'|'decltype(auto)'|'__auto_type'}0 not allowed " + "%select{'auto'|'decltype(auto)'|'__auto_type'|" + "use of " + "%select{class template|function template|variable template|alias template|" + "template template parameter|template}2 %3 requires template arguments; " + "argument deduction}0 not allowed " "%select{in function prototype" "|in non-static struct member|in struct member" "|in non-static union member|in union member" "|in non-static class member|in interface member" - "|in exception declaration|in template parameter|in block literal" + "|in exception declaration|in template parameter until C++1z|in block literal" "|in template argument|in typedef|in type alias|in function return type" "|in conversion function type|here|in lambda parameter" - "|in type allocated by 'new'|in K&R-style function parameter}1" - "%select{|||||||| until C++1z||||||||||}1">; + "|in type allocated by 'new'|in K&R-style function parameter" + "|in template parameter|in friend declaration}1">; +def err_dependent_deduced_tst : Error< + "typename specifier refers to " + "%select{class template|function template|variable template|alias template|" + "template template parameter|template}0 member in %1; " + "argument deduction not allowed here">; def err_auto_not_allowed_var_inst : Error< "'auto' variable template instantiation is not allowed">; def err_auto_var_requires_init : Error< - "declaration of variable %0 with type %1 requires an initializer">; + "declaration of variable %0 with deduced type %1 requires an initializer">; def err_auto_new_requires_ctor_arg : Error< "new expression for type %0 requires a constructor argument">; def err_auto_new_list_init : Error< @@ -1898,8 +1933,13 @@ def err_auto_var_deduction_failure_from_init_list : Error< def err_auto_new_deduction_failure : Error< "new expression for type %0 has incompatible constructor argument of type %1">; def err_auto_different_deductions : Error< - "'%select{auto|decltype(auto)|__auto_type}0' deduced as %1 in declaration " - "of %2 and deduced as %3 in declaration of %4">; + "%select{'auto'|'decltype(auto)'|'__auto_type'|template arguments}0 " + "deduced as %1 in declaration of %2 and " + "deduced as %3 in declaration of %4">; +def err_auto_non_deduced_not_alone : Error< + "%select{function with deduced return type|" + "declaration with trailing return type}0 " + "must be the only declaration in its group">; def err_implied_std_initializer_list_not_found : Error< "cannot deduce type of initializer list because std::initializer_list was " "not found; include <initializer_list>">; @@ -1915,6 +1955,8 @@ def err_auto_bitfield : Error< "cannot pass bit-field as __auto_type initializer in C">; // C++1y decltype(auto) type +def err_decltype_auto_invalid : Error< + "'decltype(auto)' not allowed here">; def err_decltype_auto_cannot_be_combined : Error< "'decltype(auto)' cannot be combined with other type specifiers">; def err_decltype_auto_function_declarator_not_declaration : Error< @@ -1925,6 +1967,56 @@ def err_decltype_auto_compound_type : Error< def err_decltype_auto_initializer_list : Error< "cannot deduce 'decltype(auto)' from initializer list">; +// C++1z deduced class template specialization types +def err_deduced_class_template_compound_type : Error< + "cannot %select{form pointer to|form reference to|form array of|" + "form function returning|use parentheses when declaring variable with}0 " + "deduced class template specialization type">; +def err_deduced_non_class_template_specialization_type : Error< + "%select{<error>|function template|variable template|alias template|" + "template template parameter|template}0 %1 requires template arguments; " + "argument deduction only allowed for class templates">; +def err_deduced_class_template_ctor_ambiguous : Error< + "ambiguous deduction for template arguments of %0">; +def err_deduced_class_template_ctor_no_viable : Error< + "no viable constructor or deduction guide for deduction of " + "template arguments of %0">; +def err_deduced_class_template_incomplete : Error< + "template %0 has no definition and no %select{|viable }1deduction guides " + "for deduction of template arguments">; +def err_deduced_class_template_deleted : Error< + "class template argument deduction for %0 selected a deleted constructor">; +def err_deduced_class_template_explicit : Error< + "class template argument deduction for %0 selected an explicit " + "%select{constructor|deduction guide}1 for copy-list-initialization">; +def err_deduction_guide_no_trailing_return_type : Error< + "deduction guide declaration without trailing return type">; +def err_deduction_guide_bad_trailing_return_type : Error< + "deduced type %1 of deduction guide is not %select{|written as }2" + "a specialization of template %0">; +def err_deduction_guide_with_complex_decl : Error< + "cannot specify any part of a return type in the " + "declaration of a deduction guide">; +def err_deduction_guide_invalid_specifier : Error< + "deduction guide cannot be declared '%0'">; +def err_deduction_guide_name_not_class_template : Error< + "cannot specify deduction guide for " + "%select{<error>|function template|variable template|alias template|" + "template template parameter|dependent template name}0 %1">; +def err_deduction_guide_wrong_scope : Error< + "deduction guide must be declared in the same scope as template %q0">; +def err_deduction_guide_defines_function : Error< + "deduction guide cannot have a function definition">; +def err_deduction_guide_explicit_mismatch : Error< + "deduction guide is %select{not |}0declared 'explicit' but " + "previous declaration was%select{ not|}0">; +def err_deduction_guide_specialized : Error<"deduction guide cannot be " + "%select{explicitly instantiated|explicitly specialized}0">; +def err_deduction_guide_template_not_deducible : Error< + "deduction guide template contains " + "%select{a template parameter|template parameters}0 that cannot be " + "deduced">; + // C++1y deduced return types def err_auto_fn_deduction_failure : Error< "cannot deduce return type %0 from returned value of type %1">; @@ -1950,6 +2042,9 @@ def override_keyword_hides_virtual_member_function : Error< "%select{function|functions}1">; def err_function_marked_override_not_overriding : Error< "%0 marked 'override' but does not override any member functions">; +def warn_destructor_marked_not_override_overriding : Warning < + "%0 overrides a destructor but is not marked 'override'">, + InGroup<CXX11WarnOverrideDestructor>, DefaultIgnore; def warn_function_marked_not_override_overriding : Warning < "%0 overrides a member function but is not marked 'override'">, InGroup<CXX11WarnOverrideMethod>; @@ -2215,6 +2310,9 @@ def err_concept_specialized : Error< "%select{function|variable}0 concept cannot be " "%select{explicitly instantiated|explicitly specialized|partially specialized}1">; +def err_template_different_associated_constraints : Error< + "associated constraints differ in template redeclaration">; + // C++11 char16_t/char32_t def warn_cxx98_compat_unicode_type : Warning< "'%0' type specifier is incompatible with C++98">, @@ -2261,7 +2359,7 @@ def warn_unsupported_target_attribute InGroup<IgnoredAttributes>; def err_attribute_unsupported : Error<"%0 attribute is not supported for this target">; -// The err_*_attribute_argument_not_int are seperate because they're used by +// The err_*_attribute_argument_not_int are separate because they're used by // VerifyIntegerConstantExpression. def err_aligned_attribute_argument_not_int : Error< "'aligned' attribute requires integer constant">; @@ -2659,7 +2757,8 @@ def warn_attribute_wrong_decl_type : Warning< "|functions, methods, enums, and classes" "|structs, classes, variables, functions, and inline namespaces" "|variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members" - "|classes and enumerations}1">, + "|classes and enumerations" + "|named declarations}1">, InGroup<IgnoredAttributes>; def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>; def warn_type_attribute_wrong_type : Warning< @@ -3132,7 +3231,8 @@ def err_attribute_regparm_invalid_number : Error< "'regparm' parameter must be between 0 and %0 inclusive">; def err_attribute_not_supported_in_lang : Error< "%0 attribute is not supported in %select{C|C++|Objective-C}1">; - +def err_attribute_not_supported_on_arch + : Error<"%0 attribute is not supported on '%1'">; // Clang-Specific Attributes def warn_attribute_iboutlet : Warning< @@ -3380,7 +3480,7 @@ def note_ovl_candidate_disabled_by_function_cond_attr : Note< def note_ovl_candidate_disabled_by_extension : Note< "candidate disabled due to OpenCL extension">; def err_addrof_function_disabled_by_enable_if_attr : Error< - "cannot take address of function %0 becuase it has one or more " + "cannot take address of function %0 because it has one or more " "non-tautological enable_if conditions">; def note_addrof_ovl_candidate_disabled_by_enable_if_attr : Note< "candidate function made ineligible by enable_if">; @@ -3789,11 +3889,13 @@ def err_template_decl_ref : Error< // C++ Template Argument Lists def err_template_missing_args : Error< - "use of class template %0 requires template arguments">; + "use of " + "%select{class template|function template|variable template|alias template|" + "template template parameter|template}0 %1 requires template arguments">; def err_template_arg_list_different_arity : Error< "%select{too few|too many}0 template arguments for " - "%select{class template|function template|template template parameter" - "|template}1 %2">; + "%select{class template|function template|variable template|alias template|" + "template template parameter|template}1 %2">; def note_template_decl_here : Note<"template is declared here">; def err_template_arg_must_be_type : Error< "template argument for template type parameter must be a type">; @@ -4063,7 +4165,7 @@ def ext_partial_specs_not_deducible : ExtWarn< "%select{a template parameter|template parameters}1 that cannot be " "deduced; this partial specialization will never be used">, DefaultError, InGroup<DiagGroup<"unusable-partial-specialization">>; -def note_partial_spec_unused_parameter : Note< +def note_non_deducible_parameter : Note< "non-deducible template parameter %0">; def err_partial_spec_ordering_ambiguous : Error< "ambiguous partial specializations of %0">; @@ -4286,6 +4388,8 @@ def note_typename_refers_here : Note< "referenced member %0 is declared here">; def err_typename_missing : Error< "missing 'typename' prior to dependent type name '%0%1'">; +def err_typename_missing_template : Error< + "missing 'typename' prior to dependent type template name '%0%1'">; def ext_typename_missing : ExtWarn< "missing 'typename' prior to dependent type name '%0%1'">, InGroup<DiagGroup<"typename-missing">>; @@ -4304,7 +4408,7 @@ def err_template_kw_refers_to_non_template : Error< "%0 following the 'template' keyword does not refer to a template">; def err_template_kw_refers_to_class_template : Error< "'%0%1' instantiated to a class template, not a function template">; -def note_referenced_class_template : Error< +def note_referenced_class_template : Note< "class template declared here">; def err_template_kw_missing : Error< "missing 'template' keyword prior to dependent template name '%0%1'">; @@ -4808,6 +4912,21 @@ def warn_bitfield_width_exceeds_type_width: Warning< def warn_anon_bitfield_width_exceeds_type_width : Warning< "width of anonymous bit-field (%0 bits) exceeds width of its type; value " "will be truncated to %1 bit%s1">, InGroup<BitFieldWidth>; +def warn_bitfield_too_small_for_enum : Warning< + "bit-field %0 is not wide enough to store all enumerators of %1">, + InGroup<BitFieldEnumConversion>, DefaultIgnore; +def note_widen_bitfield : Note< + "widen this field to %0 bits to store all values of %1">; +def warn_unsigned_bitfield_assigned_signed_enum : Warning< + "assigning value of signed enum type %1 to unsigned bit-field %0; " + "negative enumerators of enum %1 will be converted to positive values">, + InGroup<BitFieldEnumConversion>, DefaultIgnore; +def warn_signed_bitfield_enum_conversion : Warning< + "signed bit-field %0 needs an extra bit to represent the largest positive " + "enumerators of %1">, + InGroup<BitFieldEnumConversion>, DefaultIgnore; +def note_change_bitfield_sign : Note< + "consider making the bitfield type %select{unsigned|signed}0">; def warn_missing_braces : Warning< "suggest braces around initialization of subobject">, @@ -5164,7 +5283,7 @@ def err_arc_inconsistent_property_ownership : Error< def warn_block_capture_autoreleasing : Warning< "block captures an autoreleasing out-parameter, which may result in " "use-after-free bugs">, - InGroup<BlockCaptureAutoReleasing>, DefaultIgnore; + InGroup<BlockCaptureAutoReleasing>; def note_declare_parameter_autoreleasing : Note< "declare the parameter __autoreleasing explicitly to suppress this warning">; def note_declare_parameter_strong : Note< @@ -5725,8 +5844,8 @@ def err_this_static_member_func : Error< def err_invalid_member_use_in_static_method : Error< "invalid use of member %0 in static member function">; def err_invalid_qualified_function_type : Error< - "%select{static |non-}0member function %select{of type %2 |}1" - "cannot have '%3' qualifier">; + "%select{non-member function|static member function|deduction guide}0 " + "%select{of type %2 |}1cannot have '%3' qualifier">; def err_compound_qualified_function_type : Error< "%select{block pointer|pointer|reference}0 to function type %select{%2 |}1" "cannot have '%3' qualifier">; @@ -5750,8 +5869,8 @@ def err_builtin_func_cast_more_than_one_arg : Error< "function-style cast to a builtin type can only take one argument">; def err_value_init_for_array_type : Error< "array types cannot be value-initialized">; -def err_value_init_for_function_type : Error< - "function types cannot be value-initialized">; +def err_init_for_function_type : Error< + "cannot create object of function type %0">; def warn_format_nonliteral_noargs : Warning< "format string is not a string literal (potentially insecure)">, InGroup<FormatSecurity>; @@ -5916,6 +6035,12 @@ def warn_objc_circular_container : Warning< "adding '%0' to '%1' might cause circular dependency in container">, InGroup<DiagGroup<"objc-circular-container">>; def note_objc_circular_container_declared_here : Note<"'%0' declared here">; +def warn_objc_unsafe_perform_selector : Warning< + "%0 is incompatible with selectors that return a " + "%select{struct|union|vector}1 type">, + InGroup<DiagGroup<"objc-unsafe-perform-selector">>; +def note_objc_unsafe_perform_selector_method_declared_here : Note< + "method %0 that returns %1 declared here">; def warn_setter_getter_impl_required : Warning< "property %0 requires method %1 to be defined - " @@ -7001,7 +7126,7 @@ def err_incomplete_type_used_in_type_trait_expr : Error< def err_require_constant_init_failed : Error< "variable does not have a constant initializer">; def note_declared_required_constant_init_here : Note< - "required by 'require_constant_initializer' attribute here">; + "required by 'require_constant_initialization' attribute here">; def err_dimension_expr_not_constant_integer : Error< "dimension expression does not evaluate to a constant unsigned int">; @@ -7899,6 +8024,8 @@ def err_x86_builtin_32_bit_tgt : Error< "this builtin is only available on x86-64 targets">; def err_x86_builtin_invalid_rounding : Error< "invalid rounding argument">; +def err_x86_builtin_invalid_scale : Error< + "scale argument must be 1, 2, 4, or 8">; def err_builtin_longjmp_unsupported : Error< "__builtin_longjmp is not supported for the current target">; @@ -8113,6 +8240,8 @@ def err_opencl_ptrptr_kernel_param : Error< def err_kernel_arg_address_space : Error< "pointer arguments to kernel functions must reside in '__global', " "'__constant' or '__local' address space">; +def err_opencl_ext_vector_component_invalid_length : Error< + "vector component access has invalid length %0. Supported: 1,2,3,4,8,16.">; def err_opencl_function_variable : Error< "%select{non-kernel function|function scope}0 variable cannot be declared in %1 address space">; def err_static_function_scope : Error< @@ -8158,9 +8287,9 @@ def err_opencl_return_value_with_address_space : Error< "return value cannot be qualified with address space">; def err_opencl_constant_no_init : Error< "variable in constant address space must be initialized">; -def err_atomic_init_constant : Error< - "atomic variable can only be assigned to a compile time constant" - " in the declaration statement in the program scope">; +def err_opencl_atomic_init: Error< + "atomic variable can be %select{assigned|initialized}0 to a variable only " + "in global address space">; def err_opencl_implicit_vector_conversion : Error< "implicit conversions between vector types (%0 and %1) are not permitted">; def err_opencl_invalid_type_array : Error< @@ -8210,6 +8339,8 @@ def err_opencl_invalid_block_declaration : Error< "invalid block variable declaration - must be %select{const qualified|initialized}0">; def err_opencl_extern_block_declaration : Error< "invalid block variable declaration - using 'extern' storage class is disallowed">; +def err_opencl_block_ref_block : Error< + "cannot refer to a block inside block">; // OpenCL v2.0 s6.13.9 - Address space qualifier functions. def err_opencl_builtin_to_addr_arg_num : Error< @@ -8227,9 +8358,9 @@ def err_opencl_enqueue_kernel_local_size_args : Error< def err_opencl_enqueue_kernel_invalid_local_size_type : Error< "illegal call to enqueue_kernel, parameter needs to be specified as integer type">; def err_opencl_enqueue_kernel_blocks_non_local_void_args : Error< - "blocks used in device side enqueue are expected to have parameters of type 'local void*'">; + "blocks used in enqueue_kernel call are expected to have parameters of type 'local void*'">; def err_opencl_enqueue_kernel_blocks_no_args : Error< - "blocks in this form of device side enqueue call are expected to have have no parameters">; + "blocks with parameters are not accepted in this prototype of enqueue_kernel call">; // OpenCL v2.2 s2.1.2.3 - Vector Component Access def ext_opencl_ext_vector_type_rgba_selector: ExtWarn< @@ -8708,8 +8839,7 @@ let CategoryName = "Coroutines Issue" in { def err_return_in_coroutine : Error< "return statement not allowed in coroutine; did you mean 'co_return'?">; def note_declared_coroutine_here : Note< - "function is a coroutine due to use of " - "'%select{co_await|co_yield|co_return}0' here">; + "function is a coroutine due to use of '%0' here">; def err_coroutine_objc_method : Error< "Objective-C methods as coroutines are not yet supported">; def err_coroutine_unevaluated_context : Error< @@ -8721,24 +8851,38 @@ def err_coroutine_invalid_func_context : Error< "|a copy assignment operator|a move assignment operator|the 'main' function" "|a constexpr function|a function with a deduced return type" "|a varargs function}0">; -def err_implied_std_coroutine_traits_not_found : Error< - "you need to include <experimental/coroutine> before defining a coroutine">; +def err_implied_coroutine_type_not_found : Error< + "%0 type was not found; include <experimental/coroutine> before defining " + "a coroutine">; +def err_malformed_std_coroutine_handle : Error< + "std::experimental::coroutine_handle must be a class template">; +def err_coroutine_handle_missing_member : Error< + "std::experimental::coroutine_handle missing a member named '%0'">; def err_malformed_std_coroutine_traits : Error< "'std::experimental::coroutine_traits' must be a class template">; def err_implied_std_coroutine_traits_promise_type_not_found : Error< "this function cannot be a coroutine: %q0 has no member named 'promise_type'">; def err_implied_std_coroutine_traits_promise_type_not_class : Error< "this function cannot be a coroutine: %0 is not a class">; -def err_coroutine_traits_missing_specialization : Error< +def err_coroutine_promise_type_incomplete : Error< + "this function cannot be a coroutine: %0 is an incomplete type">; +def err_coroutine_type_missing_specialization : Error< "this function cannot be a coroutine: missing definition of " "specialization %q0">; -def err_implied_std_current_exception_not_found : Error< - "you need to include <exception> before defining a coroutine that implicitly " - "uses 'set_exception'">; -def err_malformed_std_current_exception : Error< - "'std::current_exception' must be a function">; def err_coroutine_promise_return_ill_formed : Error< "%0 declares both 'return_value' and 'return_void'">; +def note_coroutine_promise_implicit_await_transform_required_here : Note< + "call to 'await_transform' implicitly required by 'co_await' here">; +def note_coroutine_promise_call_implicitly_required : Note< + "call to '%select{initial_suspend|final_suspend}0' implicitly " + "required by the %select{initial suspend point|final suspend point}0">; +def err_coroutine_promise_unhandled_exception_required : Error< + "%0 is required to declare the member 'unhandled_exception()'">; +def warn_coroutine_promise_unhandled_exception_required_with_exceptions : Warning< + "%0 is required to declare the member 'unhandled_exception()' when exceptions are enabled">, + InGroup<Coroutine>; +def err_coroutine_promise_get_return_object_on_allocation_failure : Error< + "%0: 'get_return_object_on_allocation_failure()' must be a static member function">; } let CategoryName = "Documentation Issue" in { @@ -8905,4 +9049,9 @@ def ext_warn_gnu_final : ExtWarn< "__final is a GNU extension, consider using C++11 final">, InGroup<GccCompat>; +def warn_shadow_field : + Warning<"non-static data member '%0' of '%1' shadows member inherited from type '%2'">, + InGroup<ShadowField>, DefaultIgnore; +def note_shadow_field : Note<"declared here">; + } // end of sema component. |