[AST] Remove DeclAttrKind::Count

Introduce NumDeclAttrKinds for number of enum values. Use optional for
invalid attribute kind. This align with `TypeAttrKind`.
This commit is contained in:
Rintaro Ishizaki
2024-02-02 08:48:32 -08:00
parent 8fdc4cc225
commit 92e70ef80a
12 changed files with 68 additions and 88 deletions

View File

@@ -849,8 +849,6 @@ SwiftLangSupport::getUIDForDeclAttribute(const swift::DeclAttribute *Attr) {
}
switch (Attr->getKind()) {
case DeclAttrKind::Count:
break;
#define DECL_ATTR(X, CLASS, ...) \
case DeclAttrKind::CLASS: { \
static UIdent Attr_##X("source.decl.attribute." #X); \