@@ -763,9 +763,6 @@ ERROR(expr_selector_not_objc,none,
763763NOTE(make_decl_objc,none,
764764 " add '@objc' to expose this %0 to Objective-C" ,
765765 (DescriptiveDeclKind))
766- NOTE(make_decl_objc_for_implementation,none,
767- " add '@objc' to implement an Objective-C %0" ,
768- (DescriptiveDeclKind))
769766
770767// Selectors-as-string-literals.
771768WARNING(selector_literal_invalid,none,
@@ -1763,17 +1760,21 @@ WARNING(objc_implementation_early_spelling_deprecated,none,
17631760ERROR(attr_objc_implementation_must_be_unconditional,none,
17641761 " only unconditional extensions can implement an Objective-C '@interface'" ,
17651762 ())
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 *))
17661767ERROR(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 "
17681769 " defined by a Swift 'class' declaration, not an imported Objective-C "
17691770 " '@interface' declaration" ,
17701771 (ValueDecl *))
17711772ERROR(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" ,
17741775 (ValueDecl *))
17751776ERROR(objc_implementation_cannot_have_generics,none,
1776- " '@objc @implementation ' cannot be used to implement %kind0" ,
1777+ " '@_objcImplementation ' cannot be used to implement %kind0" ,
17771778 (ValueDecl *))
17781779ERROR(attr_objc_implementation_category_not_found,none,
17791780 " 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,
17911792 " name from this attribute" ,
17921793 (ValueDecl*))
17931794ERROR(attr_objc_implementation_no_conformance,none,
1794- " '@objc @implementation ' extension cannot add conformance to %0; "
1795+ " '@_objcImplementation ' extension cannot add conformance to %0; "
17951796 " add this conformance %select{with an ordinary extension|"
17961797 " in the Objective-C header}1" ,
17971798 (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- ())
18101799
18111800ERROR(member_of_objc_implementation_not_objc_or_final,none,
18121801 " %kind0 does not match any %kindonly0 declared in the headers for %1; "
@@ -1919,7 +1908,7 @@ NOTE(objc_implementation_requirement_here,none,
19191908 (ValueDecl *))
19201909
19211910ERROR(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 "
19231912 " Objective-C subclasses must be able to override "
19241913 " %select{designated|required}1 initializers" ,
19251914 (const ValueDecl *, /* isRequired=*/ bool ))
@@ -1933,7 +1922,7 @@ NOTE(objc_implementation_init_turn_required_to_convenience, none,
19331922
19341923// Fallback diagnostic; super-general by nature.
19351924ERROR(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 "
19371926 " is an overridable Swift-only %kindonly0" ,
19381927 (const ValueDecl *))
19391928
@@ -6306,7 +6295,7 @@ ERROR(objc_extension_not_class,none,
63066295 " '@objc' can only be applied to an extension of a class" , ())
63076296
63086297// 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}"
63106299
63116300ERROR (objc_invalid_on_var,none,
63126301 " property cannot be %" OBJC_ATTR_SELECT " 0 "
@@ -6461,12 +6450,6 @@ ERROR(objc_redecl_same,none,
64616450 " previous declaration with the same Objective-C selector" ,
64626451 (unsigned , DeclName, unsigned , DeclName, ObjCSelector))
64636452
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-
64706453ERROR(objc_override_other,none,
64716454 OBJC_DIAG_SELECT " with Objective-C selector %4 conflicts with "
64726455 OBJC_DIAG_SELECT_2 " from superclass %5 with the same Objective-C "
0 commit comments