mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
ABIChecker: don't diagnose missing availability attribute for decls where the attribute doesn't apply
rdar://62990671
This commit is contained in:
@@ -1145,6 +1145,8 @@ public:
|
||||
// Decls with @_alwaysEmitIntoClient aren't required to have an
|
||||
// @available attribute.
|
||||
if (!Ctx.getOpts().SkipOSCheck &&
|
||||
DeclAttribute::canAttributeAppearOnDeclKind(DeclAttrKind::DAK_Available,
|
||||
D->getDeclKind()) &&
|
||||
!D->getIntroducingVersion().hasOSAvailability() &&
|
||||
!D->hasDeclAttribute(DeclAttrKind::DAK_AlwaysEmitIntoClient)) {
|
||||
D->emitDiag(D->getLoc(), diag::new_decl_without_intro);
|
||||
|
||||
Reference in New Issue
Block a user