diff options
Diffstat (limited to 'include/clang/Basic/DiagnosticSemaKinds.td')
-rw-r--r-- | include/clang/Basic/DiagnosticSemaKinds.td | 690 |
1 files changed, 533 insertions, 157 deletions
diff --git a/include/clang/Basic/DiagnosticSemaKinds.td b/include/clang/Basic/DiagnosticSemaKinds.td index 6ba482c78e4a3..1203fe765b524 100644 --- a/include/clang/Basic/DiagnosticSemaKinds.td +++ b/include/clang/Basic/DiagnosticSemaKinds.td @@ -30,23 +30,6 @@ def warn_redundant_loop_iteration : Warning< InGroup<ForLoopAnalysis>, DefaultIgnore; def note_loop_iteration_here : Note<"%select{decremented|incremented}0 here">; -def warn_for_range_const_reference_copy : Warning< - "loop variable %0 " - "%diff{has type $ but is initialized with type $" - "| is initialized with a value of a different type}1,2 resulting in a copy">, - InGroup<RangeLoopAnalysis>, DefaultIgnore; -def note_use_type_or_non_reference : Note< - "use non-reference type %0 to keep the copy or type %1 to prevent copying">; -def warn_for_range_variable_always_copy : Warning< - "loop variable %0 is always a copy because the range of type %1 does not " - "return a reference">, - InGroup<RangeLoopAnalysis>, DefaultIgnore; -def note_use_non_reference_type : Note<"use non-reference type %0">; -def warn_for_range_copy : Warning< - "loop variable %0 of type %1 creates a copy from type %2">, - InGroup<RangeLoopAnalysis>, DefaultIgnore; -def note_use_reference_type : Note<"use reference type %0 to prevent copying">; - def warn_duplicate_enum_values : Warning< "element %0 has been implicitly assigned %1 which another element has " "been assigned">, InGroup<DiagGroup<"duplicate-enum">>, DefaultIgnore; @@ -74,6 +57,10 @@ def warn_infinite_recursive_function : Warning< "all paths through this function will call itself">, InGroup<InfiniteRecursion>, DefaultIgnore; +def warn_comma_operator : Warning<"possible misuse of comma operator here">, + InGroup<DiagGroup<"comma">>, DefaultIgnore; +def note_cast_to_void : Note<"cast expression to void to silence warning">; + // Constant expressions def err_expr_not_ice : Error< "expression is not an %select{integer|integral}0 constant expression">; @@ -88,10 +75,12 @@ def err_typecheck_converted_constant_expression_indirect : Error< "conversion from %0 to %1 in converted constant expression would " "bind reference to a temporary">; def err_expr_not_cce : Error< - "%select{case value|enumerator value|non-type template argument|array size}0 " + "%select{case value|enumerator value|non-type template argument|" + "array size|constexpr if condition}0 " "is not a constant expression">; def ext_cce_narrowing : ExtWarn< - "%select{case value|enumerator value|non-type template argument|array size}0 " + "%select{case value|enumerator value|non-type template argument|" + "array size|constexpr if condition}0 " "%select{cannot be narrowed from type %2 to %3|" "evaluates to %2, which cannot be narrowed to type %3}1">, InGroup<CXX11Narrowing>, DefaultError, SFINAEFailure; @@ -124,13 +113,14 @@ def warn_float_underflow : Warning< InGroup<LiteralRange>; def warn_double_const_requires_fp64 : Warning< "double precision constant requires cl_khr_fp64, casting to single precision">; +def err_half_const_requires_fp16 : Error< + "half precision constant requires cl_khr_fp16">; // C99 variable-length arrays def ext_vla : Extension<"variable length arrays are a C99 feature">, InGroup<VLAExtension>; def warn_vla_used : Warning<"variable length array used">, InGroup<VLA>, DefaultIgnore; -def err_vla_non_pod : Error<"variable length array of non-POD element type %0">; def err_vla_in_sfinae : Error< "variable length array cannot be formed during template argument deduction">; def err_array_star_in_function_definition : Error< @@ -254,6 +244,13 @@ def err_bad_variable_name : Error< def err_bad_parameter_name : Error< "%0 cannot be the name of a parameter">; def err_parameter_name_omitted : Error<"parameter name omitted">; +def err_anyx86_interrupt_attribute : Error< + "%select{x86|x86-64}0 'interrupt' attribute only applies to functions that " + "have %select{a 'void' return type|" + "only a pointer parameter optionally followed by an integer parameter|" + "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_mips_interrupt_attribute : Warning< "MIPS 'interrupt' attribute only applies to functions that have " "%select{no parameters|a 'void' return type}0">, @@ -342,12 +339,16 @@ def err_language_linkage_spec_not_ascii : Error< def warn_use_out_of_scope_declaration : Warning< "use of out-of-scope declaration of %0">; def err_inline_non_function : Error< - "'inline' can only appear on functions">; + "'inline' can only appear on functions%select{| and non-local variables}0">; def err_noreturn_non_function : Error< "'_Noreturn' can only appear on functions">; def warn_qual_return_type : Warning< "'%0' type qualifier%s1 on return type %plural{1:has|:have}1 no effect">, InGroup<IgnoredQualifiers>, DefaultIgnore; +def warn_deprecated_redundant_constexpr_static_def : Warning< + "out-of-line definition of constexpr static data member is redundant " + "in C++17 and is deprecated">, + InGroup<Deprecated>, DefaultIgnore; def warn_decl_shadow : Warning<"declaration shadows a %select{" @@ -356,6 +357,14 @@ def warn_decl_shadow : "static data member of %2|" "field of %2}1">, InGroup<Shadow>, DefaultIgnore; +def warn_ctor_parm_shadows_field: + Warning<"constructor parameter %0 shadows the field %1 of %2">, + InGroup<ShadowFieldInConstructor>, DefaultIgnore; +def warn_modifying_shadowing_decl : + Warning<"modifying constructor parameter %0 that shadows a " + "field of %1">, + InGroup<ShadowFieldInConstructorModified>, DefaultIgnore; + // C++ using declarations def err_using_requires_qualname : Error< @@ -372,27 +381,19 @@ def err_using_decl_nested_name_specifier_is_not_base_class : Error< "using declaration refers into '%0', which is not a base class of %1">; def err_using_decl_constructor_not_in_direct_base : Error< "%0 is not a direct base of %1, cannot inherit constructors">; -def err_using_decl_constructor_conflict : Error< - "cannot inherit constructor, already inherited constructor with " - "the same signature">; -def note_using_decl_constructor_conflict_current_ctor : Note< - "conflicting constructor">; -def note_using_decl_constructor_conflict_previous_ctor : Note< - "previous constructor">; -def note_using_decl_constructor_conflict_previous_using : Note< - "previously inherited here">; -def warn_using_decl_constructor_ellipsis : Warning< - "inheriting constructor does not inherit ellipsis">, - InGroup<DiagGroup<"inherited-variadic-ctor">>; -def note_using_decl_constructor_ellipsis : Note< - "constructor declared with ellipsis here">; def err_using_decl_can_not_refer_to_class_member : Error< "using declaration cannot refer to class member">; +def err_ambiguous_inherited_constructor : Error< + "constructor of %0 inherited from multiple base class subobjects">; +def note_ambiguous_inherited_constructor_using : Note< + "inherited from base class %0 here">; def note_using_decl_class_member_workaround : Note< - "use %select{an alias declaration|a typedef declaration|a reference}0 " - "instead">; + "use %select{an alias declaration|a typedef declaration|a reference|" + "a const variable|a constexpr variable}0 instead">; def err_using_decl_can_not_refer_to_namespace : Error< - "using declaration cannot refer to namespace">; + "using declaration cannot refer to a namespace">; +def err_using_decl_can_not_refer_to_scoped_enum : Error< + "using declaration cannot refer to a scoped enumerator">; def err_using_decl_constructor : Error< "using declaration cannot refer to a constructor">; def warn_cxx98_compat_using_decl_constructor : Warning< @@ -404,7 +405,7 @@ def err_using_decl_template_id : Error< "using declaration cannot refer to a template specialization">; def note_using_decl_target : Note<"target of using declaration">; def note_using_decl_conflict : Note<"conflicting declaration">; -def err_using_decl_redeclaration : Error<"redeclaration of using decl">; +def err_using_decl_redeclaration : Error<"redeclaration of using declaration">; def err_using_decl_conflict : Error< "target of using declaration conflicts with declaration already in scope">; def err_using_decl_conflict_reverse : Error< @@ -610,8 +611,8 @@ def err_opencl_half_declaration : Error< "declaring variable of type %0 is not allowed">; def err_opencl_half_param : Error< "declaring function parameter of type %0 is not allowed; did you forget * ?">; -def err_opencl_half_return : Error< - "declaring function return value of type %0 is not allowed; did you forget * ?">; +def err_opencl_invalid_return : Error< + "declaring function return value of type %0 is not allowed %select{; did you forget * ?|}1">; def warn_enum_value_overflow : Warning<"overflow in enumeration value">; def warn_pragma_options_align_reset_failed : Warning< "#pragma options align=reset failed: %0">, @@ -719,6 +720,12 @@ def err_objc_root_class_subclass : Error< def warn_objc_root_class_missing : Warning< "class %0 defined without specifying a base class">, InGroup<ObjCRootClass>; +def err_objc_runtime_visible_category : Error< + "cannot implement a category for class %0 that is only visible via the " + "Objective-C runtime">; +def err_objc_runtime_visible_subclass : Error< + "cannot implement subclass %0 of a superclass %1 that is only visible via the " + "Objective-C runtime">; def note_objc_needs_superclass : Note< "add a super class to fix this problem">; def warn_dup_category_def : Warning< @@ -967,6 +974,8 @@ def note_property_synthesize : Note< "property synthesized here">; def error_synthesize_category_decl : Error< "@synthesize not allowed in a category's implementation">; +def error_synthesize_on_class_property : Error< + "@synthesize not allowed on a class property %0">; def error_reference_property : Error< "property of reference type is not supported">; def error_missing_property_interface : Error< @@ -1071,6 +1080,12 @@ def warn_cxx14_compat_static_assert_no_message : Warning< "static_assert with no message is incompatible with C++ standards before C++1z">, DefaultIgnore, InGroup<CXXPre1zCompat>; +def ext_inline_variable : ExtWarn< + "inline variables are a C++1z extension">, InGroup<CXX1z>; +def warn_cxx14_compat_inline_variable : Warning< + "inline variables are incompatible with C++ standards before C++1z">, + DefaultIgnore, InGroup<CXXPre1zCompat>; + def warn_inline_namespace_reopened_noninline : Warning< "inline namespace cannot be reopened as a non-inline namespace">; def err_inline_namespace_mismatch : Error< @@ -1210,6 +1225,8 @@ def err_distant_exception_spec : Error< def err_incomplete_in_exception_spec : Error< "%select{|pointer to |reference to }0incomplete type %1 is not allowed " "in exception specification">; +def ext_incomplete_in_exception_spec : ExtWarn<err_incomplete_in_exception_spec.Text>, + InGroup<MicrosoftExceptionSpec>; def err_rref_in_exception_spec : Error< "rvalue reference type %0 is not allowed in exception specification">; def err_mismatched_exception_spec : Error< @@ -1409,11 +1426,13 @@ def note_member_synthesized_at : Note< "assignment operator|move assignment operator|destructor}0 for %1 first " "required here">; def note_inhctor_synthesized_at : Note< - "inheriting constructor for %0 first required here">; + "inherited constructor for %0 first required here">; def err_missing_default_ctor : Error< - "%select{|implicit default |inheriting }0constructor for %1 must explicitly " - "initialize the %select{base class|member}2 %3 which does not have a default " - "constructor">; + "%select{constructor for %1 must explicitly initialize the|" + "implicit default constructor for %1 must explicitly initialize the|" + "cannot use constructor inherited from base class %4;}0 " + "%select{base class|member}2 %3 %select{which|which|of %1}0 " + "does not have a default constructor">; def note_due_to_dllexported_class : Note< "due to '%0' being dllexported%select{|; try compiling in C++11 mode}1">; @@ -1663,7 +1682,7 @@ def warn_maybe_uninit_var : Warning< "variable %0 may be uninitialized when " "%select{used here|captured by block}1">, InGroup<UninitializedMaybe>, DefaultIgnore; -def note_uninit_var_def : Note<"variable %0 is declared here">; +def note_var_declared_here : Note<"variable %0 is declared here">; def note_uninit_var_use : Note< "%select{uninitialized use occurs|variable is captured by block}0 here">; def warn_uninit_byref_blockvar_captured_by_block : Warning< @@ -1905,8 +1924,12 @@ def err_for_range_iter_deduction_failure : Error< "cannot use type %0 as an iterator">; def err_for_range_member_begin_end_mismatch : Error< "range type %0 has '%select{begin|end}1' member but no '%select{end|begin}1' member">; -def err_for_range_begin_end_types_differ : Error< - "'begin' and 'end' must return the same type (got %0 and %1)">; +def ext_for_range_begin_end_types_differ : ExtWarn< + "'begin' and 'end' returning different types (%0 and %1) is a C++1z extension">, + InGroup<CXX1z>; +def warn_for_range_begin_end_types_differ : Warning< + "'begin' and 'end' returning different types (%0 and %1) is incompatible " + "with C++ standards before C++1z">, InGroup<CXXPre1zCompat>, DefaultIgnore; def note_in_for_range: Note< "when looking up '%select{begin|end}0' function for range expression " "of type %1">; @@ -1923,6 +1946,22 @@ def note_for_range_invalid_iterator : Note < "in implicit call to 'operator%select{!=|*|++}0' for iterator of type %1">; def note_for_range_begin_end : Note< "selected '%select{begin|end}0' %select{function|template }1%2 with iterator type %3">; +def warn_for_range_const_reference_copy : Warning< + "loop variable %0 " + "%diff{has type $ but is initialized with type $" + "| is initialized with a value of a different type}1,2 resulting in a copy">, + InGroup<RangeLoopAnalysis>, DefaultIgnore; +def note_use_type_or_non_reference : Note< + "use non-reference type %0 to keep the copy or type %1 to prevent copying">; +def warn_for_range_variable_always_copy : Warning< + "loop variable %0 is always a copy because the range of type %1 does not " + "return a reference">, + InGroup<RangeLoopAnalysis>, DefaultIgnore; +def note_use_non_reference_type : Note<"use non-reference type %0">; +def warn_for_range_copy : Warning< + "loop variable %0 of type %1 creates a copy from type %2">, + InGroup<RangeLoopAnalysis>, DefaultIgnore; +def note_use_reference_type : Note<"use reference type %0 to prevent copying">; // C++11 constexpr def warn_cxx98_compat_constexpr : Warning< @@ -2067,6 +2106,16 @@ def err_concept_decl_invalid_specifiers : Error< "'%select{thread_local|inline|friend|constexpr}1'">; def err_function_concept_with_params : Error< "function concept cannot have any parameters">; +def err_function_concept_bool_ret : Error< + "declared return type of function concept must be 'bool'">; +def err_variable_concept_bool_decl : Error< + "declared type of variable concept must be 'bool'">; +def err_concept_specified_specialization : Error< + "'concept' cannot be applied on an " + "%select{explicit instantiation|explicit specialization|partial specialization}0">; +def err_concept_specialized : Error< + "%select{function|variable}0 concept cannot be " + "%select{explicitly instantiated|explicitly specialized|partially specialized}1">; // C++11 char16_t/char32_t def warn_cxx98_compat_unicode_type : Warning< @@ -2079,6 +2128,10 @@ def err_integer_sequence_negative_length : Error< def err_integer_sequence_integral_element_type : Error< "integer sequences must have integral element type">; +// __type_pack_element +def err_type_pack_element_out_of_bounds : Error< + "a parameter pack may not be accessed at an out of bounds index">; + // Objective-C++ def err_objc_decls_may_only_appear_in_global_scope : Error< "Objective-C declarations may only appear in global scope">; @@ -2101,6 +2154,10 @@ def err_attribute_too_few_arguments : Error< def err_attribute_invalid_vector_type : Error<"invalid vector element type %0">; def err_attribute_bad_neon_vector_size : Error< "Neon vector size must be 64 or 128 bits">; +def err_attribute_requires_positive_integer : Error< + "%0 attribute requires a positive integral compile time constant expression">; +def err_attribute_requires_opencl_version : Error< + "%0 attribute requires OpenCL version %1%select{| or above}2">; def warn_unsupported_target_attribute : Warning<"Ignoring unsupported '%0' in the target attribute string">, InGroup<IgnoredAttributes>; @@ -2250,6 +2307,20 @@ def warn_objc_collection_literal_element : Warning< "object of type %0 is not compatible with " "%select{array element type|dictionary key type|dictionary value type}1 %2">, InGroup<ObjCLiteralConversion>; +def err_swift_param_attr_not_swiftcall : Error< + "'%0' parameter can only be used with swiftcall calling convention">; +def err_swift_indirect_result_not_first : Error< + "'swift_indirect_result' parameters must be first parameters of function">; +def err_swift_context_not_before_swift_error_result : Error< + "'swift_context' parameter can only be followed by 'swift_error_result' " + "parameter">; +def err_swift_error_result_not_last : Error< + "'swift_error_result' parameter must be last parameter of function">; +def err_swift_error_result_not_after_swift_context : Error< + "'swift_error_result' parameter must follow 'swift_context' parameter">; +def err_swift_abi_parameter_wrong_type : Error< + "'%0' parameter must have pointer%select{| to unqualified pointer}1 type; " + "type here is %2">; def err_attribute_argument_is_zero : Error< "%0 attribute must be greater than 0">; @@ -2298,7 +2369,10 @@ def err_attribute_aligned_too_great : Error< "requested alignment must be %0 bytes or smaller">; def warn_redeclaration_without_attribute_prev_attribute_ignored : Warning< "%q0 redeclared without %1 attribute: previous %1 ignored">, - InGroup<DiagGroup<"inconsistent-dllimport">>; + InGroup<MicrosoftInconsistentDllImport>; +def warn_redeclaration_without_import_attribute : Warning< + "%q0 redeclared without 'dllimport' attribute: 'dllexport' attribute added">, + InGroup<MicrosoftInconsistentDllImport>; def warn_dllimport_dropped_from_inline_function : Warning< "%q0 redeclared inline; %1 attribute ignored">, InGroup<IgnoredAttributes>; @@ -2318,8 +2392,10 @@ def warn_cxx11_gnu_attribute_on_type : Warning< def warn_unhandled_ms_attribute_ignored : Warning< "__declspec attribute %0 is not supported">, InGroup<IgnoredAttributes>; -def err_attribute_invalid_on_stmt : Error< +def err_decl_attribute_invalid_on_stmt : Error< "%0 attribute cannot be applied to a statement">; +def err_stmt_attribute_invalid_on_decl : Error< + "%0 attribute cannot be applied to a declaration">; def warn_declspec_attribute_ignored : Warning< "attribute %0 is ignored, place it after " "\"%select{class|struct|interface|union|enum}1\" to apply attribute to " @@ -2410,31 +2486,41 @@ def err_attribute_weakref_without_alias : Error< def err_alias_not_supported_on_darwin : Error < "only weak aliases are supported on darwin">; def err_alias_to_undefined : Error< - "alias must point to a defined variable or function">; + "%select{alias|ifunc}0 must point to a defined %select{variable or |}1function">; def warn_alias_to_weak_alias : Warning< - "alias will always resolve to %0 even if weak definition of alias %1 is overridden">, + "%select{alias|ifunc}2 will always resolve to %0 even if weak definition of %1 is overridden">, InGroup<IgnoredAttributes>; def warn_alias_with_section : Warning< - "alias will not be in section '%0' but in the same section as the aliasee">, + "%select{alias|ifunc}1 will not be in section '%0' but in the same section as the %select{aliasee|resolver}2">, InGroup<IgnoredAttributes>; def err_duplicate_mangled_name : Error< "definition with same mangled name as another definition">; def err_cyclic_alias : Error< - "alias definition is part of a cycle">; + "%select{alias|ifunc}0 definition is part of a cycle">; +def err_ifunc_resolver_return : Error< + "ifunc resolver function must return a pointer">; +def err_ifunc_resolver_params : Error< + "ifunc resolver function must have no parameters">; def warn_attribute_wrong_decl_type : Warning< "%0 attribute only applies to %select{functions|unions|" - "variables and functions|functions and methods|parameters|" + "variables and functions|" + "functions, variables, and Objective-C interfaces|" + "functions and methods|parameters|" "functions, methods and blocks|functions, methods, and classes|" "functions, methods, and parameters|classes|enums|variables|methods|" - "variables, functions and labels|fields and global variables|structs|" - "variables and typedefs|thread-local variables|" - "variables and fields|variables, data members and tag types|" + "fields and global variables|structs|parameters and typedefs|variables and typedefs|" + "thread-local variables|variables and fields|variables, data members and tag types|" "types and namespaces|Objective-C interfaces|methods and properties|" "struct or union|struct, union or class|types|" "Objective-C instance methods|init methods of interface or class extension declarations|" - "variables, functions and classes|Objective-C protocols|" + "variables, functions and classes|" + "functions, variables, classes, and Objective-C interfaces|" + "Objective-C protocols|" "functions and global variables|structs, unions, and typedefs|structs and typedefs|" - "interface or protocol declarations|kernel functions|non-K&R-style functions}1">, + "interface or protocol declarations|kernel functions|non-K&R-style functions|" + "variables, enums, fields and typedefs|functions, methods, enums, and classes|" + "structs, classes, variables, functions, and inline namespaces|" + "variables, functions, methods, types, enumerations, enumerators, labels, and non-static data members}1">, InGroup<IgnoredAttributes>; def err_attribute_wrong_decl_type : Error<warn_attribute_wrong_decl_type.Text>; def warn_type_attribute_wrong_type : Warning< @@ -2444,9 +2530,6 @@ def warn_type_attribute_wrong_type : Warning< def warn_incomplete_encoded_type : Warning< "encoding of %0 type is incomplete because %1 component has unknown encoding">, InGroup<DiagGroup<"encode-type">>; -def warn_attribute_requires_functions_or_static_globals : Warning< - "%0 only applies to variables with static storage duration and functions">, - InGroup<IgnoredAttributes>; def warn_gnu_inline_attribute_requires_inline : Warning< "'gnu_inline' attribute requires function to be marked 'inline'," " attribute ignored">, @@ -2516,6 +2599,9 @@ def note_overridden_method : Note< def note_protocol_method : Note< "protocol method is here">; +def warn_available_using_star_case : Warning< + "using '*' case here, platform %0 is not accounted for">, InGroup<UnguardedAvailability>; + // Thread Safety Attributes def warn_invalid_capability_name : Warning< "invalid capability name '%0'; capability name must be 'mutex' or 'role'">, @@ -2682,9 +2768,6 @@ def warn_impcast_float_precision : Warning< def warn_impcast_double_promotion : Warning< "implicit conversion increases floating-point precision: %0 to %1">, InGroup<DoublePromotion>, DefaultIgnore; -def warn_impcast_float_integer : Warning< - "implicit conversion turns floating-point number into integer: %0 to %1">, - InGroup<FloatConversion>, DefaultIgnore; def warn_impcast_integer_sign : Warning< "implicit conversion changes signedness: %0 to %1">, InGroup<SignConversion>, DefaultIgnore; @@ -2703,9 +2786,22 @@ def warn_impcast_integer_precision_constant : Warning< def warn_impcast_bitfield_precision_constant : Warning< "implicit truncation from %2 to bitfield changes value from %0 to %1">, InGroup<BitFieldConstantConversion>; + def warn_impcast_literal_float_to_integer : Warning< "implicit conversion from %0 to %1 changes value from %2 to %3">, InGroup<LiteralConversion>; +def warn_impcast_float_integer : Warning< + "implicit conversion turns floating-point number into integer: %0 to %1">, + InGroup<FloatConversion>, DefaultIgnore; + +def warn_impcast_float_to_integer : Warning< + "implicit conversion of out of range value from %0 to %1 changes value " + "from %2 to %3">, + InGroup<FloatOverflowConversion>, DefaultIgnore; +def warn_impcast_float_to_integer_zero : Warning< + "implicit conversion from %0 to %1 changes non-zero value from %2 to %3">, + InGroup<FloatZeroConversion>, DefaultIgnore; + def warn_impcast_string_literal_to_bool : Warning< "implicit conversion turns string literal into bool: %0 to %1">, InGroup<StringConversion>, DefaultIgnore; @@ -2844,14 +2940,16 @@ def warn_vector_mode_deprecated : Warning< InGroup<DeprecatedAttributes>; def err_complex_mode_vector_type : Error< "type of machine mode does not support base vector types">; -def err_attr_wrong_decl : Error< - "%0 attribute invalid on this declaration, requires typedef or value">; +def err_enum_mode_vector_type : Error< + "mode %0 is not supported for enumeration types">; def warn_attribute_nonnull_no_pointers : Warning< "'nonnull' attribute applied to function with no pointer arguments">, InGroup<IgnoredAttributes>; def warn_attribute_nonnull_parm_no_args : Warning< "'nonnull' attribute when used on parameters takes no arguments">, InGroup<IgnoredAttributes>; +def note_declared_nonnull : Note< + "declared %select{'returns_nonnull'|'nonnull'}0 here">; def warn_attribute_sentinel_named_arguments : Warning< "'sentinel' attribute requires named arguments">, InGroup<IgnoredAttributes>; @@ -2907,6 +3005,9 @@ def warn_ns_attribute_wrong_return_type : Warning< "%0 attribute only applies to %select{functions|methods|properties}1 that " "return %select{an Objective-C object|a pointer|a non-retainable pointer}2">, InGroup<IgnoredAttributes>; +def err_ns_attribute_wrong_parameter_type : Error< + "%0 attribute only applies to " + "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">; def warn_ns_attribute_wrong_parameter_type : Warning< "%0 attribute only applies to " "%select{Objective-C object|pointer|pointer-to-CF-pointer}1 parameters">, @@ -3013,7 +3114,9 @@ def err_uninitialized_member_for_assign : Error< "non-static %select{reference|const}1 member %2 cannot use copy " "assignment operator">; def err_uninitialized_member_in_ctor : Error< - "%select{|implicit default |inheriting }0constructor for %1 must explicitly " + "%select{constructor for %1|" + "implicit default constructor for %1|" + "cannot use constructor inherited from %1:}0 must explicitly " "initialize the %select{reference|const}2 member %3">; def err_default_arg_makes_ctor_special : Error< "addition of default argument on redeclaration makes this constructor a " @@ -3023,6 +3126,7 @@ def err_use_of_default_argument_to_function_declared_later : Error< "use of default argument to function %0 that is declared later in class %1">; def note_default_argument_declared_here : Note< "default argument declared here">; +def err_recursive_default_argument : Error<"recursive evaluation of default argument">; def ext_param_promoted_not_compatible_with_prototype : ExtWarn< "%diff{promoted type $ of K&R function parameter is not compatible with the " @@ -3061,7 +3165,8 @@ def note_ovl_candidate : Note<"candidate " "is the implicit move constructor|" "is the implicit copy assignment operator|" "is the implicit move assignment operator|" - "is an inherited constructor}0%1" + "inherited constructor|" + "inherited constructor }0%1" "%select{| has different class%diff{ (expected $ but has $)|}3,4" "| has different number of parameters (expected %3 but has %4)" "| has type mismatch at %ordinal3 parameter" @@ -3073,7 +3178,8 @@ def note_ovl_candidate : Note<"candidate " "%select{none|const|restrict|const and restrict|volatile|const and volatile" "|volatile and restrict|const, volatile, and restrict}4)}2">; -def note_ovl_candidate_inherited_constructor : Note<"inherited from here">; +def note_ovl_candidate_inherited_constructor : Note< + "constructor from base class %0 inherited here">; def note_ovl_candidate_illegal_constructor : Note< "candidate %select{constructor|template}0 ignored: " "instantiation %select{takes|would take}0 its own class type by value">; @@ -3133,7 +3239,8 @@ def note_ovl_candidate_arity : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0 %select{|template }1" + "inherited constructor|" + "inherited constructor}0 %select{|template }1" "not viable: requires%select{ at least| at most|}2 %3 argument%s3, but %4 " "%plural{1:was|:were}4 provided">; @@ -3144,7 +3251,8 @@ def note_ovl_candidate_arity_one : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0 %select{|template }1not viable: " + "inherited constructor|" + "inherited constructor}0 %select{|template }1not viable: " "%select{requires at least|allows at most single|requires single}2 " "argument %3, but %plural{0:no|:%4}4 arguments were provided">; @@ -3156,7 +3264,8 @@ def note_ovl_candidate_deleted : Note< "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 has been " + "inherited constructor|" + "inherited constructor }0%1 has been " "%select{explicitly made unavailable|explicitly deleted|" "implicitly deleted}2">; @@ -3173,9 +3282,15 @@ def note_ovl_candidate_bad_conv_incomplete : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 " + "inherited constructor|" + "inherited constructor }0%1 " "not viable: cannot convert argument of incomplete type " - "%diff{$ to $|to parameter type}2,3">; + "%diff{$ to $|to parameter type}2,3 for " + "%select{%ordinal5 argument|object argument}4" + "%select{|; dereference the argument with *|" + "; take the address of the argument with &|" + "; remove *|" + "; remove &}6">; def note_ovl_candidate_bad_list_argument : Note<"candidate " "%select{function|function|constructor|" "function |function |constructor |" @@ -3184,7 +3299,8 @@ def note_ovl_candidate_bad_list_argument : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 " + "inherited constructor|" + "inherited constructor }0%1 " "not viable: cannot convert initializer list argument to %3">; def note_ovl_candidate_bad_overload : Note<"candidate " "%select{function|function|constructor|" @@ -3194,7 +3310,8 @@ def note_ovl_candidate_bad_overload : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1" + "inherited constructor|" + "inherited constructor }0%1" " not viable: no overload of %3 matching %2 for %ordinal4 argument">; def note_ovl_candidate_bad_conv : Note<"candidate " "%select{function|function|constructor|" @@ -3204,7 +3321,8 @@ def note_ovl_candidate_bad_conv : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1" + "inherited constructor|" + "inherited constructor }0%1" " not viable: no known conversion " "%diff{from $ to $|from argument type to parameter type}2,3 for " "%select{%ordinal5 argument|object argument}4" @@ -3220,7 +3338,8 @@ def note_ovl_candidate_bad_arc_conv : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1" + "inherited constructor|" + "inherited constructor }0%1" " not viable: cannot implicitly convert argument " "%diff{of type $ to $|type to parameter type}2,3 for " "%select{%ordinal5 argument|object argument}4 under ARC">; @@ -3232,7 +3351,8 @@ def note_ovl_candidate_bad_lvalue : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1" + "inherited constructor|" + "inherited constructor }0%1" " not viable: expects an l-value for " "%select{%ordinal3 argument|object argument}2">; def note_ovl_candidate_bad_addrspace : Note<"candidate " @@ -3243,7 +3363,8 @@ def note_ovl_candidate_bad_addrspace : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 not viable: " + "inherited constructor|" + "inherited constructor }0%1 not viable: " "%select{%ordinal6|'this'}5 argument (%2) is in " "address space %3, but parameter must be in address space %4">; def note_ovl_candidate_bad_gc : Note<"candidate " @@ -3254,7 +3375,8 @@ def note_ovl_candidate_bad_gc : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 not viable: " + "inherited constructor|" + "inherited constructor }0%1 not viable: " "%select{%ordinal6|'this'}5 argument (%2) has %select{no|__weak|__strong}3 " "ownership, but parameter has %select{no|__weak|__strong}4 ownership">; def note_ovl_candidate_bad_ownership : Note<"candidate " @@ -3265,7 +3387,8 @@ def note_ovl_candidate_bad_ownership : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 not viable: " + "inherited constructor|" + "inherited constructor }0%1 not viable: " "%select{%ordinal6|'this'}5 argument (%2) has " "%select{no|__unsafe_unretained|__strong|__weak|__autoreleasing}3 ownership," " but parameter has %select{no|__unsafe_unretained|__strong|__weak|" @@ -3273,7 +3396,7 @@ def note_ovl_candidate_bad_ownership : Note<"candidate " def note_ovl_candidate_bad_cvr_this : Note<"candidate " "%select{|function|||function|||||" "function (the implicit copy assignment operator)|" - "function (the implicit move assignment operator)|}0 not viable: " + "function (the implicit move assignment operator)||}0 not viable: " "'this' argument has type %2, but method is not marked " "%select{const|restrict|const or restrict|volatile|const or volatile|" "volatile or restrict|const, volatile, or restrict}3">; @@ -3285,11 +3408,23 @@ def note_ovl_candidate_bad_cvr : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1 not viable: " + "inherited constructor|" + "inherited constructor }0%1 not viable: " "%ordinal4 argument (%2) would lose " "%select{const|restrict|const and restrict|volatile|const and volatile|" "volatile and restrict|const, volatile, and restrict}3 qualifier" "%select{||s||s|s|s}3">; +def note_ovl_candidate_bad_unaligned : Note<"candidate " + "%select{function|function|constructor|" + "function |function |constructor |" + "constructor (the implicit default constructor)|" + "constructor (the implicit copy constructor)|" + "constructor (the implicit move constructor)|" + "function (the implicit copy assignment operator)|" + "function (the implicit move assignment operator)|" + "inherited constructor|" + "inherited constructor }0%1 not viable: " + "%ordinal4 argument (%2) would lose __unaligned qualifier">; def note_ovl_candidate_bad_base_to_derived_conv : Note<"candidate " "%select{function|function|constructor|" "function |function |constructor |" @@ -3298,20 +3433,23 @@ def note_ovl_candidate_bad_base_to_derived_conv : Note<"candidate " "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0%1" - " not viable: cannot %select{convert from|convert from|bind}2 " + "inherited constructor|" + "inherited constructor }0%1 not viable: " + "cannot %select{convert from|convert from|bind}2 " "%select{base class pointer|superclass|base class object of type}2 %3 to " "%select{derived class pointer|subclass|derived class reference}2 %4 for " "%ordinal5 argument">; def note_ovl_candidate_bad_target : Note< "candidate %select{function|function|constructor|" - "function |function |constructor |" + "function|function|constructor|" "constructor (the implicit default constructor)|" "constructor (the implicit copy constructor)|" "constructor (the implicit move constructor)|" "function (the implicit copy assignment operator)|" "function (the implicit move assignment operator)|" - "constructor (inherited)}0 not viable: call to " + "inherited constructor|" + "inherited constructor}0 not viable: " + "call to " "%select{__device__|__global__|__host__|__host__ __device__|invalid}1 function from" " %select{__device__|__global__|__host__|__host__ __device__|invalid}2 function">; def note_implicit_member_target_infer_collision : Note< @@ -3515,8 +3653,8 @@ def note_template_unnamed_type_here : Note< "unnamed type used in template argument was declared here">; def err_template_arg_overload_type : Error< "template argument is the type of an unresolved overloaded function">; -def err_template_arg_not_class_template : Error< - "template argument does not refer to a class template or template " +def err_template_arg_not_valid_template : Error< + "template argument does not refer to a class or alias template, or template " "template parameter">; def note_template_arg_refers_here_func : Note< "template argument refers to function template %0, here">; @@ -3627,6 +3765,8 @@ def err_template_spec_unknown_kind : Error< "class template">; def note_specialized_entity : Note< "explicitly specialized declaration is here">; +def note_explicit_specialization_declared_here : Note< + "explicit specialization declared here">; def err_template_spec_decl_function_scope : Error< "explicit specialization of %0 in function scope">; def err_template_spec_decl_class_scope : Error< @@ -3749,6 +3889,8 @@ def err_partial_spec_ordering_ambiguous : Error< def note_partial_spec_match : Note<"partial specialization matches %0">; def err_partial_spec_redeclared : Error< "class template partial specialization %0 cannot be redeclared">; +def note_partial_specialization_declared_here : Note< + "explicit specialization declared here">; def note_prev_partial_spec_here : Note< "previous declaration of class template partial specialization %0 is here">; def err_partial_spec_fully_specialized : Error< @@ -3815,7 +3957,18 @@ def note_template_type_alias_instantiation_here : Note< "in instantiation of template type alias %0 requested here">; def note_template_exception_spec_instantiation_here : Note< "in instantiation of exception specification for %0 requested here">; - +def warn_var_template_missing : Warning<"instantiation of variable %q0 " + "required here, but no definition is available">, + InGroup<UndefinedVarTemplate>; +def warn_func_template_missing : Warning<"instantiation of function %q0 " + "required here, but no definition is available">, + InGroup<UndefinedFuncTemplate>, DefaultIgnore; +def note_forward_template_decl : Note< + "forward declaration of template entity is here">; +def note_inst_declaration_hint : Note<"add an explicit instantiation " + "declaration to suppress this warning if %q0 is explicitly instantiated in " + "another translation unit">; + def note_default_arg_instantiation_here : Note< "in instantiation of default argument for '%0' required here">; def note_default_function_arg_instantiation_here : Note< @@ -4108,8 +4261,6 @@ def note_implicitly_deleted : Note< "explicitly defaulted function was implicitly deleted here">; def note_inherited_deleted_here : Note< "deleted constructor was inherited here">; -def note_cannot_inherit : Note< - "constructor cannot be inherited">; def warn_not_enough_argument : Warning< "not enough variable arguments in %0 declaration to fit a sentinel">, InGroup<Sentinel>; @@ -4132,7 +4283,7 @@ def err_redefinition : Error<"redefinition of %0">; def err_alias_after_tentative : Error<"alias definition of %0 after tentative definition">; def err_alias_is_definition : - Error<"definition %0 cannot also be an alias">; + Error<"definition %0 cannot also be an %select{alias|ifunc}1">; def err_definition_of_implicitly_declared_member : Error< "definition of implicitly declared %select{default constructor|copy " "constructor|move constructor|copy assignment operator|move assignment " @@ -4144,24 +4295,36 @@ def err_definition_of_explicitly_defaulted_member : Error< def err_redefinition_extern_inline : Error< "redefinition of a 'extern inline' function %0 is not supported in " "%select{C99 mode|C++}1">; +def warn_attr_abi_tag_namespace : Warning< + "'abi_tag' attribute on %select{non-inline|anonymous}0 namespace ignored">, + InGroup<IgnoredAttributes>; +def err_abi_tag_on_redeclaration : Error< + "cannot add 'abi_tag' attribute in a redeclaration">; +def err_new_abi_tag_on_redeclaration : Error< + "'abi_tag' %0 missing in original declaration">; def note_deleted_dtor_no_operator_delete : Note< "virtual destructor requires an unambiguous, accessible 'operator delete'">; def note_deleted_special_member_class_subobject : Note< - "%select{default constructor|copy constructor|move constructor|" - "copy assignment operator|move assignment operator|destructor}0 of " + "%select{default constructor of|copy constructor of|move constructor of|" + "copy assignment operator of|move assignment operator of|destructor of|" + "constructor inherited by}0 " "%1 is implicitly deleted because " "%select{base class %3|%select{||||variant }4field %3}2 has " "%select{no|a deleted|multiple|an inaccessible|a non-trivial}4 " "%select{%select{default constructor|copy constructor|move constructor|copy " - "assignment operator|move assignment operator|destructor}0|destructor}5" + "assignment operator|move assignment operator|destructor|" + "%select{default|corresponding|default|default|default}4 constructor}0|" + "destructor}5" "%select{||s||}4">; def note_deleted_default_ctor_uninit_field : Note< - "default constructor of %0 is implicitly deleted because field %1 of " - "%select{reference|const-qualified}3 type %2 would not be initialized">; + "%select{default constructor of|constructor inherited by}0 " + "%1 is implicitly deleted because field %2 of " + "%select{reference|const-qualified}4 type %3 would not be initialized">; def note_deleted_default_ctor_all_const : Note< - "default constructor of %0 is implicitly deleted because all " - "%select{data members|data members of an anonymous union member}1" + "%select{default constructor of|constructor inherited by}0 " + "%1 is implicitly deleted because all " + "%select{data members|data members of an anonymous union member}2" " are const-qualified">; def note_deleted_copy_ctor_rvalue_reference : Note< "copy constructor of %0 is implicitly deleted because field %1 is of " @@ -4179,6 +4342,7 @@ def warn_undefined_internal : Warning< InGroup<DiagGroup<"undefined-internal">>; def warn_undefined_inline : Warning<"inline function %q0 is not defined">, InGroup<DiagGroup<"undefined-inline">>; +def err_undefined_inline_var : Error<"inline variable %q0 is not defined">; def note_used_here : Note<"used here">; def err_internal_linkage_redeclaration : Error< @@ -4254,7 +4418,7 @@ def err_redefinition_different_typedef : Error< "%select{typedef|type alias|type alias template}0 " "redefinition with different types%diff{ ($ vs $)|}1,2">; def err_tag_reference_non_tag : Error< - "elaborated type refers to %select{a non-tag type|a typedef|a type alias|a template|a type alias template}0">; + "elaborated type refers to %select{a non-tag type|a typedef|a type alias|a template|a type alias template|a template template argument}0">; def err_tag_reference_conflict : Error< "implicit declaration introduced by elaborated type conflicts with " "%select{a declaration|a typedef|a type alias|a template}0 of the same name">; @@ -4517,6 +4681,8 @@ def note_protected_by_vla_typedef : Note< "jump bypasses initialization of VLA typedef">; def note_protected_by_vla_type_alias : Note< "jump bypasses initialization of VLA type alias">; +def note_protected_by_constexpr_if : Note< + "jump enters controlled statement of constexpr if">; def note_protected_by_vla : Note< "jump bypasses initialization of variable length array">; def note_protected_by_objc_try : Note< @@ -5171,8 +5337,6 @@ def err_typecheck_pointer_arith_void_type : Error< "arithmetic on%select{ a|}0 pointer%select{|s}0 to void">; def err_typecheck_decl_incomplete_type : Error< "variable has incomplete type %0">; -def err_typecheck_decl_incomplete_type___float128 : Error< - "support for type '__float128' is not yet implemented">; def ext_typecheck_decl_incomplete_type : ExtWarn< "tentative definition of variable with internal linkage has incomplete non-array type %0">, InGroup<DiagGroup<"tentative-definition-incomplete-type">>; @@ -5257,7 +5421,11 @@ def ext_typecheck_indirection_through_void_pointer : ExtWarn< "ISO C++ does not allow indirection on operand of type %0">, InGroup<DiagGroup<"void-ptr-dereference">>; def warn_indirection_through_null : Warning< - "indirection of non-volatile null pointer will be deleted, not trap">, InGroup<NullDereference>; + "indirection of non-volatile null pointer will be deleted, not trap">, + InGroup<NullDereference>; +def warn_binding_null_to_reference : Warning< + "binding dereferenced null pointer to reference has undefined behavior">, + InGroup<NullDereference>; def note_indirection_through_null : Note< "consider using __builtin_trap() or qualifying pointer with 'volatile'">; def warn_pointer_indirection_from_incompatible_type : Warning< @@ -5301,7 +5469,9 @@ def ext_typecheck_comparison_of_distinct_pointers_nonstandard : ExtWarn< "composite pointer type %2">, InGroup<CompareDistinctPointerType>; def err_typecheck_op_on_nonoverlapping_address_space_pointers : Error< "%select{comparison between %diff{ ($ and $)|}0,1" - "|arithmetic operation with operands of type %diff{ ($ and $)|}0,1}2" + "|arithmetic operation with operands of type %diff{ ($ and $)|}0,1" + "|conditional operator with the second and third operands of type " + "%diff{ ($ and $)|}0,1}2" " which are pointers to non-overlapping address spaces">; def err_typecheck_assign_const : Error< @@ -5572,6 +5742,16 @@ def note_parameter_here : Note< def note_method_return_type_change : Note< "compiler has implicitly changed method %0 return type">; +def warn_impl_required_for_class_property : Warning< + "class property %0 requires method %1 to be defined - " + "use @dynamic or provide a method implementation " + "in this class implementation">, + InGroup<ObjCPropertyImpl>; +def warn_impl_required_in_category_for_class_property : Warning< + "class property %0 requires method %1 to be defined - " + "use @dynamic or provide a method implementation in this category">, + InGroup<ObjCPropertyImpl>; + // C++ casts // These messages adhere to the TryCast pattern: %0 is an int specifying the // cast type, %1 is the source type, %2 is the destination type. @@ -5771,6 +5951,8 @@ def err_catch_incomplete_ref : Error< "cannot catch reference to incomplete type %0">; def err_catch_incomplete : Error<"cannot catch incomplete type %0">; def err_catch_rvalue_ref : Error<"cannot catch exceptions by rvalue reference">; +def err_catch_variably_modified : Error< + "cannot catch variably modified type %0">; def err_qualified_catch_declarator : Error< "exception declarator cannot be qualified">; def err_early_catch_all : Error<"catch-all handler must come last">; @@ -5802,12 +5984,14 @@ def warn_non_virtual_dtor : Warning< "%0 has virtual functions but non-virtual destructor">, InGroup<NonVirtualDtor>, DefaultIgnore; def warn_delete_non_virtual_dtor : Warning< - "delete called on non-final %0 that has virtual functions " - "but non-virtual destructor">, + "%select{delete|destructor}0 called on non-final %1 that has " + "virtual functions but non-virtual destructor">, InGroup<DeleteNonVirtualDtor>, DefaultIgnore; +def note_delete_non_virtual : Note< + "qualify call to silence this warning">; def warn_delete_abstract_non_virtual_dtor : Warning< - "delete called on %0 that is abstract but has non-virtual destructor">, - InGroup<DeleteNonVirtualDtor>; + "%select{delete|destructor}0 called on %1 that is abstract but has " + "non-virtual destructor">, InGroup<DeleteNonVirtualDtor>; def warn_overloaded_virtual : Warning< "%q0 hides overloaded virtual %select{function|functions}1">, InGroup<OverloadedVirtual>, DefaultIgnore; @@ -5927,6 +6111,13 @@ let CategoryName = "Lambda Issue" in { "cannot deduce type for lambda capture %0 from initializer of type %2">; def err_init_capture_deduction_failure_from_init_list : Error< "cannot deduce type for lambda capture %0 from initializer list">; + + // C++1z '*this' captures. + def warn_cxx14_compat_star_this_lambda_capture : Warning< + "by value capture of '*this' is incompatible with C++ standards before C++1z">, + InGroup<CXXPre1zCompat>, DefaultIgnore; + def ext_star_this_lambda_capture_cxx1z : ExtWarn< + "capture of '*this' by copy is a C++1z extension">, InGroup<CXX1z>; } def err_return_in_captured_stmt : Error< @@ -6392,9 +6583,13 @@ def err_nontemporal_builtin_must_be_pointer_intfltptr_or_vector : Error< "pointer, or a vector of such types (%0 invalid)">; def err_deleted_function_use : Error<"attempt to use a deleted function">; +def err_deleted_inherited_ctor_use : Error< + "constructor inherited by %0 from base class %1 is implicitly deleted">; def err_kern_type_not_void_return : Error< "kernel function type %0 must have void return type">; +def err_kern_is_nonstatic_method : Error< + "kernel function %0 must be a free function or static member function">; def err_config_scalar_return : Error< "CUDA special function 'cudaConfigureCall' must have scalar return type">; def err_kern_call_not_global_function : Error< @@ -6404,10 +6599,31 @@ def err_global_call_not_config : Error< def err_ref_bad_target : Error< "reference to %select{__device__|__global__|__host__|__host__ __device__}0 " "function %1 in %select{__device__|__global__|__host__|__host__ __device__}2 function">; -def warn_host_calls_from_host_device : Warning< - "calling __host__ function %0 from __host__ __device__ function %1 can lead to runtime errors">, +def warn_kern_is_method : Extension< + "kernel function %0 is a member function; this may not be accepted by nvcc">, InGroup<CudaCompat>; - +def warn_kern_is_inline : Warning< + "ignored 'inline' attribute on kernel function %0">, + InGroup<CudaCompat>; +def err_variadic_device_fn : Error< + "CUDA device code does not support variadic functions">; +def err_va_arg_in_device : Error< + "CUDA device code does not support va_arg">; +def err_alias_not_supported_on_nvptx : Error<"CUDA does not support aliases">; +def err_cuda_unattributed_constexpr_cannot_overload_device : Error< + "constexpr function '%0' without __host__ or __device__ attributes cannot " + "overload __device__ function with same signature. Add a __host__ " + "attribute, or build with -fno-cuda-host-device-constexpr.">; +def note_cuda_conflicting_device_function_declared_here : Note< + "conflicting __device__ function declared here">; +def err_dynamic_var_init : Error< + "dynamic initialization is not supported for " + "__device__, __constant__, and __shared__ variables.">; +def err_shared_var_init : Error< + "initialization is not supported for __shared__ variables.">; +def err_device_static_local_var : Error< + "Within a __device__/__global__ function, " + "only __shared__ variables may be marked \"static\"">; def warn_non_pod_vararg_with_format_string : Warning< "cannot pass %select{non-POD|non-trivial}0 object of type %1 to variadic " "%select{function|block|method|constructor}2; expected type from format " @@ -6473,7 +6689,13 @@ def warn_cast_pointer_from_sel : Warning< def warn_function_def_in_objc_container : Warning< "function definition inside an Objective-C container is deprecated">, InGroup<FunctionDefInObjCContainer>; - + +def warn_cast_calling_conv : Warning< + "cast between incompatible calling conventions '%0' and '%1'; " + "calls through this pointer may abort at runtime">, + InGroup<DiagGroup<"cast-calling-convention">>; +def note_change_calling_conv_fixit : Note< + "consider defining %0 with the '%1' calling convention">; def warn_bad_function_cast : Warning< "cast from function call of type %0 to non-matching type %1">, InGroup<BadFunctionCast>, DefaultIgnore; @@ -6518,12 +6740,17 @@ def warn_side_effects_typeid : Warning< "expression with side effects will be evaluated despite being used as an " "operand to 'typeid'">, InGroup<PotentiallyEvaluatedExpression>; def warn_unused_result : Warning< - "ignoring return value of function declared with warn_unused_result " - "attribute">, InGroup<DiagGroup<"unused-result">>; + "ignoring return value of function declared with %0 attribute">, + InGroup<DiagGroup<"unused-result">>; def warn_unused_volatile : Warning< "expression result unused; assign into a variable to force a volatile load">, InGroup<DiagGroup<"unused-volatile-lvalue">>; +def ext_cxx14_attr : Extension< + "use of the %0 attribute is a C++14 extension">, InGroup<CXX14>; +def ext_cxx1z_attr : Extension< + "use of the %0 attribute is a C++1z extension">, InGroup<CXX1z>; + def warn_unused_comparison : Warning< "%select{%select{|in}1equality|relational}0 comparison result unused">, InGroup<UnusedComparison>; @@ -6849,9 +7076,16 @@ def err_literal_operator_id_outside_namespace : Error< "non-namespace scope '%0' cannot have a literal operator member">; def err_literal_operator_default_argument : Error< "literal operator cannot have a default argument">; -// FIXME: This diagnostic sucks -def err_literal_operator_params : Error< - "parameter declaration for literal operator %0 is not valid">; +def err_literal_operator_bad_param_count : Error< + "non-template literal operator must have one or two parameters">; +def err_literal_operator_invalid_param : Error< + "parameter of literal operator must have type 'unsigned long long', 'long double', 'char', 'wchar_t', 'char16_t', 'char32_t', or 'const char *'">; +def err_literal_operator_param : Error< + "invalid literal operator parameter type %0, did you mean %1?">; +def err_literal_operator_template_with_params : Error< + "literal operator template cannot have any parameters">; +def err_literal_operator_template : Error< + "template parameter list for literal operator must be either 'char...' or 'typename T, T...'">; def err_literal_operator_extern_c : Error< "literal operator must have C++ linkage">; def ext_string_literal_operator_template : ExtWarn< @@ -7061,6 +7295,8 @@ def warn_scanf_scanlist_incomplete : Warning< def note_format_string_defined : Note<"format string is defined here">; def note_format_fix_specifier : Note<"did you mean to use '%0'?">; def note_printf_c_str: Note<"did you mean to call the %0 method?">; +def note_format_security_fixit: Note< + "treat the string as an argument to avoid this">; def warn_null_arg : Warning< "null passed to a callee that requires a non-null argument">, @@ -7159,7 +7395,7 @@ def err_generic_sel_multi_match : Error< // Blocks def err_blocks_disable : Error<"blocks support disabled - compile with -fblocks" - " or pick a deployment target that supports them">; + " or %select{pick a deployment target that supports them|for OpenCL 2.0 or above}0">; def err_block_returning_array_function : Error< "block cannot return %select{array|function}0 type %1">; @@ -7228,16 +7464,15 @@ def note_insert_fallthrough_fixit : Note< def note_insert_break_fixit : Note< "insert 'break;' to avoid fall-through">; def err_fallthrough_attr_wrong_target : Error< - "clang::fallthrough attribute is only allowed on empty statements">; + "%0 attribute is only allowed on empty statements">; def note_fallthrough_insert_semi_fixit : Note<"did you forget ';'?">; def err_fallthrough_attr_outside_switch : Error< "fallthrough annotation is outside switch statement">; -def warn_fallthrough_attr_invalid_placement : Warning< - "fallthrough annotation does not directly precede switch label">, - InGroup<ImplicitFallthrough>; +def err_fallthrough_attr_invalid_placement : Error< + "fallthrough annotation does not directly precede switch label">; def warn_fallthrough_attr_unreachable : Warning< "fallthrough annotation in unreachable code">, - InGroup<ImplicitFallthrough>; + InGroup<ImplicitFallthrough>, DefaultIgnore; def warn_unreachable_default : Warning< "default label in switch which covers all enumeration values">, @@ -7281,10 +7516,13 @@ def err_va_start_used_in_wrong_abi_function : Error< "'va_start' used in %select{System V|Win64}0 ABI function">; def err_ms_va_start_used_in_sysv_function : Error< "'__builtin_ms_va_start' used in System V ABI function">; -def warn_second_parameter_of_va_start_not_last_named_argument : Warning< - "second parameter of 'va_start' not last named argument">, InGroup<Varargs>; -def warn_va_start_of_reference_type_is_undefined : Warning< - "'va_start' has undefined behavior with reference types">, InGroup<Varargs>; +def warn_second_arg_of_va_start_not_last_named_param : Warning< + "second argument to 'va_start' is not the last named parameter">, + InGroup<Varargs>; +def warn_va_start_type_is_undefined : Warning< + "passing %select{an object that undergoes default argument promotion|" + "an object of reference type|a parameter declared with the 'register' " + "keyword}0 to 'va_start' has undefined behavior">, InGroup<Varargs>; def err_first_argument_to_va_arg_not_of_type_va_list : Error< "first argument to 'va_arg' is of type %0 and not 'va_list'">; def err_second_parameter_to_va_arg_incomplete: Error< @@ -7471,8 +7709,8 @@ def err_c99_array_usage_cxx : Error< "feature, not permitted in C++">; def err_type_requires_extension : Error< "use of type %0 requires %1 extension to be enabled">; -def err_int128_unsupported : Error< - "__int128 is not supported on this target">; +def err_type_unsupported : Error< + "%0 is not supported on this target">; def err_nsconsumed_attribute_mismatch : Error< "overriding method has mismatched ns_consumed attribute on its" " parameter">; @@ -7541,6 +7779,8 @@ def err_typecheck_member_reference_ivar_suggest : Error< "%0 does not have a member named %1; did you mean %2?">; def err_property_not_found_suggest : Error< "property %0 not found on object of type %1; did you mean %2?">; +def err_class_property_found : Error< + "property %0 is a class property; did you mean to access it with class '%1'?">; def err_ivar_access_using_property_syntax_suggest : Error< "property %0 not found on object of type %1; did you mean to access instance variable %2?">; def warn_property_access_suggest : Warning< @@ -7600,9 +7840,6 @@ def err_asm_naked_this_ref : Error< def err_asm_naked_parm_ref : Error< "parameter references not allowed in naked functions">; -def ext_deprecated_attr_is_a_cxx14_extension : ExtWarn< - "use of the 'deprecated' attribute is a C++14 extension">, InGroup<CXX14>; - // OpenCL warnings and errors. def err_invalid_astype_of_different_size : Error< "invalid reinterpretation: sizes of %0 and %1 must match">; @@ -7612,8 +7849,8 @@ def err_opencl_ptrptr_kernel_param : Error< "kernel parameter cannot be declared as a pointer to a pointer">; def err_opencl_private_ptr_kernel_param : Error< "kernel parameter cannot be declared as a pointer to the __private address space">; -def err_opencl_non_kernel_variable : Error< - "non-kernel function variable cannot be declared in %0 address space">; +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< "variables in function scope cannot be declared static">; def err_opencl_bitfields : Error< @@ -7630,8 +7867,8 @@ def note_illegal_field_declared_here : Note< "field of illegal %select{type|pointer type}0 %1 declared here">; def err_event_t_global_var : Error< "the event_t type cannot be used to declare a program scope variable">; -def err_event_t_struct_field : Error< - "the event_t type cannot be used to declare a structure or union field">; +def err_opencl_type_struct_or_union_field : Error< + "the %0 type cannot be used to declare a structure or union field">; def err_event_t_addr_space_qual : Error< "the event_t type can only be used with __private address space qualifier">; def err_expected_kernel_void_return_type : Error< @@ -7640,8 +7877,10 @@ def err_sampler_argument_required : Error< "sampler_t variable required - got %0">; def err_wrong_sampler_addressspace: Error< "sampler type cannot be used with the __local and __global address space qualifiers">; +def error_opencl_cast_non_zero_to_event_t : Error< + "cannot cast non-zero value '%0' to 'event_t'">; def err_opencl_global_invalid_addr_space : Error< - "program scope variable must reside in %0 address space">; + "%select{program scope|static local|extern}0 variable must reside in %1 address space">; def err_missing_actual_pipe_type : Error< "missing actual type specifier for pipe">; def err_reference_pipe_type : Error < @@ -7658,11 +7897,71 @@ def err_atomic_init_constant : Error< " in the declaration statement in the program scope">; def err_opencl_implicit_vector_conversion : Error< "implicit conversions between vector types (%0 and %1) are not permitted">; +def err_opencl_block_proto_variadic : Error< + "invalid block prototype, variadic arguments are not allowed in OpenCL">; +def err_opencl_invalid_type_array : Error< + "array of %0 type is invalid in OpenCL">; +def err_opencl_ternary_with_block : Error< + "block type cannot be used as expression in ternary expression in OpenCL">; +def err_opencl_pointer_to_type : Error< + "pointer to type %0 is invalid in OpenCL">; +def err_opencl_type_can_only_be_used_as_function_parameter : Error < + "type %0 can only be used as a function parameter in OpenCL">; +def warn_opencl_attr_deprecated_ignored : Warning < + "%0 attribute is deprecated and ignored in OpenCL version %1">, + InGroup<IgnoredAttributes>; + +// OpenCL v2.0 s6.13.6 -- Builtin Pipe Functions +def err_opencl_builtin_pipe_first_arg : Error< + "first argument to %0 must be a pipe type">; +def err_opencl_builtin_pipe_arg_num : Error< + "invalid number of arguments to function: %0">; +def err_opencl_builtin_pipe_invalid_arg : Error< + "invalid argument type to function %0 (expecting %1 having %2)">; +def err_opencl_builtin_pipe_invalid_access_modifier : Error< + "invalid pipe access modifier (expecting %0)">; + +// OpenCL access qualifier +def err_opencl_invalid_access_qualifier : Error< + "access qualifier can only be used for pipe and image type">; +def err_opencl_invalid_read_write : Error< + "access qualifier %0 can not be used for %1 %select{|prior to OpenCL version 2.0}2">; +def err_opencl_multiple_access_qualifiers : Error< + "multiple access qualifiers">; +def note_opencl_typedef_access_qualifier : Note< + "previously declared '%0' here">; // OpenCL Section 6.8.g def err_opencl_unknown_type_specifier : Error< - "OpenCL does not support the '%0' %select{type qualifier|storage class specifier}1">; - + "OpenCL version %0 does not support the '%1' %select{type qualifier|storage class specifier}2">; + +// OpenCL v2.0 s6.12.5 Blocks restrictions +def err_opencl_block_storage_type : Error< + "the __block storage type is not permitted">; +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">; + +// OpenCL v2.0 s6.13.9 - Address space qualifier functions. +def err_opencl_builtin_to_addr_arg_num : Error< + "invalid number of arguments to function: %0">; +def err_opencl_builtin_to_addr_invalid_arg : Error< + "invalid argument %0 to function: %1, expecting a generic pointer argument">; + +// OpenCL v2.0 s6.13.17 Enqueue kernel restrictions. +def err_opencl_enqueue_kernel_incorrect_args : Error< + "illegal call to enqueue_kernel, incorrect argument types">; +def err_opencl_enqueue_kernel_expected_type : Error< + "illegal call to enqueue_kernel, expected %0 argument type">; +def err_opencl_enqueue_kernel_local_size_args : Error< + "mismatch in number of block parameters and local size arguments passed">; +def err_opencl_enqueue_kernel_invalid_local_size_type : Error< + "local memory sizes need to be specified as uint">; +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*'">; +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">; } // end of sema category let CategoryName = "OpenMP Issue" in { @@ -7676,6 +7975,8 @@ def err_omp_global_var_arg : Error< "arguments of '#pragma omp %0' must have %select{global storage|static storage duration}1">; def err_omp_ref_type_arg : Error< "arguments of '#pragma omp %0' cannot be of reference type %1">; +def err_omp_region_not_file_context : Error< + "directive must be at file or namespace scope">; def err_omp_var_scope : Error< "'#pragma omp %0' must appear in the scope of the %q1 variable declaration">; def err_omp_var_used : Error< @@ -7692,10 +7993,28 @@ def err_omp_reduction_incomplete_type : Error< "a reduction list item with incomplete type %0">; def err_omp_unexpected_clause_value : Error< "expected %0 in OpenMP clause '%1'">; -def err_omp_expected_var_name : Error< - "expected variable name">; -def err_omp_expected_var_name_or_array_item : Error< - "expected variable name, array element or array section">; +def err_omp_expected_var_name_member_expr : Error< + "expected variable name%select{| or data member of current class}0">; +def err_omp_expected_var_name_member_expr_or_array_item : Error< + "expected variable name%select{|, data member of current class}0, array element or array section">; +def err_omp_expected_named_var_member_or_array_expression: Error< + "expected expression containing only member accesses and/or array sections based on named variables">; +def err_omp_bit_fields_forbidden_in_clause : Error< + "bit fields cannot be used to specify storage in a '%0' clause">; +def err_array_section_does_not_specify_contiguous_storage : Error< + "array section does not specify contiguous storage">; +def err_omp_union_type_not_allowed : Error< + "mapped storage cannot be derived from a union">; +def err_omp_expected_access_to_data_field : Error< + "expected access to data field">; +def err_omp_multiple_array_items_in_map_clause : Error< + "multiple array elements associated with the same variable are not allowed in map clauses of the same construct">; +def err_omp_pointer_mapped_along_with_derived_section : Error< + "pointer cannot be mapped along with a section derived from itself">; +def err_omp_original_storage_is_shared_and_does_not_contain : Error< + "original storage of expression in data environment is shared but data environment do not fully contain mapped expression storage">; +def err_omp_same_pointer_derreferenced : Error< + "same pointer derreferenced in multiple different ways in map clause expressions">; def note_omp_task_predetermined_firstprivate_here : Note< "predetermined as a firstprivate in a task construct here">; def err_omp_threadprivate_incomplete_type : Error< @@ -7733,6 +8052,8 @@ def err_omp_negative_expression_in_clause : Error< def err_omp_not_integral : Error< "expression must have integral or unscoped enumeration " "type, not %0">; +def err_omp_threadprivate_in_target : Error< + "threadprivate variables cannot be used in target constructs">; def err_omp_incomplete_type : Error< "expression has incomplete class type %0">; def err_omp_explicit_conversion : Error< @@ -7759,12 +8080,23 @@ def warn_omp_linear_step_zero : Warning< def warn_omp_alignment_not_power_of_two : Warning< "aligned clause will be ignored because the requested alignment is not a power of 2">, InGroup<OpenMPClauses>; +def err_omp_enclosed_declare_target : Error< + "declare target region may not be enclosed within another declare target region">; +def err_omp_invalid_target_decl : Error< + "%0 used in declare target directive is not a variable or a function name">; +def err_omp_declare_target_multiple : Error< + "%0 appears multiple times in clauses on the same declare target directive">; +def err_omp_declare_target_to_and_link : Error< + "%0 must not appear in both clauses 'to' and 'link'">; +def warn_omp_not_in_target_context : Warning< + "declaration is not declared in any declare target region">, + InGroup<OpenMPTarget>; def err_omp_aligned_expected_array_or_ptr : Error< "argument of aligned clause should be array" "%select{ or pointer|, pointer, reference to array or reference to pointer}1" ", not %0">; def err_omp_aligned_twice : Error< - "a variable cannot appear in more than one aligned clause">; + "%select{a variable|a parameter|'this'}0 cannot appear in more than one aligned clause">; def err_omp_local_var_in_threadprivate_init : Error< "variable with local storage in initial value of threadprivate variable">; def err_omp_loop_not_canonical_init : Error< @@ -7797,9 +8129,10 @@ def warn_omp_loop_64_bit_var : Warning< "OpenMP loop iteration variable cannot have more than 64 bits size and will be narrowed">, InGroup<OpenMPLoopForm>; def err_omp_unknown_reduction_identifier : Error< - "incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', '&&', '||', 'min' or 'max'">; -def err_omp_reduction_type_array : Error< - "a reduction list item with array type %0">; + "incorrect reduction identifier, expected one of '+', '-', '*', '&', '|', '^', " + "'&&', '||', 'min' or 'max' or declare reduction for type %0">; +def err_omp_not_resolved_reduction_identifier : Error< + "unable to resolve declare reduction construct for type %0">; def err_omp_reduction_ref_type_arg : Error< "argument of OpenMP clause 'reduction' must reference the same object in all threads">; def err_omp_clause_not_arithmetic_type_arg : Error< @@ -7808,6 +8141,8 @@ def err_omp_clause_floating_type_arg : Error< "arguments of OpenMP clause 'reduction' with bitwise operators cannot be of floating type">; def err_omp_once_referenced : Error< "variable can appear only once in OpenMP '%0' clause">; +def err_omp_once_referenced_in_target_update : Error< + "variable can appear only once in OpenMP 'target update' construct">; def note_omp_referenced : Note< "previously referenced here">; def err_omp_reduction_in_task : Error< @@ -7883,12 +8218,19 @@ def err_omp_single_copyprivate_with_nowait : Error< "the 'copyprivate' clause must not be used with the 'nowait' clause">; def note_omp_nowait_clause_here : Note< "'nowait' clause is here">; +def err_omp_single_decl_in_declare_simd : Error< + "single declaration is expected after 'declare simd' directive">; +def err_omp_function_expected : Error< + "'#pragma omp declare simd' can only be applied to functions">; def err_omp_wrong_cancel_region : Error< "one of 'for', 'parallel', 'sections' or 'taskgroup' is expected">; def err_omp_parent_cancel_region_nowait : Error< "parent region for 'omp %select{cancellation point/cancel}0' construct cannot be nowait">; def err_omp_parent_cancel_region_ordered : Error< "parent region for 'omp %select{cancellation point/cancel}0' construct cannot be ordered">; +def err_omp_reduction_wrong_type : Error<"reduction type cannot be %select{qualified with 'const', 'volatile' or 'restrict'|a function|a reference|an array}0 type">; +def err_omp_wrong_var_in_declare_reduction : Error<"only %select{'omp_priv' or 'omp_orig'|'omp_in' or 'omp_out'}0 variables are allowed in %select{initializer|combiner}0 expression">; +def err_omp_declare_reduction_redefinition : Error<"redefinition of user-defined reduction for type %0">; def err_omp_array_section_use : Error<"OpenMP array section is not allowed here">; def err_omp_typecheck_section_value : Error< "subscripted value is not an array or pointer">; @@ -7930,12 +8272,16 @@ def err_omp_map_shared_storage : Error< "variable already marked as mapped in current construct">; def err_omp_not_mappable_type : Error< "type %0 is not mappable to target">; +def err_omp_invalid_map_type_for_directive : Error< + "%select{map type '%1' is not allowed|map type must be specified}0 for '#pragma omp %2'">; +def err_omp_no_map_for_directive : Error< + "expected at least one map clause for '#pragma omp %0'">; def note_omp_polymorphic_in_target : Note< "mappable type cannot be polymorphic">; def note_omp_static_member_in_target : Note< "mappable type cannot contain static members">; -def err_omp_threadprivate_in_map : Error< - "threadprivate variables are not allowed in map clause">; +def err_omp_threadprivate_in_clause : Error< + "threadprivate variables are not allowed in '%0' clause">; def err_omp_wrong_ordered_loop_count : Error< "the parameter of the 'ordered' clause must be greater than or equal to the parameter of the 'collapse' clause">; def note_collapse_loop_count : Note< @@ -7960,8 +8306,6 @@ def err_omp_firstprivate_distribute_in_teams_reduction : Error< "reduction variable in '#pragma omp teams' cannot be firstprivate in '#pragma omp distribute'">; def err_omp_depend_clause_thread_simd : Error< "'depend' clauses cannot be mixed with '%0' clause">; -def err_omp_depend_sink_wrong_expr : Error< - "expected expression form x[+-d], where x is the loop iteration variable and d is a constant non-negative integer">; def err_omp_depend_sink_expected_loop_iteration : Error< "expected %0 loop iteration variable">; def err_omp_depend_sink_unexpected_expr : Error< @@ -7980,6 +8324,23 @@ def err_omp_schedule_nonmonotonic_ordered : Error< "'schedule' clause with 'nonmonotonic' modifier cannot be specified if an 'ordered' clause is specified">; def err_omp_ordered_simd : Error< "'ordered' clause with a parameter can not be specified in '#pragma omp %0' directive">; +def err_omp_variable_in_map_and_dsa : Error< + "%0 variable cannot be in a map clause in '#pragma omp %1' directive">; +def err_omp_param_or_this_in_clause : Error< + "expected reference to one of the parameters of function %0%select{| or 'this'}1">; +def err_omp_expected_uniform_param : Error< + "expected a reference to a parameter specified in a 'uniform' clause">; +def err_omp_expected_int_param : Error< + "expected a reference to an integer-typed parameter">; +def err_omp_at_least_one_motion_clause_required : Error< + "expected at least one 'to' clause or 'from' clause specified to '#pragma omp target update'">; +def err_omp_usedeviceptr_not_a_pointer : Error< + "expected pointer or reference to pointer in 'use_device_ptr' clause">; +def err_omp_argument_type_isdeviceptr : Error < + "expected pointer, array, reference to pointer, or reference to array in 'is_device_ptr clause'">; +def warn_omp_nesting_simd : Warning< + "OpenMP only allows an ordered construct with the simd clause nested in a simd construct">, + InGroup<SourceUsesOpenMP>; } // end of OpenMP category let CategoryName = "Related Result Type Issue" in { @@ -8018,10 +8379,17 @@ def err_module_private_local_class : Error< "local %select{struct|interface|union|class|enum}0 cannot be declared " "__module_private__">; def err_module_unimported_use : Error< - "%select{declaration|definition|default argument}0 of %1 must be imported " + "%select{declaration|definition|default argument|" + "explicit specialization|partial specialization}0 of %1 must be imported " + "from module '%2' before it is required">; +def err_module_unimported_use_header : Error< + "missing '#include %3'; " + "%select{declaration|definition|default argument|" + "explicit specialization|partial specialization}0 of %1 must be imported " "from module '%2' before it is required">; def err_module_unimported_use_multiple : Error< - "%select{declaration|definition|default argument}0 of %1 must be imported " + "%select{declaration|definition|default argument|" + "explicit specialization|partial specialization}0 of %1 must be imported " "from one of the following modules before it is required:%2">; def ext_module_import_in_extern_c : ExtWarn< "import of C++ module '%0' appears within extern \"C\" language linkage " @@ -8221,4 +8589,12 @@ def warn_objc_redundant_qualified_class_type : Warning< "parameterized class %0 already conforms to the protocols listed; did you " "forget a '*'?">, InGroup<ObjCProtocolQualifiers>; +def warn_block_literal_attributes_on_omitted_return_type : Warning< + "attribute %0 ignored, because it cannot be applied to omitted return type">, + InGroup<IgnoredAttributes>; + +def warn_block_literal_qualifiers_on_omitted_return_type : Warning< + "'%0' qualifier on omitted return type %1 has no effect">, + InGroup<IgnoredQualifiers>; + } // end of sema component. |