@@ -2051,17 +2051,11 @@ WARNING(wrap_objc_implementation_will_become_error,none,
2051
2051
(DiagnosticInfo *))
2052
2052
2053
2053
ERROR(cdecl_not_at_top_level,none,
2054
- " %0 can only be applied to global functions" , (DeclAttribute ))
2054
+ " @_cdecl can only be applied to global functions" , ())
2055
2055
ERROR(cdecl_empty_name,none,
2056
- " %0 symbol name cannot be empty" , (DeclAttribute ))
2056
+ " @_cdecl symbol name cannot be empty" , ())
2057
2057
ERROR(cdecl_throws,none,
2058
- " raising errors from %0 functions is not supported" , (DeclAttribute))
2059
- ERROR(cdecl_incompatible_with_objc,none,
2060
- " cannot apply both '@cdecl' and '@objc' to %kindonly0" ,
2061
- (const Decl *))
2062
- ERROR(cdecl_feature_required,none,
2063
- " @cdecl requires '-enable-experimental-feature CDecl'" ,
2064
- ())
2058
+ " raising errors from '@_cdecl' functions is not supported" , ())
2065
2059
2066
2060
// @_used and @_section
2067
2061
ERROR(section_linkage_markers_disabled,none,
@@ -3742,9 +3736,9 @@ ERROR(enum_with_raw_type_case_with_argument,none,
3742
3736
NOTE(enum_raw_type_here,none,
3743
3737
" declared raw type %0 here" , (Type))
3744
3738
ERROR(objc_enum_no_raw_type,none,
3745
- " '%0 ' enum must declare an integer raw type" , (DeclAttribute ))
3739
+ " '@objc ' enum must declare an integer raw type" , ())
3746
3740
ERROR(objc_enum_raw_type_not_integer,none,
3747
- " '%0 ' enum raw type %1 is not an integer type" , (DeclAttribute, Type))
3741
+ " '@objc ' enum raw type %0 is not an integer type" , (Type))
3748
3742
ERROR(enum_non_integer_raw_value_auto_increment,none,
3749
3743
" enum case must declare a raw value when the preceding raw value is not an integer" , ())
3750
3744
ERROR(enum_non_integer_convertible_raw_type_no_value,none,
@@ -5519,14 +5513,10 @@ FIXIT(insert_globalactor_attr, "@%0 ", (Type))
5519
5513
ERROR(main_function_must_be_mainActor,none,
5520
5514
" main() must be '@MainActor'" , ())
5521
5515
5522
- // Keep aligned with enum ForeignLanguage
5523
- #define FOREIGN_LANG_SELECT " select{C|Objective-C}"
5524
-
5525
5516
ERROR(not_objc_function_async,none,
5526
5517
" 'async' %0 cannot be represented in Objective-C" , (DescriptiveDeclKind))
5527
5518
NOTE(not_objc_function_type_async,none,
5528
- " 'async' function types cannot be represented "
5529
- " in %" FOREIGN_LANG_SELECT " 0" , (ForeignLanguage))
5519
+ " 'async' function types cannot be represented in Objective-C" , ())
5530
5520
ERROR(actor_isolated_objc,none,
5531
5521
" actor-isolated %kind0 cannot be '@objc'" ,
5532
5522
(const ValueDecl *))
@@ -6533,7 +6523,7 @@ ERROR(objc_cannot_infer_name_raw_identifier,none,
6533
6523
(DescriptiveDeclKind))
6534
6524
6535
6525
// If you change this, also change enum ObjCReason
6536
- #define OBJC_ATTR_SELECT " select{marked '@cdecl'|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}"
6526
+ #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}"
6537
6527
6538
6528
ERROR (objc_invalid_on_var,none,
6539
6529
" property cannot be %" OBJC_ATTR_SELECT " 0 "
@@ -6566,36 +6556,25 @@ NOTE(not_objc_error_protocol_composition,none,
6566
6556
" protocol-constrained type containing 'Error' cannot be represented "
6567
6557
" in Objective-C" , ())
6568
6558
NOTE(not_objc_empty_tuple,none,
6569
- " empty tuple type cannot be represented in %" FOREIGN_LANG_SELECT " 0" ,
6570
- (ForeignLanguage))
6559
+ " empty tuple type cannot be represented in Objective-C" , ())
6571
6560
NOTE(not_objc_non_trivial_cxx_class,none,
6572
- " non-trivial C++ classes cannot be represented in "
6573
- " %" FOREIGN_LANG_SELECT " 0" ,
6574
- (ForeignLanguage))
6561
+ " non-trivial C++ classes cannot be represented in Objective-C" , ())
6575
6562
NOTE(not_objc_tuple,none,
6576
- " tuples cannot be represented in %" FOREIGN_LANG_SELECT " 0" ,
6577
- (ForeignLanguage))
6563
+ " tuples cannot be represented in Objective-C" , ())
6578
6564
NOTE(not_objc_swift_class,none,
6579
6565
" classes not annotated with '@objc' cannot be represented "
6580
6566
" in Objective-C" , ())
6581
6567
NOTE(not_objc_swift_struct,none,
6582
- " Swift structs cannot be represented in %" FOREIGN_LANG_SELECT " 0" ,
6583
- (ForeignLanguage))
6568
+ " Swift structs cannot be represented in Objective-C" , ())
6584
6569
NOTE(not_objc_swift_enum,none,
6585
6570
" non-'@objc' enums cannot be represented in Objective-C" , ())
6586
- NOTE(not_cdecl_or_objc_swift_enum,none,
6587
- " Swift enums not marked '@cdecl'%select{| or '@objc'}0 cannot be "
6588
- " represented in %" FOREIGN_LANG_SELECT " 0" ,
6589
- (ForeignLanguage))
6590
6571
NOTE(not_objc_generic_type_param,none,
6591
- " generic type parameters cannot be represented in "
6592
- " %" FOREIGN_LANG_SELECT " 0" , (ForeignLanguage))
6572
+ " generic type parameters cannot be represented in Objective-C" , ())
6593
6573
NOTE(not_objc_function_type_param,none,
6594
- " function types cannot be represented in % " FOREIGN_LANG_SELECT " 0 "
6595
- " unless their parameters and returns can be" , (ForeignLanguage ))
6574
+ " function types cannot be represented in Objective-C unless their "
6575
+ " parameters and returns can be" , ())
6596
6576
NOTE(not_objc_function_type_throwing,none,
6597
- " throwing function types cannot be represented in "
6598
- " %" FOREIGN_LANG_SELECT " 0" , (ForeignLanguage))
6577
+ " throwing function types cannot be represented in Objective-C" , ())
6599
6578
NOTE(objc_inferring_on_objc_protocol_member,none,
6600
6579
" inferring '@objc' because the declaration is a member of "
6601
6580
" an '@objc' protocol" , ())
@@ -6605,11 +6584,6 @@ NOTE(objc_witness_objc_requirement,none,
6605
6584
" satisfying requirement for %kind0 in protocol %1" ,
6606
6585
(const ValueDecl *, const ProtocolDecl *))
6607
6586
6608
- NOTE(cdecl_incompatible_with_protocols,none,
6609
- " protocols cannot be represented in C" , ())
6610
- NOTE(cdecl_incompatible_with_classes,none,
6611
- " classes cannot be represented in C" , ())
6612
-
6613
6587
ERROR(no_opaque_return_type_of,none,
6614
6588
" unable to resolve type for _opaqueReturnTypeOf attribute" , ())
6615
6589
@@ -6622,24 +6596,20 @@ ERROR(objc_addressor, none,
6622
6596
ERROR(objc_coroutine_accessor, none,
6623
6597
" 'read' and 'modify' accessors are not allowed to be marked '@objc'" , ())
6624
6598
ERROR(objc_invalid_on_func_variadic,none,
6625
- " %kindonly0 cannot be %" OBJC_ATTR_SELECT " 1 because it has a variadic "
6626
- " parameter" , (const AbstractFunctionDecl*, unsigned ))
6599
+ " method cannot be %" OBJC_ATTR_SELECT " 0 because it has a variadic "
6600
+ " parameter" , (unsigned ))
6627
6601
ERROR(objc_invalid_on_func_inout,none,
6628
- " %kindonly0 cannot be %" OBJC_ATTR_SELECT " 1 because inout "
6629
- " parameters cannot be represented in %" FOREIGN_LANG_SELECT " 2" ,
6630
- (const AbstractFunctionDecl*, unsigned , ForeignLanguage))
6602
+ " method cannot be %" OBJC_ATTR_SELECT " 0 because inout "
6603
+ " parameters cannot be represented in Objective-C" , (unsigned ))
6631
6604
ERROR(objc_invalid_on_func_param_type,none,
6632
- " %kindonly0 cannot be %" OBJC_ATTR_SELECT " 2 because the type of the "
6633
- " parameter %1 cannot be represented in %" FOREIGN_LANG_SELECT " 3" ,
6634
- (const AbstractFunctionDecl*, unsigned , unsigned , ForeignLanguage))
6605
+ " method cannot be %" OBJC_ATTR_SELECT " 1 because the type of the "
6606
+ " parameter %0 cannot be represented in Objective-C" , (unsigned , unsigned ))
6635
6607
ERROR(objc_invalid_on_func_single_param_type,none,
6636
- " %kindonly0 cannot be %" OBJC_ATTR_SELECT " 1 because the type of the "
6637
- " parameter cannot be represented in %" FOREIGN_LANG_SELECT " 2" ,
6638
- (const AbstractFunctionDecl*, unsigned , ForeignLanguage))
6608
+ " method cannot be %" OBJC_ATTR_SELECT " 0 because the type of the "
6609
+ " parameter cannot be represented in Objective-C" , (unsigned ))
6639
6610
ERROR(objc_invalid_on_func_result_type,none,
6640
- " %kindonly0 cannot be %" OBJC_ATTR_SELECT " 1 because its result type "
6641
- " cannot be represented in %" FOREIGN_LANG_SELECT " 2" ,
6642
- (const AbstractFunctionDecl*, unsigned , ForeignLanguage))
6611
+ " method cannot be %" OBJC_ATTR_SELECT " 0 because its result type "
6612
+ " cannot be represented in Objective-C" , (unsigned ))
6643
6613
ERROR(objc_invalid_on_foreign_class,none,
6644
6614
" method cannot be %" OBJC_ATTR_SELECT " 0 because Core Foundation "
6645
6615
" types are not classes in Objective-C" , (unsigned ))
@@ -6765,7 +6735,6 @@ ERROR(nonobjc_not_allowed,none,
6765
6735
#undef OBJC_DIAG_SELECT_2
6766
6736
#undef OBJC_DIAG_SELECT
6767
6737
#undef OBJC_ATTR_SELECT
6768
- #undef FOREIGN_LANG_SELECT
6769
6738
6770
6739
// ------------------------------------------------------------------------------
6771
6740
// MARK: @exclusivity
0 commit comments