|
|
|
|
@@ -314,13 +314,13 @@ ERROR(incorrect_explicit_closure_result_vs_return_type,none,
|
|
|
|
|
(Type, Type))
|
|
|
|
|
|
|
|
|
|
ERROR(addressable_not_enabled,none,
|
|
|
|
|
"@_addressable is an experimental feature", ())
|
|
|
|
|
"'@_addressable' is an experimental feature", ())
|
|
|
|
|
ERROR(addressableSelf_not_on_method,none,
|
|
|
|
|
"@_addressableSelf cannot be applied to non-member declarations", ())
|
|
|
|
|
"'@_addressableSelf' cannot be applied to non-member declarations", ())
|
|
|
|
|
ERROR(addressable_types_not_enabled,none,
|
|
|
|
|
"@_addressableForDependencies is an experimental feature", ())
|
|
|
|
|
"'@_addressableForDependencies' is an experimental feature", ())
|
|
|
|
|
ERROR(class_cannot_be_addressable_for_dependencies,none,
|
|
|
|
|
"a class cannot be @_addressableForDependencies", ())
|
|
|
|
|
"a class cannot be '@_addressableForDependencies'", ())
|
|
|
|
|
|
|
|
|
|
ERROR(unsupported_closure_attr,none,
|
|
|
|
|
"%select{attribute |}0%1 is not supported on a closure",
|
|
|
|
|
@@ -1686,20 +1686,20 @@ NOTE(unbound_generic_parameter_explicit_fix,none,
|
|
|
|
|
"explicitly specify the generic arguments to fix this issue", ())
|
|
|
|
|
|
|
|
|
|
GROUPED_ERROR(invalid_dynamic_callable_type,DynamicCallable,none,
|
|
|
|
|
"@dynamicCallable attribute requires %0 to have either a valid "
|
|
|
|
|
"'@dynamicCallable' requires %0 to have either a valid "
|
|
|
|
|
"'dynamicallyCall(withArguments:)' method or "
|
|
|
|
|
"'dynamicallyCall(withKeywordArguments:)' method", (Type))
|
|
|
|
|
GROUPED_ERROR(missing_dynamic_callable_kwargs_method,DynamicCallable,none,
|
|
|
|
|
"@dynamicCallable type %0 cannot be applied with keyword arguments; "
|
|
|
|
|
"'@dynamicCallable' type %0 cannot be applied with keyword arguments; "
|
|
|
|
|
"missing 'dynamicCall(withKeywordArguments:)' method", (Type))
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_dynamic_member_lookup_type,none,
|
|
|
|
|
"@dynamicMemberLookup attribute requires %0 to have a "
|
|
|
|
|
"'@dynamicMemberLookup' requires %0 to have a "
|
|
|
|
|
"'subscript(dynamicMember:)' method that accepts either "
|
|
|
|
|
"'ExpressibleByStringLiteral' or a key path", (Type))
|
|
|
|
|
NOTE(invalid_dynamic_member_subscript, none,
|
|
|
|
|
"add an explicit argument label to this subscript to satisfy "
|
|
|
|
|
"the @dynamicMemberLookup requirement", ())
|
|
|
|
|
"the '@dynamicMemberLookup' requirement", ())
|
|
|
|
|
|
|
|
|
|
ERROR(string_index_not_integer,none,
|
|
|
|
|
"String must not be indexed with %0, it has variable size elements",
|
|
|
|
|
@@ -1717,7 +1717,7 @@ ERROR(c_function_pointer_from_generic_function,none,
|
|
|
|
|
"a C function pointer cannot be formed from a reference to a generic "
|
|
|
|
|
"function", ())
|
|
|
|
|
ERROR(invalid_autoclosure_forwarding,none,
|
|
|
|
|
"add () to forward @autoclosure parameter", ())
|
|
|
|
|
"add () to forward '@autoclosure' parameter", ())
|
|
|
|
|
ERROR(invalid_differentiable_function_conversion_expr,none,
|
|
|
|
|
"a '@differentiable' function can only be formed from "
|
|
|
|
|
"a reference to a 'func' or 'init' or a literal closure", ())
|
|
|
|
|
@@ -1772,25 +1772,25 @@ ERROR(transparent_in_classes_not_supported,none,
|
|
|
|
|
"'@_transparent' attribute is not supported on declarations within classes", ())
|
|
|
|
|
|
|
|
|
|
ERROR(iboutlet_nonobjc_class,none,
|
|
|
|
|
"@IBOutlet property cannot %select{have|be an array of}0 "
|
|
|
|
|
"'@IBOutlet' property cannot %select{have|be an array of}0 "
|
|
|
|
|
"non-'@objc' class type %1", (bool, Type))
|
|
|
|
|
ERROR(iboutlet_nonobjc_protocol,none,
|
|
|
|
|
"@IBOutlet property cannot %select{have|be an array of}0 "
|
|
|
|
|
"'@IBOutlet' property cannot %select{have|be an array of}0 "
|
|
|
|
|
"non-'@objc' protocol type %1", (bool, Type))
|
|
|
|
|
ERROR(iboutlet_nonobject_type,none,
|
|
|
|
|
"@IBOutlet property cannot %select{have|be an array of}0 "
|
|
|
|
|
"'@IBOutlet' property cannot %select{have|be an array of}0 "
|
|
|
|
|
"non-object type %1", (bool, Type))
|
|
|
|
|
ERROR(iboutlet_only_mutable,none,
|
|
|
|
|
"@IBOutlet attribute requires property to be mutable", ())
|
|
|
|
|
"'@IBOutlet' requires property to be mutable", ())
|
|
|
|
|
ERROR(iboutlet_non_optional,none,
|
|
|
|
|
"@IBOutlet property has non-optional type %0", (Type))
|
|
|
|
|
"'@IBOutlet' property has non-optional type %0", (Type))
|
|
|
|
|
NOTE(note_make_optional,none,
|
|
|
|
|
"add '?' to form the optional type %0", (Type))
|
|
|
|
|
NOTE(note_make_implicitly_unwrapped_optional,none,
|
|
|
|
|
"add '!' to form an implicitly unwrapped optional", ())
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_ibdesignable_extension,none,
|
|
|
|
|
"@IBDesignable can only be applied to classes and extensions "
|
|
|
|
|
"'@IBDesignable' can only be applied to classes and extensions "
|
|
|
|
|
"of classes", ())
|
|
|
|
|
ERROR(attr_must_be_used_on_class_instance,none,
|
|
|
|
|
"only class instance properties can be declared %0", (DeclAttribute))
|
|
|
|
|
@@ -1819,11 +1819,11 @@ NOTE(remove_async_add_task,none,
|
|
|
|
|
"remove 'async' and wrap in 'Task' to use concurrency in %0",
|
|
|
|
|
(const FuncDecl *))
|
|
|
|
|
ERROR(no_objc_tagged_pointer_not_class_protocol,none,
|
|
|
|
|
"@unsafe_no_objc_tagged_pointer can only be applied to class protocols",
|
|
|
|
|
"'@unsafe_no_objc_tagged_pointer' can only be applied to class protocols",
|
|
|
|
|
())
|
|
|
|
|
ERROR(swift_native_objc_runtime_base_not_on_root_class,none,
|
|
|
|
|
"@_swift_native_objc_runtime_base_not_on_root_class can only be applied "
|
|
|
|
|
"to root classes", ())
|
|
|
|
|
"'@_swift_native_objc_runtime_base_not_on_root_class' can only be "
|
|
|
|
|
"applied to root classes", ())
|
|
|
|
|
|
|
|
|
|
WARNING(objc_implementation_early_spelling_deprecated,none,
|
|
|
|
|
"'@_objcImplementation' is deprecated; use '@implementation' instead",
|
|
|
|
|
@@ -2040,13 +2040,13 @@ ERROR(cdecl_not_at_top_level,none,
|
|
|
|
|
ERROR(cdecl_empty_name,none,
|
|
|
|
|
"@_cdecl symbol name cannot be empty", ())
|
|
|
|
|
ERROR(cdecl_throws,none,
|
|
|
|
|
"raising errors from @_cdecl functions is not supported", ())
|
|
|
|
|
"raising errors from '@_cdecl' functions is not supported", ())
|
|
|
|
|
|
|
|
|
|
// @_used and @_section
|
|
|
|
|
ERROR(section_linkage_markers_disabled,none,
|
|
|
|
|
"attribute requires '-enable-experimental-feature SymbolLinkageMarkers'", ())
|
|
|
|
|
ERROR(section_empty_name,none,
|
|
|
|
|
"@_section section name cannot be empty", ())
|
|
|
|
|
"'@_section' section name cannot be empty", ())
|
|
|
|
|
|
|
|
|
|
// @_silgen_name and friends
|
|
|
|
|
WARNING(reserved_runtime_symbol_name,none,
|
|
|
|
|
@@ -2056,23 +2056,24 @@ WARNING(reserved_runtime_symbol_name,none,
|
|
|
|
|
|
|
|
|
|
// @_extern
|
|
|
|
|
ERROR(attr_extern_experimental,none,
|
|
|
|
|
"@_extern requires '-enable-experimental-feature Extern'", ())
|
|
|
|
|
"'@_extern' requires '-enable-experimental-feature Extern'", ())
|
|
|
|
|
ERROR(extern_not_at_top_level_func,none,
|
|
|
|
|
"@_extern attribute can only be applied to global functions", ())
|
|
|
|
|
"'@_extern' can only be applied to global functions", ())
|
|
|
|
|
ERROR(extern_empty_c_name,none,
|
|
|
|
|
"expected non-empty C name in @_extern attribute", ())
|
|
|
|
|
"expected non-empty C name in '@_extern'", ())
|
|
|
|
|
ERROR(extern_only_non_other_attr,none,
|
|
|
|
|
"@_extern attribute cannot be applied to an %0 declaration",
|
|
|
|
|
"'@_extern' cannot be applied to an %0 declaration",
|
|
|
|
|
(DeclAttribute))
|
|
|
|
|
WARNING(extern_c_maybe_invalid_name, none,
|
|
|
|
|
"C name '%0' may be invalid; explicitly specify the name in @_extern(c) to suppress this warning",
|
|
|
|
|
"C name '%0' may be invalid; explicitly specify the name in "
|
|
|
|
|
"'@_extern(c)' to suppress this warning",
|
|
|
|
|
(StringRef))
|
|
|
|
|
|
|
|
|
|
// @_staticExclusiveOnly
|
|
|
|
|
ERROR(attr_static_exclusive_only_disabled,none,
|
|
|
|
|
"attribute requires '-enable-experimental feature StaticExclusiveOnly'", ())
|
|
|
|
|
ERROR(attr_static_exclusive_only_noncopyable,none,
|
|
|
|
|
"@_staticExclusiveOnly can only be applied to noncopyable types", ())
|
|
|
|
|
"'@_staticExclusiveOnly' can only be applied to noncopyable types", ())
|
|
|
|
|
ERROR(attr_static_exclusive_only_let_only,none,
|
|
|
|
|
"variable of type %0 must be declared with a 'let'", (Type))
|
|
|
|
|
NOTE(attr_static_exclusive_only_type_nonmutating,none,
|
|
|
|
|
@@ -2086,11 +2087,12 @@ ERROR(attr_static_exclusive_no_setters,none,
|
|
|
|
|
|
|
|
|
|
// @extractConstantsFromMembers
|
|
|
|
|
ERROR(attr_extractConstantsFromMembers_experimental,none,
|
|
|
|
|
"@extractConstantsFromMembers requires '-enable-experimental-feature ExtractConstantsFromMembers'", ())
|
|
|
|
|
"'@extractConstantsFromMembers' requires "
|
|
|
|
|
"'-enable-experimental-feature ExtractConstantsFromMembers'", ())
|
|
|
|
|
|
|
|
|
|
// @sensitive
|
|
|
|
|
ERROR(attr_sensitive_experimental,none,
|
|
|
|
|
"@sensitive requires '-enable-experimental-feature Sensitive'", ())
|
|
|
|
|
"'@sensitive' requires '-enable-experimental-feature Sensitive'", ())
|
|
|
|
|
|
|
|
|
|
ERROR(c_func_variadic, none,
|
|
|
|
|
"cannot declare variadic argument %0 in %kind1",
|
|
|
|
|
@@ -2106,18 +2108,20 @@ ERROR(c_func_throws,none,
|
|
|
|
|
"raising errors from C functions is not supported", ())
|
|
|
|
|
|
|
|
|
|
ERROR(expose_wasm_not_at_top_level_func,none,
|
|
|
|
|
"@_expose attribute with 'wasm' can only be applied to global functions", ())
|
|
|
|
|
"'@_expose' with 'wasm' can only be applied to global "
|
|
|
|
|
"functions", ())
|
|
|
|
|
|
|
|
|
|
ERROR(expose_only_non_other_attr,none,
|
|
|
|
|
"@_expose attribute cannot be applied to an '%0' declaration", (StringRef))
|
|
|
|
|
"'@_expose' cannot be applied to an '%0' declaration",
|
|
|
|
|
(StringRef))
|
|
|
|
|
ERROR(expose_inside_unexposed_decl,none,
|
|
|
|
|
"@_expose attribute cannot be applied inside of unexposed declaration %0",
|
|
|
|
|
"'@_expose' cannot be applied inside of unexposed declaration %0",
|
|
|
|
|
(const ValueDecl *))
|
|
|
|
|
ERROR(expose_invalid_name_pattern_init,none,
|
|
|
|
|
"invalid declaration name '%0' specified in an @_expose attribute; "
|
|
|
|
|
"invalid declaration name '%0' specified in '@_expose'; "
|
|
|
|
|
"exposed initializer name must start with 'init'", (StringRef))
|
|
|
|
|
ERROR(expose_unsupported_objc_decl_to_cxx,none,
|
|
|
|
|
"@objc %kind0 can not yet be exposed to C++", (ValueDecl *))
|
|
|
|
|
"'@objc' %kind0 can not yet be exposed to C++", (ValueDecl *))
|
|
|
|
|
ERROR(expose_unsupported_async_decl_to_cxx,none,
|
|
|
|
|
"async %kind0 can not be exposed to C++", (ValueDecl *))
|
|
|
|
|
ERROR(expose_unsupported_actor_isolated_to_cxx,none,
|
|
|
|
|
@@ -2240,7 +2244,7 @@ ERROR(attribute_does_not_apply_to_type,none,
|
|
|
|
|
ERROR(optional_attribute_non_protocol,none,
|
|
|
|
|
"'optional' can only be applied to protocol members", ())
|
|
|
|
|
ERROR(optional_attribute_non_objc_protocol,none,
|
|
|
|
|
"'optional' can only be applied to members of an @objc protocol", ())
|
|
|
|
|
"'optional' can only be applied to members of an '@objc' protocol", ())
|
|
|
|
|
ERROR(optional_attribute_missing_explicit_objc,none,
|
|
|
|
|
"'optional' requirements are an Objective-C compatibility feature; add '@objc'",
|
|
|
|
|
())
|
|
|
|
|
@@ -2249,25 +2253,25 @@ ERROR(objcmembers_attribute_nonclass,none,
|
|
|
|
|
ERROR(optional_attribute_initializer,none,
|
|
|
|
|
"'optional' cannot be applied to an initializer", ())
|
|
|
|
|
ERROR(unavailable_method_non_objc_protocol,none,
|
|
|
|
|
"protocol members can only be marked unavailable in an @objc protocol",
|
|
|
|
|
"protocol members can only be marked unavailable in an '@objc' protocol",
|
|
|
|
|
())
|
|
|
|
|
ERROR(spi_available_malformed,none,
|
|
|
|
|
"SPI available only supports introducing version on specific platform",
|
|
|
|
|
())
|
|
|
|
|
ERROR(missing_in_class_init_1,none,
|
|
|
|
|
"stored property %0 requires an initial value%select{| or should be "
|
|
|
|
|
"@NSManaged}1", (Identifier, bool))
|
|
|
|
|
"'@NSManaged'}1", (Identifier, bool))
|
|
|
|
|
ERROR(missing_in_class_init_2,none,
|
|
|
|
|
"stored properties %0 and %1 require initial values%select{| or should "
|
|
|
|
|
"be @NSManaged}2",
|
|
|
|
|
"be '@NSManaged'}2",
|
|
|
|
|
(Identifier, Identifier, bool))
|
|
|
|
|
ERROR(missing_in_class_init_3plus,none,
|
|
|
|
|
"stored properties %0, %1, %select{and %2|%2, and others}3 "
|
|
|
|
|
"require initial values%select{| or should be @NSManaged}4",
|
|
|
|
|
"require initial values%select{| or should be '@NSManaged'}4",
|
|
|
|
|
(Identifier, Identifier, Identifier, bool, bool))
|
|
|
|
|
NOTE(requires_stored_property_inits_here,none,
|
|
|
|
|
"%select{superclass|class}1 %0 requires all stored properties to have "
|
|
|
|
|
"initial values%select{| or use @NSManaged}2", (Type, bool, bool))
|
|
|
|
|
"initial values%select{| or use '@NSManaged'}2", (Type, bool, bool))
|
|
|
|
|
ERROR(class_without_init,none,
|
|
|
|
|
"%select{class|actor}0 %1 has no initializers", (bool, Type))
|
|
|
|
|
NOTE(note_no_in_class_init_1,none,
|
|
|
|
|
@@ -2314,8 +2318,8 @@ ERROR(originally_definedin_must_not_before_available_version,none,
|
|
|
|
|
"the OSs", ())
|
|
|
|
|
|
|
|
|
|
WARNING(spi_preferred_over_spi_available,none,
|
|
|
|
|
"symbols that are @_spi_available on all platforms should use @_spi "
|
|
|
|
|
"instead", ())
|
|
|
|
|
"symbols that are '@_spi_available' on all platforms should use "
|
|
|
|
|
"'@_spi' instead", ())
|
|
|
|
|
|
|
|
|
|
// Alignment attribute
|
|
|
|
|
ERROR(alignment_not_power_of_two,none,
|
|
|
|
|
@@ -2757,7 +2761,7 @@ WARNING(add_predates_concurrency_import,none,
|
|
|
|
|
"%select{| as warnings}0", (bool, Identifier))
|
|
|
|
|
GROUPED_WARNING(remove_predates_concurrency_import,PreconcurrencyImport,
|
|
|
|
|
DefaultIgnore,
|
|
|
|
|
"'@preconcurrency' attribute on module %0 has no effect", (Identifier))
|
|
|
|
|
"'@preconcurrency' on module %0 has no effect", (Identifier))
|
|
|
|
|
WARNING(remove_public_import,none,
|
|
|
|
|
"public import of %0 was not used in public declarations or inlinable code",
|
|
|
|
|
(Identifier))
|
|
|
|
|
@@ -2885,11 +2889,11 @@ ERROR(non_class_cannot_conform_to_class_protocol,none,
|
|
|
|
|
"non-class type %0 cannot conform to class protocol %1",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
ERROR(cf_class_cannot_conform_to_objc_protocol,none,
|
|
|
|
|
"Core Foundation class %0 cannot conform to @objc protocol %1 because "
|
|
|
|
|
"Core Foundation class %0 cannot conform to '@objc' protocol %1 because "
|
|
|
|
|
"Core Foundation types are not classes in Objective-C",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
ERROR(objc_runtime_visible_cannot_conform_to_objc_protocol,none,
|
|
|
|
|
"class %0 cannot conform to @objc protocol %1 because "
|
|
|
|
|
"class %0 cannot conform to '@objc' protocol %1 because "
|
|
|
|
|
"the class is only visible via the Objective-C runtime",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
ERROR(objc_generics_cannot_conditionally_conform,none,
|
|
|
|
|
@@ -2897,13 +2901,13 @@ ERROR(objc_generics_cannot_conditionally_conform,none,
|
|
|
|
|
"the type uses the Objective-C generics model",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
ERROR(objc_protocol_cannot_have_conditional_conformance,none,
|
|
|
|
|
"type %0 cannot conditionally conform to @objc protocol %1 because "
|
|
|
|
|
"type %0 cannot conditionally conform to '@objc' protocol %1 because "
|
|
|
|
|
"Objective-C does not support conditional conformances",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
ERROR(objc_protocol_in_generic_extension,none,
|
|
|
|
|
"conformance of "
|
|
|
|
|
"%select{class from generic context|generic class}0 "
|
|
|
|
|
"%1 to @objc protocol %2 cannot be in an extension",
|
|
|
|
|
"%1 to '@objc' protocol %2 cannot be in an extension",
|
|
|
|
|
(bool, Type, Type))
|
|
|
|
|
ERROR(conditional_conformances_cannot_imply_conformances,none,
|
|
|
|
|
"conditional conformance of type %0 to protocol %1 does not imply conformance to "
|
|
|
|
|
@@ -3298,7 +3302,7 @@ ERROR(typealias_outside_of_protocol,none,
|
|
|
|
|
(DeclNameRef, Type))
|
|
|
|
|
|
|
|
|
|
ERROR(objc_protocol_inherits_non_objc_protocol,none,
|
|
|
|
|
"@objc protocol %0 cannot refine non-@objc protocol %1", (Type, Type))
|
|
|
|
|
"'@objc' protocol %0 cannot refine non-'@objc' protocol %1", (Type, Type))
|
|
|
|
|
|
|
|
|
|
ERROR(protocol_where_clause_self_requirement,none,
|
|
|
|
|
"constraint with subject type of 'Self' is not supported; "
|
|
|
|
|
@@ -3433,7 +3437,7 @@ NOTE(overridden_near_match_here,none,
|
|
|
|
|
"potential overridden %kind0 here",
|
|
|
|
|
(const ValueDecl *))
|
|
|
|
|
ERROR(override_decl_extension,none,
|
|
|
|
|
"%select{|non-@objc}0 %kind2 %select{"
|
|
|
|
|
"%select{|non-'@objc'}0 %kind2 %select{"
|
|
|
|
|
"is declared in extension of %3 and cannot be overridden|"
|
|
|
|
|
"declared in %3 cannot be overridden from extension}1",
|
|
|
|
|
(bool, bool, const ValueDecl *, DeclName))
|
|
|
|
|
@@ -3543,10 +3547,10 @@ ERROR(override_typed_throws,none,
|
|
|
|
|
"%0 that throws %1 cannot override one that throws %2",
|
|
|
|
|
(DescriptiveDeclKind, Type, Type))
|
|
|
|
|
ERROR(override_throws_objc,none,
|
|
|
|
|
"overriding a throwing @objc %select{method|initializer}0 with "
|
|
|
|
|
"overriding a throwing '@objc' %select{method|initializer}0 with "
|
|
|
|
|
"a non-throwing %select{method|initializer}0 is not supported", (bool))
|
|
|
|
|
ERROR(satisfy_throws_objc,none,
|
|
|
|
|
"satisfying a throwing @objc %select{method|initializer}0 with "
|
|
|
|
|
"satisfying a throwing '@objc' %select{method|initializer}0 with "
|
|
|
|
|
"a non-throwing %select{method|initializer}0 is not supported", (bool))
|
|
|
|
|
|
|
|
|
|
ERROR(override_optional_mismatch,none,
|
|
|
|
|
@@ -4091,19 +4095,19 @@ ERROR(isolation_in_inherits_executor,none,
|
|
|
|
|
"#isolation%select{| (introduced by a default argument)}0 cannot be used "
|
|
|
|
|
"within an '@_unsafeInheritExecutor' function", (bool))
|
|
|
|
|
ERROR(unsafe_inherits_executor_deprecated,none,
|
|
|
|
|
"@_unsafeInheritExecutor attribute is deprecated; consider an "
|
|
|
|
|
"'@_unsafeInheritExecutor' is deprecated; consider an "
|
|
|
|
|
"'isolated' parameter defaulted to '#isolation' instead", ())
|
|
|
|
|
|
|
|
|
|
ERROR(lifetime_invalid_global_scope,none, "%0 is only valid on methods",
|
|
|
|
|
(DeclAttribute))
|
|
|
|
|
ERROR(eagermove_and_lexical_combined,none,
|
|
|
|
|
"@_eagerMove and @_noEagerMove attributes are alternate styles of lifetimes "
|
|
|
|
|
"'@_eagerMove' and '@_noEagerMove' are alternate styles of lifetimes "
|
|
|
|
|
"and can't be combined", ())
|
|
|
|
|
ERROR(eagermove_and_noncopyable_combined,none,
|
|
|
|
|
"@_eagerMove cannot be applied to NonCopyable types", ())
|
|
|
|
|
"'@_eagerMove' cannot be applied to NonCopyable types", ())
|
|
|
|
|
|
|
|
|
|
ERROR(autoclosure_function_type,none,
|
|
|
|
|
"@autoclosure attribute only applies to function types",
|
|
|
|
|
"'@autoclosure' only applies to function types",
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_autoclosure_and_convention_attributes,none,
|
|
|
|
|
@@ -4111,10 +4115,11 @@ ERROR(invalid_autoclosure_and_convention_attributes,none,
|
|
|
|
|
(StringRef))
|
|
|
|
|
|
|
|
|
|
ERROR(autoclosure_function_input_nonunit,none,
|
|
|
|
|
"argument type of @autoclosure parameter must be '()'", ())
|
|
|
|
|
"argument type of '@autoclosure' parameter must be '()'", ())
|
|
|
|
|
|
|
|
|
|
ERROR(escaping_non_function_parameter,none,
|
|
|
|
|
"@escaping attribute may only be used in function parameter position", ())
|
|
|
|
|
"'@escaping' may only be used in function parameter position",
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
ERROR(escaping_inout_parameter,none,
|
|
|
|
|
"inout expression is implicitly escaping", ())
|
|
|
|
|
@@ -4135,34 +4140,34 @@ ERROR(instancemember_compilerinitialized,none,
|
|
|
|
|
|
|
|
|
|
// @_nonEphemeral attribute
|
|
|
|
|
ERROR(non_ephemeral_non_pointer_type,none,
|
|
|
|
|
"@_nonEphemeral attribute only applies to pointer types", ())
|
|
|
|
|
"'@_nonEphemeral' only applies to pointer types", ())
|
|
|
|
|
|
|
|
|
|
// NSManaged attribute
|
|
|
|
|
ERROR(attr_NSManaged_not_instance_member,none,
|
|
|
|
|
"@NSManaged only allowed on an instance property or method", ())
|
|
|
|
|
"'@NSManaged' only allowed on an instance property or method", ())
|
|
|
|
|
ERROR(attr_NSManaged_not_stored,none,
|
|
|
|
|
"@NSManaged not allowed on %select{computed|observing|addressed}0 "
|
|
|
|
|
"'@NSManaged' not allowed on %select{computed|observing|addressed}0 "
|
|
|
|
|
"properties", (unsigned))
|
|
|
|
|
ERROR(attr_NSManaged_let_property,none,
|
|
|
|
|
"@NSManaged not allowed on a 'let' property", ())
|
|
|
|
|
"'@NSManaged' not allowed on a 'let' property", ())
|
|
|
|
|
ERROR(attr_NSManaged_initial_value,none,
|
|
|
|
|
"@NSManaged property cannot have an initial value", ())
|
|
|
|
|
"'@NSManaged' property cannot have an initial value", ())
|
|
|
|
|
ERROR(attr_NSManaged_NSCopying,none,
|
|
|
|
|
"@NSManaged property cannot also be marked @NSCopying", ())
|
|
|
|
|
"'@NSManaged' property cannot also be marked '@NSCopying'", ())
|
|
|
|
|
ERROR(attr_NSManaged_method_body,none,
|
|
|
|
|
"@NSManaged method cannot have a body; it must be provided at runtime",())
|
|
|
|
|
"'@NSManaged' method cannot have a body; it must be provided at runtime",())
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// NSCopying attribute
|
|
|
|
|
ERROR(nscopying_only_on_class_properties,none,
|
|
|
|
|
"@NSCopying may only be used on properties in classes",
|
|
|
|
|
"'@NSCopying' may only be used on properties in classes",
|
|
|
|
|
())
|
|
|
|
|
ERROR(nscopying_only_mutable,none,
|
|
|
|
|
"@NSCopying requires property to be mutable", ())
|
|
|
|
|
"'@NSCopying' requires property to be mutable", ())
|
|
|
|
|
ERROR(nscopying_only_stored_property,none,
|
|
|
|
|
"@NSCopying is only valid on stored properties", ())
|
|
|
|
|
"'@NSCopying' is only valid on stored properties", ())
|
|
|
|
|
ERROR(nscopying_doesnt_conform,none,
|
|
|
|
|
"@NSCopying is only valid with types that conform to"
|
|
|
|
|
"'@NSCopying' is only valid with types that conform to"
|
|
|
|
|
" the NSCopying protocol", ())
|
|
|
|
|
|
|
|
|
|
// UIApplicationMain/NSApplicationMain attribute
|
|
|
|
|
@@ -4189,7 +4194,7 @@ ERROR(attr_ApplicationMain_deprecated,none,
|
|
|
|
|
"%" SELECT_APPLICATION_MAIN "0 is deprecated",
|
|
|
|
|
(unsigned))
|
|
|
|
|
NOTE(attr_ApplicationMain_deprecated_use_attr_main,none,
|
|
|
|
|
"use @main instead", ())
|
|
|
|
|
"use '@main' instead", ())
|
|
|
|
|
|
|
|
|
|
NOTE(attr_ApplicationMain_parse_as_library,none,
|
|
|
|
|
"pass '-parse-as-library' to compiler invocation if this is intentional",
|
|
|
|
|
@@ -4199,8 +4204,8 @@ NOTE(attr_ApplicationMain_script_here,none,
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
ERROR(attr_MainType_without_main,none,
|
|
|
|
|
"%0 is annotated with @main and must provide a main static function of type %"
|
|
|
|
|
SELECT_APPLICATION_MAIN_TYPES "1",
|
|
|
|
|
"%0 is annotated with '@main' and must provide a main static function "
|
|
|
|
|
"of type %" SELECT_APPLICATION_MAIN_TYPES "1",
|
|
|
|
|
(const ValueDecl *, bool))
|
|
|
|
|
|
|
|
|
|
#undef SELECT_APPLICATION_MAIN_TYPES
|
|
|
|
|
@@ -4208,16 +4213,18 @@ ERROR(attr_MainType_without_main,none,
|
|
|
|
|
#undef SELECT_APPLICATION_DELEGATE
|
|
|
|
|
|
|
|
|
|
ERROR(attr_rawlayout_experimental,none,
|
|
|
|
|
"the @_rawLayout attribute is experimental", ())
|
|
|
|
|
"the '@_rawLayout' attribute is experimental", ())
|
|
|
|
|
ERROR(attr_rawlayout_cannot_be_copyable,none,
|
|
|
|
|
"type with @_rawLayout cannot be copied and must be declared ~Copyable", ())
|
|
|
|
|
"type with '@_rawLayout' cannot be copied and must be declared ~Copyable",
|
|
|
|
|
())
|
|
|
|
|
ERROR(attr_rawlayout_cannot_have_stored_properties,none,
|
|
|
|
|
"type with @_rawLayout cannot have stored properties", ())
|
|
|
|
|
"type with '@_rawLayout' cannot have stored properties", ())
|
|
|
|
|
ERROR(attr_rawlayout_cannot_have_alignment_attr,none,
|
|
|
|
|
"type with @_rawLayout cannot also have an @_alignment attribute", ())
|
|
|
|
|
"type with '@_rawLayout' cannot also have an '@_alignment' attribute", ())
|
|
|
|
|
ERROR(attr_rawlayout_invalid_count_type,none,
|
|
|
|
|
"@_rawLayout count must either be integer literal or a generic argument", ())
|
|
|
|
|
|
|
|
|
|
"'@_rawLayout' count must either be integer literal or a generic "
|
|
|
|
|
"argument", ())
|
|
|
|
|
|
|
|
|
|
// lazy
|
|
|
|
|
ERROR(lazy_not_on_let,none,
|
|
|
|
|
"'lazy' cannot be used on a let", ())
|
|
|
|
|
@@ -4241,14 +4248,14 @@ ERROR(lazy_var_storage_access,none,
|
|
|
|
|
|
|
|
|
|
// Debugger function attribute.
|
|
|
|
|
ERROR(attr_for_debugger_support_only,none,
|
|
|
|
|
"@LLDBDebuggerSupport may only be used when debugger support is on", ())
|
|
|
|
|
"'@LLDBDebuggerSupport' may only be used when debugger support is on", ())
|
|
|
|
|
|
|
|
|
|
// @_implements
|
|
|
|
|
ERROR(implements_attr_protocol_lacks_member,none,
|
|
|
|
|
"protocol %0 has no member %1", (const ProtocolDecl *, DeclName))
|
|
|
|
|
|
|
|
|
|
ERROR(implements_attr_non_protocol_type,none,
|
|
|
|
|
"non-protocol type in @_implements attribute", ())
|
|
|
|
|
"non-protocol type in '@_implements'", ())
|
|
|
|
|
|
|
|
|
|
ERROR(implements_attr_protocol_not_conformed_to,none,
|
|
|
|
|
"containing type %0 does not conform to protocol %1",
|
|
|
|
|
@@ -4895,7 +4902,7 @@ WARNING(bitcasting_away_noescape, none,
|
|
|
|
|
"'withoutActuallyEscaping' to temporarily escape a function",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
WARNING(bitcasting_to_change_function_rep, none,
|
|
|
|
|
"'unsafeBitCast' from function type %0 to %1 changes @convention and "
|
|
|
|
|
"'unsafeBitCast' from function type %0 to %1 changes '@convention' and "
|
|
|
|
|
"is undefined; use an implicit conversion to change conventions",
|
|
|
|
|
(Type, Type))
|
|
|
|
|
WARNING(bitcasting_to_downcast, none,
|
|
|
|
|
@@ -4986,18 +4993,18 @@ NOTE(generic_parameters_always_escaping,none,
|
|
|
|
|
|
|
|
|
|
ERROR(passing_noattrfunc_to_attrfunc,none,
|
|
|
|
|
"passing %select{non-escaping|non-sendable}0 parameter %1 to function "
|
|
|
|
|
"expecting %select{an @escaping|a @Sendable}0 closure",
|
|
|
|
|
"expecting %select{an '@escaping'|a '@Sendable'}0 closure",
|
|
|
|
|
(unsigned, Identifier))
|
|
|
|
|
ERROR(converting_noescape_param_to_generic_type,none,
|
|
|
|
|
"converting non-escaping parameter %0 to generic parameter %1 may allow it to escape",
|
|
|
|
|
(Identifier, Type))
|
|
|
|
|
ERROR(assigning_noattrfunc_to_attrfunc,none,
|
|
|
|
|
"assigning %select{non-escaping|non-sendable}0 parameter %1 to "
|
|
|
|
|
"%select{an @escaping|a @Sendable}0 closure",
|
|
|
|
|
"%select{an '@escaping'|a '@Sendable'}0 closure",
|
|
|
|
|
(unsigned, Identifier))
|
|
|
|
|
ERROR(general_noattrfunc_to_attr,none,
|
|
|
|
|
"using %select{non-escaping|non-sendable}0 parameter %1 in a context "
|
|
|
|
|
"expecting %select{an @escaping|a @Sendable}0 closure",
|
|
|
|
|
"expecting %select{an '@escaping'|a '@Sendable'}0 closure",
|
|
|
|
|
(unsigned, Identifier))
|
|
|
|
|
ERROR(converting_noattrfunc_to_type,none,
|
|
|
|
|
"converting %select{non-escaping|non-sendable function}0 value to %1 "
|
|
|
|
|
@@ -5007,7 +5014,7 @@ NOTE(escape_expected_at_parameter_position,none,
|
|
|
|
|
"parameter #%0 expects escaping value of type %1",
|
|
|
|
|
(unsigned, Type))
|
|
|
|
|
NOTE(add_explicit_escaping,none,
|
|
|
|
|
"add explicit @escaping to function parameter #%0",
|
|
|
|
|
"add explicit '@escaping' to function parameter #%0",
|
|
|
|
|
(unsigned))
|
|
|
|
|
|
|
|
|
|
ERROR(converting_func_loses_global_actor,none,
|
|
|
|
|
@@ -5483,10 +5490,11 @@ ERROR(not_objc_function_async,none,
|
|
|
|
|
NOTE(not_objc_function_type_async,none,
|
|
|
|
|
"'async' function types cannot be represented in Objective-C", ())
|
|
|
|
|
ERROR(actor_isolated_objc,none,
|
|
|
|
|
"actor-isolated %kind0 cannot be @objc",
|
|
|
|
|
"actor-isolated %kind0 cannot be '@objc'",
|
|
|
|
|
(const ValueDecl *))
|
|
|
|
|
NOTE(protocol_witness_async_conflict,none,
|
|
|
|
|
"candidate is %select{not |}0'async', but%select{| @objc}1 protocol requirement is%select{| not}0",
|
|
|
|
|
"candidate is %select{not |}0'async', but%select{| '@objc'}1 protocol "
|
|
|
|
|
"requirement is%select{| not}0",
|
|
|
|
|
(bool, bool))
|
|
|
|
|
ERROR(async_autoclosure_nonasync_function,none,
|
|
|
|
|
"'async' autoclosure parameter in a non-'async' function", ())
|
|
|
|
|
@@ -5868,7 +5876,8 @@ ERROR(concurrent_value_inherit,none,
|
|
|
|
|
ERROR(non_sendable_type,none,
|
|
|
|
|
"type %0 does not conform to the 'Sendable' protocol", (Type))
|
|
|
|
|
ERROR(sendable_raw_storage,none,
|
|
|
|
|
"struct %0 with @_rawLayout does not conform to the 'Sendable' protocol", (DeclName))
|
|
|
|
|
"struct %0 with '@_rawLayout' does not conform to the 'Sendable' "
|
|
|
|
|
"protocol", (DeclName))
|
|
|
|
|
|
|
|
|
|
ERROR(typeattr_not_inheritance_clause,none,
|
|
|
|
|
"'%0' attribute only applies in inheritance clauses", (StringRef))
|
|
|
|
|
@@ -5876,13 +5885,14 @@ ERROR(typeattr_not_existential,none,
|
|
|
|
|
"'%0' attribute cannot apply to non-protocol type %1", (StringRef, Type))
|
|
|
|
|
|
|
|
|
|
WARNING(unchecked_conformance_not_special,none,
|
|
|
|
|
"@unchecked conformance to %0 has no meaning", (Type))
|
|
|
|
|
"'@unchecked' conformance to %0 has no meaning", (Type))
|
|
|
|
|
WARNING(restate_unchecked_sendable,none,
|
|
|
|
|
"class %0 must restate inherited '@unchecked Sendable' conformance",
|
|
|
|
|
(DeclName))
|
|
|
|
|
|
|
|
|
|
WARNING(preconcurrency_conformance_not_used,none,
|
|
|
|
|
"@preconcurrency attribute on conformance to %0 has no effect", (Type))
|
|
|
|
|
"'@preconcurrency' on conformance to %0 has no effect",
|
|
|
|
|
(Type))
|
|
|
|
|
|
|
|
|
|
ERROR(redundant_any_in_existential,none,
|
|
|
|
|
"redundant 'any' in type %0",
|
|
|
|
|
@@ -6284,8 +6294,9 @@ ERROR(unreferenced_generic_parameter,NoUsage,
|
|
|
|
|
"generic parameter '%0' is not used in function signature", (StringRef))
|
|
|
|
|
ERROR(unexpected_ctype_for_non_c_convention,none,
|
|
|
|
|
"convention '%0' does not support the 'cType' argument label, did you "
|
|
|
|
|
"mean @convention(c, cType: \"%1\") or @convention(block, cType: \"%1\") "
|
|
|
|
|
"instead?", (StringRef, StringRef))
|
|
|
|
|
"mean '@convention(c, cType: \"%1\")' or "
|
|
|
|
|
"'@convention(block, cType: \"%1\")' instead?",
|
|
|
|
|
(StringRef, StringRef))
|
|
|
|
|
ERROR(unable_to_parse_c_function_type,none,
|
|
|
|
|
"unable to parse '%0'; it should be a C function pointer type or a "
|
|
|
|
|
"block pointer type", (StringRef))
|
|
|
|
|
@@ -6339,20 +6350,21 @@ ERROR(differentiable_function_type_no_differentiability_parameters,
|
|
|
|
|
|
|
|
|
|
// SIL
|
|
|
|
|
ERROR(opened_bad_constraint_type,none,
|
|
|
|
|
"@opened constraint type %0 is not a protocol or protocol composition", (Type))
|
|
|
|
|
"'@opened' constraint type %0 is not a protocol or protocol composition",
|
|
|
|
|
(Type))
|
|
|
|
|
ERROR(opened_bad_interface_type,none,
|
|
|
|
|
"@opened interface type %0 is not a type parameter", (Type))
|
|
|
|
|
"'@opened' interface type %0 is not a type parameter", (Type))
|
|
|
|
|
ERROR(sil_function_input_label,PointsToFirstBadToken,
|
|
|
|
|
"SIL function types cannot have labeled inputs", ())
|
|
|
|
|
ERROR(sil_non_coro_yields,PointsToFirstBadToken,
|
|
|
|
|
"non-coroutine SIL function types cannot have @yield results", ())
|
|
|
|
|
"non-coroutine SIL function types cannot have '@yield' results", ())
|
|
|
|
|
ERROR(sil_function_invalid_convention,PointsToFirstBadToken,
|
|
|
|
|
"convention attribute isn't valid on a %select{parameter|result|callee}0",
|
|
|
|
|
(unsigned))
|
|
|
|
|
ERROR(ast_subst_function_type,none,
|
|
|
|
|
"substitutions cannot be provided on a formal function type", ())
|
|
|
|
|
ERROR(sil_function_multiple_error_results,PointsToFirstBadToken,
|
|
|
|
|
"SIL function types cannot have multiple @error results", ())
|
|
|
|
|
"SIL function types cannot have multiple '@error' results", ())
|
|
|
|
|
ERROR(unsupported_sil_convention,none,
|
|
|
|
|
"convention '%0' not supported in SIL", (StringRef))
|
|
|
|
|
ERROR(illegal_sil_type,none,
|
|
|
|
|
@@ -6360,17 +6372,19 @@ ERROR(illegal_sil_type,none,
|
|
|
|
|
ERROR(sil_box_arg_mismatch,none,
|
|
|
|
|
"SIL box type has wrong number of generic arguments for layout", ())
|
|
|
|
|
ERROR(sil_pack_element_uuid_not_found,none,
|
|
|
|
|
"open_pack_element instruction not found for @pack_element type UUID; "
|
|
|
|
|
"open_pack_element instruction not found for '@pack_element' type UUID; "
|
|
|
|
|
"possible forward reference?", ())
|
|
|
|
|
// SIL Metatypes
|
|
|
|
|
ERROR(sil_metatype_without_repr,none,
|
|
|
|
|
"metatypes in SIL must have @thin, @thick, or @objc_metatype attribute",
|
|
|
|
|
"metatypes in SIL must be '@thin', '@thick', or '@objc_metatype'",
|
|
|
|
|
())
|
|
|
|
|
ERROR(sil_metatype_multiple_reprs,none,
|
|
|
|
|
"metatypes in SIL can only be one of @thin, @thick, or @objc_metatype",
|
|
|
|
|
"metatypes in SIL can only be one of '@thin', '@thick', or "
|
|
|
|
|
"'@objc_metatype'",
|
|
|
|
|
())
|
|
|
|
|
ERROR(sil_metatype_not_metatype,none,
|
|
|
|
|
"@thin, @thick, or @objc_metatype can only apply to metatype types in SIL",
|
|
|
|
|
"'@thin', '@thick', or '@objc_metatype' can only apply to metatype "
|
|
|
|
|
"types in SIL",
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
@@ -6385,14 +6399,14 @@ ERROR(attr_used_without_required_module, none,
|
|
|
|
|
(DeclAttribute, Identifier))
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_objc_decl_context,none,
|
|
|
|
|
"@objc can only be used with members of classes, @objc protocols, and "
|
|
|
|
|
"concrete extensions of classes", ())
|
|
|
|
|
"'@objc' can only be used with members of classes, '@objc' protocols, "
|
|
|
|
|
"and concrete extensions of classes", ())
|
|
|
|
|
ERROR(invalid_objc_decl,none,
|
|
|
|
|
"only classes (and their extensions), non-marker protocols, methods, "
|
|
|
|
|
"initializers, properties, and subscript declarations can be declared"
|
|
|
|
|
" @objc", ())
|
|
|
|
|
" '@objc'", ())
|
|
|
|
|
ERROR(invalid_objc_swift_rooted_class,none,
|
|
|
|
|
"only classes that inherit from NSObject can be declared @objc", ())
|
|
|
|
|
"only classes that inherit from NSObject can be declared '@objc'", ())
|
|
|
|
|
NOTE(invalid_objc_swift_root_class_insert_nsobject,none,
|
|
|
|
|
"inherit from 'NSObject' to silence this error", ())
|
|
|
|
|
|
|
|
|
|
@@ -6408,12 +6422,13 @@ NOTE(objc_header_sorting_arbitrary_please_report,none,
|
|
|
|
|
"declarations", ())
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_nonobjc_decl,none,
|
|
|
|
|
"only class members and extensions of classes can be declared @nonobjc", ())
|
|
|
|
|
"only class members and extensions of classes can be declared "
|
|
|
|
|
"'@nonobjc'", ())
|
|
|
|
|
ERROR(invalid_nonobjc_extension,none,
|
|
|
|
|
"only extensions of classes can be declared @nonobjc", ())
|
|
|
|
|
"only extensions of classes can be declared '@nonobjc'", ())
|
|
|
|
|
|
|
|
|
|
ERROR(objc_in_extension_context,none,
|
|
|
|
|
"members of constrained extensions cannot be declared @objc", ())
|
|
|
|
|
"members of constrained extensions cannot be declared '@objc'", ())
|
|
|
|
|
ERROR(objc_in_generic_extension,none,
|
|
|
|
|
"extensions of %select{classes from generic context|generic classes}0 "
|
|
|
|
|
"cannot contain '@objc' members", (bool))
|
|
|
|
|
@@ -6421,9 +6436,9 @@ ERROR(objc_in_resilient_extension,none,
|
|
|
|
|
"'@objc' %0 in extension of subclass of %1 requires %2 %3",
|
|
|
|
|
(DescriptiveDeclKind, Identifier, AvailabilityDomain, AvailabilityRange))
|
|
|
|
|
ERROR(objc_operator, none,
|
|
|
|
|
"operator methods cannot be declared @objc", ())
|
|
|
|
|
"operator methods cannot be declared '@objc'", ())
|
|
|
|
|
ERROR(objc_operator_proto, none,
|
|
|
|
|
"@objc protocols must not have operator requirements", ())
|
|
|
|
|
"'@objc' protocols must not have operator requirements", ())
|
|
|
|
|
|
|
|
|
|
ERROR(objc_for_generic_class,none,
|
|
|
|
|
"generic subclasses of '@objc' classes cannot have an explicit '@objc' "
|
|
|
|
|
@@ -6475,7 +6490,7 @@ ERROR(objc_cannot_infer_name_raw_identifier,none,
|
|
|
|
|
(DescriptiveDeclKind))
|
|
|
|
|
|
|
|
|
|
// If you change this, also change enum ObjCReason
|
|
|
|
|
#define OBJC_ATTR_SELECT "select{marked @_cdecl|marked dynamic|marked @objc|marked @objcMembers|marked @IBOutlet|marked @IBAction|marked @IBSegueAction|marked @NSManaged|a member of an @objc protocol|implicitly @objc|an @objc override|an implementation of an @objc requirement|marked @IBInspectable|marked @GKInspectable|in an @objc extension of a class (without @nonobjc)|in an @objc @implementation extension of a class (without final or @nonobjc)|marked @objc by an access note}"
|
|
|
|
|
#define OBJC_ATTR_SELECT "select{marked '@_cdecl'|marked dynamic|marked '@objc'|marked '@objcMembers'|marked '@IBOutlet'|marked '@IBAction'|marked '@IBSegueAction'|marked '@NSManaged'|a member of an '@objc' protocol|implicitly '@objc'|an '@objc' override|an implementation of an '@objc' requirement|marked '@IBInspectable'|marked '@GKInspectable'|in an '@objc' extension of a class (without '@nonobjc')|in an '@objc @implementation' extension of a class (without final or '@nonobjc')|marked '@objc' by an access note}"
|
|
|
|
|
|
|
|
|
|
ERROR(objc_invalid_on_var,none,
|
|
|
|
|
"property cannot be %" OBJC_ATTR_SELECT "0 "
|
|
|
|
|
@@ -6514,7 +6529,7 @@ NOTE(not_objc_non_trivial_cxx_class,none,
|
|
|
|
|
NOTE(not_objc_tuple,none,
|
|
|
|
|
"tuples cannot be represented in Objective-C", ())
|
|
|
|
|
NOTE(not_objc_swift_class,none,
|
|
|
|
|
"classes not annotated with @objc cannot be represented "
|
|
|
|
|
"classes not annotated with '@objc' cannot be represented "
|
|
|
|
|
"in Objective-C", ())
|
|
|
|
|
NOTE(not_objc_swift_struct,none,
|
|
|
|
|
"Swift structs cannot be represented in Objective-C", ())
|
|
|
|
|
@@ -6542,11 +6557,11 @@ ERROR(no_opaque_return_type_of,none,
|
|
|
|
|
ERROR(objc_observing_accessor, none,
|
|
|
|
|
"observers (%0) are not allowed to be marked '@objc'", (DescriptiveDeclKind))
|
|
|
|
|
ERROR(objc_init_accessor, none,
|
|
|
|
|
"init accessors cannot be marked @objc", ())
|
|
|
|
|
"init accessors cannot be marked '@objc'", ())
|
|
|
|
|
ERROR(objc_addressor, none,
|
|
|
|
|
"addressors are not allowed to be marked @objc", ())
|
|
|
|
|
"addressors are not allowed to be marked '@objc'", ())
|
|
|
|
|
ERROR(objc_coroutine_accessor, none,
|
|
|
|
|
"'read' and 'modify' accessors are not allowed to be marked @objc", ())
|
|
|
|
|
"'read' and 'modify' accessors are not allowed to be marked '@objc'", ())
|
|
|
|
|
ERROR(objc_invalid_on_func_variadic,none,
|
|
|
|
|
"method cannot be %" OBJC_ATTR_SELECT "0 because it has a variadic "
|
|
|
|
|
"parameter", (unsigned))
|
|
|
|
|
@@ -6681,7 +6696,7 @@ WARNING(witness_non_objc_storage_optional,none,
|
|
|
|
|
(bool, DeclName, Identifier))
|
|
|
|
|
|
|
|
|
|
ERROR(nonobjc_not_allowed,none,
|
|
|
|
|
"declaration is %" OBJC_ATTR_SELECT "0, and cannot be marked @nonobjc",
|
|
|
|
|
"declaration is %" OBJC_ATTR_SELECT "0, and cannot be marked '@nonobjc'",
|
|
|
|
|
(unsigned))
|
|
|
|
|
|
|
|
|
|
#undef OBJC_DIAG_SELECT_2
|
|
|
|
|
@@ -6692,11 +6707,12 @@ ERROR(nonobjc_not_allowed,none,
|
|
|
|
|
// MARK: @exclusivity
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
ERROR(exclusivity_on_wrong_decl,none,
|
|
|
|
|
"@exclusivity can only be used on class properties, static properties and global variables",
|
|
|
|
|
"'@exclusivity' can only be used on class properties, static properties "
|
|
|
|
|
"and global variables",
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
ERROR(exclusivity_on_computed_property,none,
|
|
|
|
|
"@exclusivity can only be used on stored properties",
|
|
|
|
|
"'@exclusivity' can only be used on stored properties",
|
|
|
|
|
())
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
@@ -6706,7 +6722,7 @@ ERROR(borrowed_with_objc_dynamic,none,
|
|
|
|
|
"%0 cannot be '@_borrowed' if it is '@objc dynamic'",
|
|
|
|
|
(DescriptiveDeclKind))
|
|
|
|
|
ERROR(borrowed_on_objc_protocol_requirement,none,
|
|
|
|
|
"%0 cannot be '@_borrowed' if it is an @objc protocol requirement",
|
|
|
|
|
"%0 cannot be '@_borrowed' if it is an '@objc' protocol requirement",
|
|
|
|
|
(DescriptiveDeclKind))
|
|
|
|
|
ERROR(borrowed_with_effect,none,
|
|
|
|
|
"%0 cannot be '@_borrowed' if it is 'async' or 'throws'",
|
|
|
|
|
@@ -6749,9 +6765,9 @@ ERROR(dynamic_replacement_not_in_extension, none,
|
|
|
|
|
ERROR(dynamic_replacement_must_not_be_dynamic, none,
|
|
|
|
|
"dynamicReplacement(for:) of %0 must not be dynamic itself", (DeclName))
|
|
|
|
|
ERROR(dynamic_replacement_replaced_not_objc_dynamic, none,
|
|
|
|
|
"%0 is not marked @objc dynamic", (DeclName))
|
|
|
|
|
"%0 is not marked '@objc dynamic'", (DeclName))
|
|
|
|
|
ERROR(dynamic_replacement_replacement_not_objc_dynamic, none,
|
|
|
|
|
"%0 is marked @objc dynamic", (DeclName))
|
|
|
|
|
"%0 is marked '@objc dynamic'", (DeclName))
|
|
|
|
|
ERROR(dynamic_replacement_replaced_constructor_is_convenience, none,
|
|
|
|
|
"replaced initializer %0 is marked as convenience", (DeclNameRef))
|
|
|
|
|
ERROR(dynamic_replacement_replaced_constructor_is_not_convenience, none,
|
|
|
|
|
@@ -6901,8 +6917,8 @@ ERROR(availability_parameterized_protocol_only_version_newer, none,
|
|
|
|
|
(AvailabilityDomain, AvailabilityRange))
|
|
|
|
|
|
|
|
|
|
ERROR(availability_isolated_any_only_version_newer, none,
|
|
|
|
|
"runtime support for @isolated(any) function types is only available in "
|
|
|
|
|
"%0 %1 or newer",
|
|
|
|
|
"runtime support for '@isolated(any)' function types is only available "
|
|
|
|
|
"in %0 %1 or newer",
|
|
|
|
|
(AvailabilityDomain, AvailabilityRange))
|
|
|
|
|
|
|
|
|
|
ERROR(availability_copyable_generics_casting_only_version_newer, none,
|
|
|
|
|
@@ -6928,7 +6944,7 @@ NOTE(availability_guard_with_version_check, none,
|
|
|
|
|
"add 'if #available' version check", ())
|
|
|
|
|
|
|
|
|
|
NOTE(availability_add_attribute, none,
|
|
|
|
|
"add @available attribute to enclosing %0", (DescriptiveDeclKind))
|
|
|
|
|
"add '@available' attribute to enclosing %0", (DescriptiveDeclKind))
|
|
|
|
|
FIXIT(insert_available_attr,
|
|
|
|
|
"@available(%0 %1, *)\n%2",
|
|
|
|
|
(StringRef, StringRef, StringRef))
|
|
|
|
|
@@ -7064,7 +7080,8 @@ ERROR(unavailability_query_wildcard_not_required, none,
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
WARNING(discardable_result_on_void_never_function, none,
|
|
|
|
|
"@discardableResult declared on a function returning %select{Never|Void}0 "
|
|
|
|
|
"'@discardableResult' declared on a function returning "
|
|
|
|
|
"'%select{Never|Void}0' "
|
|
|
|
|
"is unnecessary", (bool))
|
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------------------------
|
|
|
|
|
@@ -7352,7 +7369,7 @@ GROUPED_ERROR(property_wrapper_ambiguous_value_property,PropertyWrappers,none,
|
|
|
|
|
"named %1", (Type, Identifier))
|
|
|
|
|
GROUPED_ERROR(property_wrapper_wrong_initial_value_init,PropertyWrappers,none,
|
|
|
|
|
"%0 parameter type (%1) must be the same as its "
|
|
|
|
|
"'wrappedValue' property type (%2) or an @autoclosure thereof",
|
|
|
|
|
"'wrappedValue' property type (%2) or an '@autoclosure' thereof",
|
|
|
|
|
(DeclName, Type, Type))
|
|
|
|
|
GROUPED_ERROR(property_wrapper_failable_init,PropertyWrappers,none,
|
|
|
|
|
"property wrapper initializer %0 cannot be failable", (DeclName))
|
|
|
|
|
@@ -7416,7 +7433,7 @@ ERROR(property_wrapper_effectful,none,
|
|
|
|
|
|
|
|
|
|
ERROR(property_with_wrapper_conflict_attribute,none,
|
|
|
|
|
"property %0 with a wrapper cannot also be "
|
|
|
|
|
"%select{lazy|@NSCopying|@NSManaged|weak|unowned|unmanaged}1",
|
|
|
|
|
"%select{lazy|'@NSCopying'|'@NSManaged'|weak|unowned|unmanaged}1",
|
|
|
|
|
(Identifier, int))
|
|
|
|
|
ERROR(property_wrapper_not_single_var, none,
|
|
|
|
|
"property wrapper can only apply to a single variable", ())
|
|
|
|
|
@@ -7806,8 +7823,9 @@ WARNING(macro_type_access_warn,none,
|
|
|
|
|
ERROR(macro_in_nested,none,
|
|
|
|
|
"macro %0 can only be declared at file scope", (DeclName))
|
|
|
|
|
ERROR(macro_without_role,none,
|
|
|
|
|
"macro %0 must declare its applicable roles via '@freestanding' or @attached'",
|
|
|
|
|
(DeclName))
|
|
|
|
|
"macro %0 must declare its applicable roles via '@freestanding' or "
|
|
|
|
|
"'@attached'",
|
|
|
|
|
(DeclName))
|
|
|
|
|
ERROR(macro_result_type_cannot_be_used,none,
|
|
|
|
|
"only a freestanding expression macro can produce a result of type %0",
|
|
|
|
|
(Type))
|
|
|
|
|
@@ -7965,7 +7983,7 @@ NOTE(note_non_bitwise_copyable_type_indirect_enum_element,none,
|
|
|
|
|
ERROR(non_bitwise_copyable_type_suppressed,none,
|
|
|
|
|
"cannot both conform to and suppress conformance to 'BitwiseCopyable'", ())
|
|
|
|
|
ERROR(non_bitwise_copyable_type_sensitive,none,
|
|
|
|
|
"a @sensitive type cannot conform to 'BitwiseCopyable'", ())
|
|
|
|
|
"a '@sensitive' type cannot conform to 'BitwiseCopyable'", ())
|
|
|
|
|
ERROR(non_bitwise_copyable_type_cxx_nontrivial,none,
|
|
|
|
|
"non-trivial C++ type cannot conform to 'BitwiseCopyable'", ())
|
|
|
|
|
ERROR(non_bitwise_copyable_c_type_nontrivial,none,
|
|
|
|
|
@@ -8079,8 +8097,8 @@ ERROR(noimplicitcopy_attr_valid_only_on_local_let_params,
|
|
|
|
|
ERROR(noimplicitcopy_attr_not_allowed_on_moveonlytype,none,
|
|
|
|
|
"'@_noImplicitCopy' has no effect when applied to a noncopyable type", ())
|
|
|
|
|
ERROR(noncopyable_types_cannot_be_resilient, none,
|
|
|
|
|
"noncopyable %kind0 must be @frozen in library evolution mode; "
|
|
|
|
|
"non-@frozen public and @usableFromInline noncopyable types are not "
|
|
|
|
|
"noncopyable %kind0 must be '@frozen' in library evolution mode; "
|
|
|
|
|
"non-'@frozen' public and '@usableFromInline' noncopyable types are not "
|
|
|
|
|
"supported",
|
|
|
|
|
(const ValueDecl *))
|
|
|
|
|
ERROR(noncopyable_cannot_have_read_set_accessor,none,
|
|
|
|
|
@@ -8097,7 +8115,7 @@ ERROR(init_accessor_can_refer_only_to_properties,none,
|
|
|
|
|
(DescriptiveDeclKind, DeclNameRef))
|
|
|
|
|
|
|
|
|
|
ERROR(storage_restrictions_attribute_not_on_init_accessor,none,
|
|
|
|
|
"@storageRestrictions attribute could only be used with init accessors",
|
|
|
|
|
"'@storageRestrictions' could only be used with init accessors",
|
|
|
|
|
())
|
|
|
|
|
ERROR(init_accessor_property_both_init_and_accessed,none,
|
|
|
|
|
"property %0 cannot be both initialized and accessed",
|
|
|
|
|
@@ -8289,9 +8307,10 @@ NOTE(note_reference_to_nonisolated_unsafe,none,
|
|
|
|
|
NOTE(note_reference_unowned_unsafe,none,
|
|
|
|
|
"reference to unowned(unsafe) %kind0 is unsafe", (const ValueDecl *))
|
|
|
|
|
NOTE(note_reference_exclusivity_unchecked,none,
|
|
|
|
|
"reference to @exclusivity(unchecked) %kind0 is unsafe", (const ValueDecl *))
|
|
|
|
|
"reference to '@exclusivity(unchecked)' %kind0 is unsafe",
|
|
|
|
|
(const ValueDecl *))
|
|
|
|
|
NOTE(note_use_of_unsafe_conformance_is_unsafe,none,
|
|
|
|
|
"@unsafe conformance of %0 to %kind1 involves unsafe code",
|
|
|
|
|
"'@unsafe' conformance of %0 to %kind1 involves unsafe code",
|
|
|
|
|
(Type, const ValueDecl *))
|
|
|
|
|
NOTE(note_unsafe_storage,none,
|
|
|
|
|
"%kindbase1 involves unsafe type %2", (bool, const ValueDecl *, Type))
|
|
|
|
|
@@ -8309,7 +8328,7 @@ NOTE(decl_storage_mark_safe,none,
|
|
|
|
|
"a safe interface", ())
|
|
|
|
|
|
|
|
|
|
ERROR(safe_and_unsafe_attr,none,
|
|
|
|
|
"%kindbase0 cannot be both @safe and @unsafe", (const Decl *))
|
|
|
|
|
"%kindbase0 cannot be both '@safe' and '@unsafe'", (const Decl *))
|
|
|
|
|
|
|
|
|
|
GROUPED_WARNING(unsafe_superclass,StrictMemorySafety,none,
|
|
|
|
|
"%kindbase0 has superclass involving unsafe type %1",
|
|
|
|
|
@@ -8330,7 +8349,7 @@ GROUPED_WARNING(override_safe_with_unsafe,StrictMemorySafety,none,
|
|
|
|
|
"override of safe %0 with unsafe %0", (DescriptiveDeclKind))
|
|
|
|
|
|
|
|
|
|
GROUPED_WARNING(preconcurrency_import_unsafe,StrictMemorySafety,none,
|
|
|
|
|
"@preconcurrency import is not memory-safe because it can silently "
|
|
|
|
|
"'@preconcurrency' import is not memory-safe because it can silently "
|
|
|
|
|
"introduce data races", ())
|
|
|
|
|
GROUPED_WARNING(unsafe_without_unsafe,StrictMemorySafety,none,
|
|
|
|
|
"expression uses unsafe constructs but is not marked with 'unsafe'", ())
|
|
|
|
|
@@ -8341,7 +8360,8 @@ GROUPED_WARNING(no_unsafe_in_unsafe,StrictMemorySafety,none,
|
|
|
|
|
GROUPED_WARNING(no_unsafe_in_unsafe_for,StrictMemorySafety,none,
|
|
|
|
|
"no unsafe operations occur within 'unsafe' for-in loop", ())
|
|
|
|
|
NOTE(make_subclass_unsafe,none,
|
|
|
|
|
"make class %0 @unsafe to allow unsafe overrides of safe superclass methods",
|
|
|
|
|
"make class %0 '@unsafe' to allow unsafe overrides of safe superclass "
|
|
|
|
|
"methods",
|
|
|
|
|
(DeclName))
|
|
|
|
|
|
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
@@ -8581,11 +8601,11 @@ ERROR(nonisolated_nonsending_incompatible_with_isolated_param,none,
|
|
|
|
|
(TypeRepr *))
|
|
|
|
|
|
|
|
|
|
ERROR(execution_behavior_type_attr_incompatible_with_isolated_any,none,
|
|
|
|
|
"cannot use '@%0' together with @isolated(any)",
|
|
|
|
|
"cannot use '@%0' together with '@isolated(any)'",
|
|
|
|
|
(StringRef))
|
|
|
|
|
|
|
|
|
|
ERROR(nonisolated_nonsending_incompatible_with_isolated_any,none,
|
|
|
|
|
"cannot use %0 together with @isolated(any)",
|
|
|
|
|
"cannot use %0 together with '@isolated(any)'",
|
|
|
|
|
(TypeRepr *))
|
|
|
|
|
|
|
|
|
|
ERROR(invalid_function_conversion_with_non_sendable,none,
|
|
|
|
|
|