@@ -68,25 +68,7 @@ UNINTERESTING_FEATURE(ForwardTrailingClosures)
6868UNINTERESTING_FEATURE(StrictConcurrency)
6969UNINTERESTING_FEATURE(BareSlashRegexLiterals)
7070UNINTERESTING_FEATURE(DeprecateApplicationMain)
71-
72- static bool usesFeatureImportObjcForwardDeclarations(Decl *decl) {
73- ClangNode clangNode = decl->getClangNode ();
74- if (!clangNode)
75- return false ;
76-
77- const clang::Decl *clangDecl = clangNode.getAsDecl ();
78- if (!clangDecl)
79- return false ;
80-
81- if (auto objCInterfaceDecl = dyn_cast<clang::ObjCInterfaceDecl>(clangDecl))
82- return !objCInterfaceDecl->hasDefinition ();
83-
84- if (auto objCProtocolDecl = dyn_cast<clang::ObjCProtocolDecl>(clangDecl))
85- return !objCProtocolDecl->hasDefinition ();
86-
87- return false ;
88- }
89-
71+ UNINTERESTING_FEATURE(ImportObjcForwardDeclarations)
9072UNINTERESTING_FEATURE(DisableOutwardActorInference)
9173UNINTERESTING_FEATURE(InternalImportsByDefault)
9274UNINTERESTING_FEATURE(IsolatedDefaultValues)
@@ -103,53 +85,19 @@ UNINTERESTING_FEATURE(ImplicitOpenExistentials)
10385UNINTERESTING_FEATURE(StaticAssert)
10486UNINTERESTING_FEATURE(NamedOpaqueTypes)
10587UNINTERESTING_FEATURE(FlowSensitiveConcurrencyCaptures)
106-
107- static bool usesFeatureCodeItemMacros(Decl *decl) {
108- auto macro = dyn_cast<MacroDecl>(decl);
109- if (!macro)
110- return false ;
111-
112- return macro->getMacroRoles ().contains (MacroRole::CodeItem);
113- }
114-
88+ UNINTERESTING_FEATURE(CodeItemMacros)
11589UNINTERESTING_FEATURE(PreambleMacros)
11690UNINTERESTING_FEATURE(TupleConformances)
117-
118- static bool usesFeatureSymbolLinkageMarkers(Decl *decl) {
119- auto &attrs = decl->getAttrs ();
120- return std::any_of (attrs.begin (), attrs.end (), [](auto *attr) {
121- if (isa<UsedAttr>(attr))
122- return true ;
123- if (isa<SectionAttr>(attr))
124- return true ;
125- return false ;
126- });
127- }
128-
91+ UNINTERESTING_FEATURE(SymbolLinkageMarkers)
12992UNINTERESTING_FEATURE(LazyImmediate)
13093UNINTERESTING_FEATURE(MoveOnlyClasses)
131-
132- static bool usesFeatureNoImplicitCopy(Decl *decl) {
133- return decl->isNoImplicitCopy ();
134- }
135-
94+ UNINTERESTING_FEATURE(NoImplicitCopy)
13695UNINTERESTING_FEATURE(OldOwnershipOperatorSpellings)
13796UNINTERESTING_FEATURE(MoveOnlyEnumDeinits)
13897UNINTERESTING_FEATURE(MoveOnlyTuples)
13998UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
140-
14199UNINTERESTING_FEATURE(OneWayClosureParameters)
142-
143- static bool usesFeatureLayoutPrespecialization(Decl *decl) {
144- auto &attrs = decl->getAttrs ();
145- return std::any_of (attrs.begin (), attrs.end (), [](auto *attr) {
146- if (auto *specialize = dyn_cast<SpecializeAttr>(attr)) {
147- return !specialize->getTypeErasedParams ().empty ();
148- }
149- return false ;
150- });
151- }
152-
100+ UNINTERESTING_FEATURE(LayoutPrespecialization)
153101UNINTERESTING_FEATURE(AccessLevelOnImport)
154102UNINTERESTING_FEATURE(AllowNonResilientAccessInPackage)
155103UNINTERESTING_FEATURE(ClientBypassResilientAccessInPackage)
@@ -169,65 +117,21 @@ UNINTERESTING_FEATURE(ParserASTGen)
169117UNINTERESTING_FEATURE(BuiltinMacros)
170118UNINTERESTING_FEATURE(ImportSymbolicCXXDecls)
171119UNINTERESTING_FEATURE(GenerateBindingsForThrowingFunctionsInCXX)
172-
173- static bool usesFeatureReferenceBindings(Decl *decl) {
174- auto *vd = dyn_cast<VarDecl>(decl);
175- return vd && vd->getIntroducer () == VarDecl::Introducer::InOut;
176- }
177-
120+ UNINTERESTING_FEATURE(ReferenceBindings)
178121UNINTERESTING_FEATURE(BuiltinModule)
179122UNINTERESTING_FEATURE(RegionBasedIsolation)
180123UNINTERESTING_FEATURE(PlaygroundExtendedCallbacks)
181124UNINTERESTING_FEATURE(ThenStatements)
182125UNINTERESTING_FEATURE(DoExpressions)
183126UNINTERESTING_FEATURE(ImplicitLastExprResults)
184-
185- static bool usesFeatureRawLayout(Decl *decl) {
186- return decl->getAttrs ().hasAttribute <RawLayoutAttr>();
187- }
188-
127+ UNINTERESTING_FEATURE(RawLayout)
189128UNINTERESTING_FEATURE(Embedded)
190129UNINTERESTING_FEATURE(Volatile)
191130UNINTERESTING_FEATURE(SuppressedAssociatedTypes)
192-
193- static bool disallowFeatureSuppression(StringRef featureName, Decl *decl);
194-
195- static bool usesFeatureStructLetDestructuring (Decl *decl) {
196- auto sd = dyn_cast<StructDecl>(decl);
197- if (!sd)
198- return false ;
199-
200- for (auto member : sd->getStoredProperties ()) {
201- if (!member->isLet ())
202- continue ;
203-
204- auto init = member->getParentPattern ();
205- if (!init)
206- continue ;
207-
208- if (!init->getSingleVar ())
209- return true ;
210- }
211-
212- return false ;
213- }
214-
215- static bool usesFeatureNonescapableTypes (Decl *decl) {
216- if (decl->getAttrs ().hasAttribute <NonEscapableAttr>() ||
217- decl->getAttrs ().hasAttribute <UnsafeNonEscapableResultAttr>()) {
218- return true ;
219- }
220- return false ;
221- }
222-
223- static bool usesFeatureStaticExclusiveOnly (Decl *decl) {
224- return decl->getAttrs ().hasAttribute <StaticExclusiveOnlyAttr>();
225- }
226-
227- static bool usesFeatureExtractConstantsFromMembers (Decl *decl) {
228- return decl->getAttrs ().hasAttribute <ExtractConstantsFromMembersAttr>();
229- }
230-
131+ UNINTERESTING_FEATURE(StructLetDestructuring)
132+ UNINTERESTING_FEATURE(NonescapableTypes)
133+ UNINTERESTING_FEATURE(StaticExclusiveOnly)
134+ UNINTERESTING_FEATURE(ExtractConstantsFromMembers)
231135UNINTERESTING_FEATURE(FixedArrays)
232136UNINTERESTING_FEATURE(GroupActorErrors)
233137
@@ -282,9 +186,7 @@ static bool usesFeatureSendingArgsAndResults(Decl *decl) {
282186}
283187
284188UNINTERESTING_FEATURE (DynamicActorIsolation)
285-
286189UNINTERESTING_FEATURE(NonfrozenEnumExhaustivity)
287-
288190UNINTERESTING_FEATURE(ClosureIsolation)
289191
290192static bool usesFeatureBitwiseCopyable2(Decl *decl) {
@@ -311,19 +213,11 @@ static bool usesFeatureIsolatedAny(Decl *decl) {
311213
312214UNINTERESTING_FEATURE (MemberImportVisibility)
313215UNINTERESTING_FEATURE(IsolatedAny2)
314-
315- static bool usesFeatureGlobalActorIsolatedTypesUsability(Decl *decl) {
316- return false ;
317- }
318-
216+ UNINTERESTING_FEATURE(GlobalActorIsolatedTypesUsability)
319217UNINTERESTING_FEATURE(ObjCImplementation)
320218UNINTERESTING_FEATURE(ObjCImplementationWithResilientStorage)
321219UNINTERESTING_FEATURE(CImplementation)
322-
323- static bool usesFeatureSensitive(Decl *decl) {
324- return decl->getAttrs ().hasAttribute <SensitiveAttr>();
325- }
326-
220+ UNINTERESTING_FEATURE(Sensitive)
327221UNINTERESTING_FEATURE(DebugDescriptionMacro)
328222UNINTERESTING_FEATURE(ReinitializeConsumeInMultiBlockDefer)
329223UNINTERESTING_FEATURE(SE427NoInferenceOnExtension)
0 commit comments