@@ -1599,26 +1599,12 @@ WARNING(option_set_zero_constant,none,
15991599NOTE(option_set_empty_set_init,none,
16001600 " use [] to silence this warning" , ())
16011601
1602- // FIXME(backDeploy): Refactor to share with back deployment attr
1603- ERROR(originally_defined_in_dupe_platform,none,
1604- " duplicate version number for platform %0" , (StringRef))
1605-
16061602ERROR(originally_definedin_topleve_decl,none,
16071603 " @%0 is only applicable to top-level decl" , (StringRef))
16081604
1609- // FIXME(backDeploy): Refactor to share with back deployment attr
1610- ERROR(originally_definedin_need_available,none,
1611- " need @available attribute for @%0" , (StringRef))
1612-
16131605ERROR(originally_definedin_must_not_before_available_version,none,
16141606 " symbols are moved to the current module before they were available in the OSs" , (StringRef))
16151607
1616- // FIXME(backDeploy): Refactor to share with back deployment attr
1617- WARNING(originally_defined_in_on_non_public,
1618- none, " @%0 does not have any effect on "
1619- " %select{private|fileprivate|internal|%error|%error}1 declarations" ,
1620- (StringRef, AccessLevel))
1621-
16221608// Alignment attribute
16231609ERROR(alignment_not_power_of_two,none,
16241610 " alignment value must be a power of two" , ())
@@ -3139,10 +3125,28 @@ ERROR(attr_not_on_variadic_parameters,none,
31393125 " '%0' must not be used on variadic parameters" , (StringRef))
31403126ERROR(attr_not_on_subscript_parameters,none,
31413127 " '%0' must not be used on subscript parameters" , (StringRef))
3128+ ERROR(attr_not_on_stored_properties,none,
3129+ " '%0' must not be used on stored properties" , (DeclAttribute))
3130+
3131+ WARNING(attr_has_no_effect_on_decl_with_access_level,none,
3132+ " '%0' does not have any effect on "
3133+ " %select{private|fileprivate|internal|%error|%error}1 declarations" ,
3134+ (DeclAttribute, AccessLevel))
3135+ ERROR(attr_not_on_decl_with_invalid_access_level,none,
3136+ " '%0' may not be used on "
3137+ " %select{private|fileprivate|internal|%error|%error}1 declarations" ,
3138+ (DeclAttribute, AccessLevel))
3139+
3140+ ERROR(attr_has_no_effect_decl_not_available_before,none,
3141+ " '%0' has no effect because %1 is not available before %2 %3" ,
3142+ (DeclAttribute, DeclName, StringRef, llvm::VersionTuple))
31423143
31433144ERROR(attr_ambiguous_reference_to_decl,none,
31443145 " ambiguous reference to %0 in '@%1' attribute" , (DeclNameRef, StringRef))
31453146
3147+ ERROR(attr_contains_multiple_versions_for_platform,none,
3148+ " '%0' contains multiple versions for %1" , (DeclAttribute, StringRef))
3149+
31463150ERROR(override_final,none,
31473151 " %0 overrides a 'final' %1" , (DescriptiveDeclKind, DescriptiveDeclKind))
31483152
@@ -3157,6 +3161,10 @@ ERROR(final_not_allowed_here,none,
31573161 " 'final' may only be applied to classes, properties, methods, and "
31583162 " subscripts" , ())
31593163
3164+ ERROR(attr_incompatible_with_non_final,none,
3165+ " '%0' cannot be applied to a non-final %1" ,
3166+ (DeclAttribute, DescriptiveDeclKind))
3167+
31603168ERROR(final_not_on_accessors,none,
31613169 " 'final' cannot be applied to accessors, it must be put on the "
31623170 " %select{var|let|subscript}0" , (unsigned ))
@@ -5615,6 +5623,14 @@ ERROR(availability_macro_in_inlinable, none,
56155623 " availability macro cannot be used in inlinable %0" ,
56165624 (DescriptiveDeclKind))
56175625
5626+ ERROR(attr_requires_decl_availability_for_platform,none,
5627+ " '%0' requires that %1 have explicit availability for %2" ,
5628+ (DeclAttribute, DeclName, StringRef))
5629+
5630+ ERROR(attr_requires_availability_for_platform,none,
5631+ " '%0' requires explicit availability for %1" ,
5632+ (DeclAttribute, StringRef))
5633+
56185634// This doesn't display as an availability diagnostic, but it's
56195635// implemented there and fires when these subscripts are marked
56205636// unavailable, so it seems appropriate to put it here.
@@ -6164,6 +6180,10 @@ ERROR(differentiable_programming_attr_used_without_required_module, none,
61646180 " '@%0' attribute used without importing module %1" ,
61656181 (StringRef, Identifier))
61666182
6183+ // ------------------------------------------------------------------------------
6184+ // MARK: OSLog
6185+ // ------------------------------------------------------------------------------
6186+
61676187ERROR(oslog_arg_must_be_bool_literal, none,
61686188 " argument must be a bool literal" , ())
61696189ERROR(oslog_arg_must_be_integer_literal, none,
@@ -6271,5 +6291,13 @@ ERROR(cannot_convert_default_value_type_to_argument_type, none,
62716291 " cannot convert default value of type %0 to expected argument type %1 for parameter #%2" ,
62726292 (Type, Type, unsigned ))
62736293
6294+ // ------------------------------------------------------------------------------
6295+ // MARK: Back deployment
6296+ // ------------------------------------------------------------------------------
6297+
6298+ ERROR(attr_incompatible_with_back_deploy,none,
6299+ " '%0' cannot be applied to a back deployed %1" ,
6300+ (DeclAttribute, DescriptiveDeclKind))
6301+
62746302#define UNDEFINE_DIAGNOSTIC_MACROS
62756303#include " DefineDiagnosticMacros.h"
0 commit comments