[NFC] Split DeclAttrOptions into two types

We’re running out of bits in DeclAttrOptions, so split it in two: DeclAttrRequirements contains all the `On*` options that describe the declarations allowed to have the attribute, while the other options are now DeclAttrBehaviors.

This commit also sorts the entries in DeclAttr.def by serialization code and improves the formatting of the file.
This commit is contained in:
Becca Royal-Gordon
2025-03-07 20:17:44 -08:00
parent 1a08018985
commit 7c867ca1da
8 changed files with 798 additions and 468 deletions

View File

@@ -141,7 +141,7 @@ SymbolGraph::getSubHeadingDeclarationFragmentsPrintOptions() const {
Options.PrintOverrideKeyword = false;
Options.PrintGenericRequirements = false;
#define DECL_ATTR(SPELLING, CLASS, OPTIONS, CODE) \
#define DECL_ATTR(SPELLING, CLASS, ...) \
Options.ExcludeAttrList.push_back(DeclAttrKind::CLASS);
#define TYPE_ATTR(X, C) Options.ExcludeAttrList.push_back(TypeAttrKind::C);
#include "swift/AST/DeclAttr.def"