[AST] Use scoped enum for attribute kinds

Align with other kind enum e.g. DeclKind.
This commit is contained in:
Rintaro Ishizaki
2024-02-02 05:30:50 -08:00
parent 07bb0380a1
commit b839718351
39 changed files with 893 additions and 848 deletions

View File

@@ -563,7 +563,7 @@ static void diagnoseRemovedDecl(const SDKNodeDecl *D) {
// Don't complain about removing @_alwaysEmitIntoClient if we are checking ABI.
// We shouldn't include these decls in the ABI baseline file. This line is
// added so the checker is backward compatible.
if (D->hasDeclAttribute(DeclAttrKind::DAK_AlwaysEmitIntoClient))
if (D->hasDeclAttribute(DeclAttrKind::AlwaysEmitIntoClient))
return;
}
auto &Ctx = D->getSDKContext();
@@ -668,11 +668,11 @@ public:
// Decls with @_alwaysEmitIntoClient aren't required to have an
// @available attribute.
if (!Ctx.getOpts().SkipOSCheck &&
DeclAttribute::canAttributeAppearOnDeclKind(DeclAttrKind::DAK_Available,
DeclAttribute::canAttributeAppearOnDeclKind(DeclAttrKind::Available,
D->getDeclKind()) &&
!D->getIntroducingVersion().hasOSAvailability() &&
!D->hasDeclAttribute(DeclAttrKind::DAK_AlwaysEmitIntoClient) &&
!D->hasDeclAttribute(DeclAttrKind::DAK_Marker)) {
!D->hasDeclAttribute(DeclAttrKind::AlwaysEmitIntoClient) &&
!D->hasDeclAttribute(DeclAttrKind::Marker)) {
D->emitDiag(D->getLoc(), diag::new_decl_without_intro);
}
}