@@ -319,8 +319,8 @@ ERROR(class_cannot_be_addressable_for_dependencies,none,
319
319
" a class cannot be @_addressableForDependencies" , ())
320
320
321
321
ERROR(unsupported_closure_attr,none,
322
- " %select{attribute |}0'%1' is not supported on a closure" ,
323
- (bool , StringRef ))
322
+ " %select{attribute |}0%1 is not supported on a closure" ,
323
+ (bool , DeclAttribute ))
324
324
325
325
NOTE(suggest_partial_overloads,none,
326
326
" overloads for '%1' exist with these %select{"
@@ -1730,11 +1730,11 @@ ERROR(missing_initializer_def,PointsToFirstBadToken,
1730
1730
ERROR(operator_not_func,none,
1731
1731
" operators must be declared with 'func'" , ())
1732
1732
ERROR(redefining_builtin_operator,none,
1733
- " cannot declare a custom %0 '%1' operator" , (StringRef , StringRef))
1733
+ " cannot declare a custom %0 '%1' operator" , (DeclAttribute , StringRef))
1734
1734
ERROR(attribute_requires_operator_identifier,none,
1735
- " '%0' requires a function with an operator identifier" , (StringRef ))
1735
+ " %0 requires a function with an operator identifier" , (DeclAttribute ))
1736
1736
ERROR(attribute_requires_single_argument,none,
1737
- " '%0' requires a function with one argument" , (StringRef ))
1737
+ " %0 requires a function with one argument" , (DeclAttribute ))
1738
1738
1739
1739
ERROR(nominal_type_not_attribute,none,
1740
1740
" %kind0 cannot be used as an attribute" , (const ValueDecl *))
@@ -1783,23 +1783,24 @@ ERROR(invalid_ibdesignable_extension,none,
1783
1783
" @IBDesignable can only be applied to classes and extensions "
1784
1784
" of classes" , ())
1785
1785
ERROR(attr_must_be_used_on_class_instance,none,
1786
- " only class instance properties can be declared @ %0" , (StringRef ))
1786
+ " only class instance properties can be declared %0" , (DeclAttribute ))
1787
1787
ERROR(invalid_ibaction_decl,none,
1788
- " only instance methods can be declared @ %0" , (StringRef ))
1788
+ " only instance methods can be declared %0" , (DeclAttribute ))
1789
1789
ERROR(invalid_ibaction_result,none,
1790
- " methods declared @%0 must %select{|not }1return a value" , (StringRef, bool ))
1790
+ " methods declared %0 must %select{|not }1return a value" ,
1791
+ (DeclAttribute, bool ))
1791
1792
ERROR(invalid_ibaction_argument_count,none,
1792
- " @ %0 methods must have %1 to %2 arguments" ,
1793
- (StringRef , int , int ))
1793
+ " %0 methods must have %1 to %2 arguments" ,
1794
+ (DeclAttribute , int , int ))
1794
1795
ERROR(invalid_ibaction_argument_count_exact,none,
1795
- " @ %0 methods must have %2 argument%s2" ,
1796
- (StringRef , int , int ))
1796
+ " %0 methods must have %2 argument%s2" ,
1797
+ (DeclAttribute , int , int ))
1797
1798
ERROR(invalid_ibaction_argument_count_max,none,
1798
- " @ %0 methods must have at most %2 argument%s2" ,
1799
- (StringRef , int , int ))
1799
+ " %0 methods must have at most %2 argument%s2" ,
1800
+ (DeclAttribute , int , int ))
1800
1801
ERROR(ibsegueaction_objc_method_family,none,
1801
- " @ %0 method cannot have selector %1 because it has special memory "
1802
- " management behavior" , (StringRef , ObjCSelector))
1802
+ " %0 method cannot have selector %1 because it has special memory "
1803
+ " management behavior" , (DeclAttribute , ObjCSelector))
1803
1804
NOTE(fixit_rename_in_swift,none,
1804
1805
" change Swift name to %0" , (DeclName))
1805
1806
NOTE(fixit_rename_in_objc,none,
@@ -2051,7 +2052,8 @@ ERROR(extern_not_at_top_level_func,none,
2051
2052
ERROR(extern_empty_c_name,none,
2052
2053
" expected non-empty C name in @_extern attribute" , ())
2053
2054
ERROR(extern_only_non_other_attr,none,
2054
- " @_extern attribute cannot be applied to an '@%0' declaration" , (StringRef))
2055
+ " @_extern attribute cannot be applied to an %0 declaration" ,
2056
+ (DeclAttribute))
2055
2057
WARNING(extern_c_maybe_invalid_name, none,
2056
2058
" C name '%0' may be invalid; explicitly specify the name in @_extern(c) to suppress this warning" ,
2057
2059
(StringRef))
@@ -2142,14 +2144,16 @@ ERROR(expose_zero_size_to_cxx,none,
2142
2144
ERROR(attr_methods_only,none,
2143
2145
" only methods can be declared %0" , (DeclAttribute))
2144
2146
ERROR(attr_decl_async,none,
2145
- " @ %0 %1 cannot be asynchronous" , (StringRef, DescriptiveDeclKind ))
2147
+ " %0 %kindonly1 cannot be asynchronous" , (DeclAttribute, const FuncDecl * ))
2146
2148
2147
2149
ERROR(attr_only_at_non_local_scope, none,
2150
+ " attribute %0 can only be used in a non-local scope" , (DeclAttribute))
2151
+ ERROR(attr_name_only_at_non_local_scope, none,
2148
2152
" attribute '%0' can only be used in a non-local scope" , (StringRef))
2149
2153
ERROR(attr_only_at_non_generic_scope, none,
2150
- " attribute '%0' cannot be used in a generic context" , (StringRef ))
2154
+ " attribute %0 cannot be used in a generic context" , (DeclAttribute ))
2151
2155
ERROR(attr_only_on_static_properties, none,
2152
- " properties with attribute '%0' must be static" , (StringRef ))
2156
+ " properties with attribute %0 must be static" , (DeclAttribute ))
2153
2157
2154
2158
ERROR(weak_unowned_in_embedded_swift, none,
2155
2159
" attribute %0 cannot be used in embedded Swift" , (ReferenceOwnership))
@@ -4018,7 +4022,7 @@ ERROR(attr_has_no_effect_on_unavailable_decl,none,
4018
4022
(DeclAttribute, const ValueDecl *, AvailabilityDomain))
4019
4023
4020
4024
ERROR(attr_ambiguous_reference_to_decl,none,
4021
- " ambiguous reference to %0 in '@%1' attribute" , (DeclNameRef, StringRef ))
4025
+ " ambiguous reference to %0 in %1 attribute" , (DeclNameRef, DeclAttribute ))
4022
4026
4023
4027
ERROR(attr_contains_multiple_versions_for_platform,none,
4024
4028
" '%0' contains multiple versions for %1" , (DeclAttribute, StringRef))
@@ -6001,14 +6005,15 @@ NOTE(move_global_actor_attr_to_storage_decl,none,
6001
6005
" move global actor attribute to %kind0" , (const ValueDecl *))
6002
6006
6003
6007
ERROR(actor_isolation_multiple_attr_2,none,
6004
- " %kind0 has multiple actor-isolation attributes ('%1' and '%2' )" ,
6005
- (const Decl *, StringRef, StringRef ))
6008
+ " %kind0 has multiple actor-isolation attributes (%1 and %2 )" ,
6009
+ (const Decl *, DeclAttribute, DeclAttribute ))
6006
6010
ERROR(actor_isolation_multiple_attr_3,none,
6007
- " %0 %1 has multiple actor-isolation attributes ('%2', '%3' and '%4' )" ,
6008
- (const Decl *, StringRef, StringRef, StringRef ))
6011
+ " %0 %1 has multiple actor-isolation attributes (%2, %3 and %4 )" ,
6012
+ (const Decl *, DeclAttribute, DeclAttribute, DeclAttribute ))
6009
6013
ERROR(actor_isolation_multiple_attr_4,none,
6010
- " %0 %1 has multiple actor-isolation attributes ('%2', '%3', '%4', and '%5')" ,
6011
- (const Decl *, StringRef, StringRef, StringRef, StringRef))
6014
+ " %0 %1 has multiple actor-isolation attributes (%2, %3, %4, and %5)" ,
6015
+ (const Decl *, DeclAttribute, DeclAttribute, DeclAttribute,
6016
+ DeclAttribute))
6012
6017
ERROR(actor_isolation_override_mismatch,none,
6013
6018
" %0 %kind1 has different actor isolation from %2 overridden declaration" ,
6014
6019
(ActorIsolation, const ValueDecl *, ActorIsolation))
0 commit comments