@@ -763,9 +763,6 @@ ERROR(expr_selector_not_objc,none,
763
763
NOTE(make_decl_objc,none,
764
764
" add '@objc' to expose this %0 to Objective-C" ,
765
765
(DescriptiveDeclKind))
766
- NOTE(make_decl_objc_for_implementation,none,
767
- " add '@objc' to implement an Objective-C %0" ,
768
- (DescriptiveDeclKind))
769
766
770
767
// Selectors-as-string-literals.
771
768
WARNING(selector_literal_invalid,none,
@@ -1763,17 +1760,21 @@ WARNING(objc_implementation_early_spelling_deprecated,none,
1763
1760
ERROR(attr_objc_implementation_must_be_unconditional,none,
1764
1761
" only unconditional extensions can implement an Objective-C '@interface'" ,
1765
1762
())
1763
+ ERROR(attr_objc_implementation_must_extend_class,none,
1764
+ " cannot mark extension of %kind0 with '@_objcImplementation'; it is not "
1765
+ " an imported Objective-C class" ,
1766
+ (ValueDecl *))
1766
1767
ERROR(attr_objc_implementation_must_be_imported,none,
1767
- " '@objc @implementation ' cannot be used to extend %kind0 because it was "
1768
+ " '@_objcImplementation ' cannot be used to extend %kind0 because it was "
1768
1769
" defined by a Swift 'class' declaration, not an imported Objective-C "
1769
1770
" '@interface' declaration" ,
1770
1771
(ValueDecl *))
1771
1772
ERROR(attr_objc_implementation_must_have_super,none,
1772
- " '@objc @implementation ' cannot be used to implement root %kind0; "
1773
- " declare its superclass in the header" ,
1773
+ " '@_objcImplementation ' cannot be used to implement root %kind0; declare "
1774
+ " its superclass in the header" ,
1774
1775
(ValueDecl *))
1775
1776
ERROR(objc_implementation_cannot_have_generics,none,
1776
- " '@objc @implementation ' cannot be used to implement %kind0" ,
1777
+ " '@_objcImplementation ' cannot be used to implement %kind0" ,
1777
1778
(ValueDecl *))
1778
1779
ERROR(attr_objc_implementation_category_not_found,none,
1779
1780
" could not find category %0 on Objective-C class %1; make sure your "
@@ -1791,22 +1792,10 @@ ERROR(attr_objc_implementation_no_category_for_func,none,
1791
1792
" name from this attribute" ,
1792
1793
(ValueDecl*))
1793
1794
ERROR(attr_objc_implementation_no_conformance,none,
1794
- " '@objc @implementation ' extension cannot add conformance to %0; "
1795
+ " '@_objcImplementation ' extension cannot add conformance to %0; "
1795
1796
" add this conformance %select{with an ordinary extension|"
1796
1797
" in the Objective-C header}1" ,
1797
1798
(Type, bool ))
1798
- ERROR(attr_objc_implementation_raise_minimum_deployment_target,none,
1799
- " '@implementation' of an Objective-C class requires a minimum deployment "
1800
- " target of at least %0 %1" ,
1801
- (StringRef, llvm::VersionTuple))
1802
- ERROR(attr_implementation_requires_language,none,
1803
- " '@implementation' used without specifying the language being "
1804
- " implemented" ,
1805
- ())
1806
- ERROR(attr_implementation_category_goes_on_objc_attr,none,
1807
- " Objective-C category should be specified on '@objc', not "
1808
- " '@implementation'" ,
1809
- ())
1810
1799
1811
1800
ERROR(member_of_objc_implementation_not_objc_or_final,none,
1812
1801
" %kind0 does not match any %kindonly0 declared in the headers for %1; "
@@ -1919,7 +1908,7 @@ NOTE(objc_implementation_requirement_here,none,
1919
1908
(ValueDecl *))
1920
1909
1921
1910
ERROR(objc_implementation_init_must_be_convenience, none,
1922
- " %kind0 is not valid in an '@objc @implementation ' extension because "
1911
+ " %kind0 is not valid in an '@_objcImplementation ' extension because "
1923
1912
" Objective-C subclasses must be able to override "
1924
1913
" %select{designated|required}1 initializers" ,
1925
1914
(const ValueDecl *, /* isRequired=*/ bool ))
@@ -1933,7 +1922,7 @@ NOTE(objc_implementation_init_turn_required_to_convenience, none,
1933
1922
1934
1923
// Fallback diagnostic; super-general by nature.
1935
1924
ERROR(objc_implementation_member_requires_vtable, none,
1936
- " %kind0 is not valid in an '@objc @implementation ' extension because it "
1925
+ " %kind0 is not valid in an '@_objcImplementation ' extension because it "
1937
1926
" is an overridable Swift-only %kindonly0" ,
1938
1927
(const ValueDecl *))
1939
1928
@@ -6306,7 +6295,7 @@ ERROR(objc_extension_not_class,none,
6306
6295
" '@objc' can only be applied to an extension of a class" , ())
6307
6296
6308
6297
// If you change this, also change enum ObjCReason
6309
- #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}"
6298
+ #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 @_objcImplementation extension of a class (without final or @nonobjc)|marked @objc by an access note}"
6310
6299
6311
6300
ERROR (objc_invalid_on_var,none,
6312
6301
" property cannot be %" OBJC_ATTR_SELECT " 0 "
@@ -6461,12 +6450,6 @@ ERROR(objc_redecl_same,none,
6461
6450
" previous declaration with the same Objective-C selector" ,
6462
6451
(unsigned , DeclName, unsigned , DeclName, ObjCSelector))
6463
6452
6464
- ERROR(objc_redecl_category_name,none,
6465
- " %select{|imported }0extension with Objective-C category name %2 "
6466
- " conflicts with previous %select{|imported }1extension with the same "
6467
- " category name" ,
6468
- (bool , bool , Identifier))
6469
-
6470
6453
ERROR(objc_override_other,none,
6471
6454
OBJC_DIAG_SELECT " with Objective-C selector %4 conflicts with "
6472
6455
OBJC_DIAG_SELECT_2 " from superclass %5 with the same Objective-C "
0 commit comments