@@ -184,8 +184,9 @@ class DeclAttribute : public AttributeBase {
184184 isUnchecked : 1
185185 );
186186
187- SWIFT_INLINE_BITFIELD (ObjCImplementationAttr, DeclAttribute, 1 ,
188- isCategoryNameInvalid : 1
187+ SWIFT_INLINE_BITFIELD (ObjCImplementationAttr, DeclAttribute, 2 ,
188+ isCategoryNameInvalid : 1 ,
189+ isEarlyAdopter : 1
189190 );
190191
191192 SWIFT_INLINE_BITFIELD (NonisolatedAttr, DeclAttribute, 1 ,
@@ -2424,11 +2425,19 @@ class ObjCImplementationAttr final : public DeclAttribute {
24242425 Identifier CategoryName;
24252426
24262427 ObjCImplementationAttr (Identifier CategoryName, SourceLoc AtLoc,
2427- SourceRange Range, bool Implicit = false ,
2428+ SourceRange Range, bool isEarlyAdopter = false ,
2429+ bool Implicit = false ,
24282430 bool isCategoryNameInvalid = false )
24292431 : DeclAttribute(DeclAttrKind::ObjCImplementation, AtLoc, Range, Implicit),
24302432 CategoryName (CategoryName) {
24312433 Bits.ObjCImplementationAttr .isCategoryNameInvalid = isCategoryNameInvalid;
2434+ Bits.ObjCImplementationAttr .isEarlyAdopter = isEarlyAdopter;
2435+ }
2436+
2437+ // / Early adopters use the \c \@_objcImplementation spelling. For backwards
2438+ // / compatibility, issues with them are diagnosed as warnings, not errors.
2439+ bool isEarlyAdopter () const {
2440+ return Bits.ObjCImplementationAttr .isEarlyAdopter ;
24322441 }
24332442
24342443 bool isCategoryNameInvalid () const {
0 commit comments