@@ -68,25 +68,7 @@ UNINTERESTING_FEATURE(ForwardTrailingClosures)
68
68
UNINTERESTING_FEATURE(StrictConcurrency)
69
69
UNINTERESTING_FEATURE(BareSlashRegexLiterals)
70
70
UNINTERESTING_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)
90
72
UNINTERESTING_FEATURE(DisableOutwardActorInference)
91
73
UNINTERESTING_FEATURE(InternalImportsByDefault)
92
74
UNINTERESTING_FEATURE(IsolatedDefaultValues)
@@ -103,53 +85,19 @@ UNINTERESTING_FEATURE(ImplicitOpenExistentials)
103
85
UNINTERESTING_FEATURE(StaticAssert)
104
86
UNINTERESTING_FEATURE(NamedOpaqueTypes)
105
87
UNINTERESTING_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)
115
89
UNINTERESTING_FEATURE(PreambleMacros)
116
90
UNINTERESTING_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)
129
92
UNINTERESTING_FEATURE(LazyImmediate)
130
93
UNINTERESTING_FEATURE(MoveOnlyClasses)
131
-
132
- static bool usesFeatureNoImplicitCopy(Decl *decl) {
133
- return decl->isNoImplicitCopy ();
134
- }
135
-
94
+ UNINTERESTING_FEATURE(NoImplicitCopy)
136
95
UNINTERESTING_FEATURE(OldOwnershipOperatorSpellings)
137
96
UNINTERESTING_FEATURE(MoveOnlyEnumDeinits)
138
97
UNINTERESTING_FEATURE(MoveOnlyTuples)
139
98
UNINTERESTING_FEATURE(MoveOnlyPartialReinitialization)
140
-
141
99
UNINTERESTING_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)
153
101
UNINTERESTING_FEATURE(AccessLevelOnImport)
154
102
UNINTERESTING_FEATURE(AllowNonResilientAccessInPackage)
155
103
UNINTERESTING_FEATURE(ClientBypassResilientAccessInPackage)
@@ -169,65 +117,21 @@ UNINTERESTING_FEATURE(ParserASTGen)
169
117
UNINTERESTING_FEATURE(BuiltinMacros)
170
118
UNINTERESTING_FEATURE(ImportSymbolicCXXDecls)
171
119
UNINTERESTING_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)
178
121
UNINTERESTING_FEATURE(BuiltinModule)
179
122
UNINTERESTING_FEATURE(RegionBasedIsolation)
180
123
UNINTERESTING_FEATURE(PlaygroundExtendedCallbacks)
181
124
UNINTERESTING_FEATURE(ThenStatements)
182
125
UNINTERESTING_FEATURE(DoExpressions)
183
126
UNINTERESTING_FEATURE(ImplicitLastExprResults)
184
-
185
- static bool usesFeatureRawLayout(Decl *decl) {
186
- return decl->getAttrs ().hasAttribute <RawLayoutAttr>();
187
- }
188
-
127
+ UNINTERESTING_FEATURE(RawLayout)
189
128
UNINTERESTING_FEATURE(Embedded)
190
129
UNINTERESTING_FEATURE(Volatile)
191
130
UNINTERESTING_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)
231
135
UNINTERESTING_FEATURE(FixedArrays)
232
136
UNINTERESTING_FEATURE(GroupActorErrors)
233
137
@@ -282,9 +186,7 @@ static bool usesFeatureSendingArgsAndResults(Decl *decl) {
282
186
}
283
187
284
188
UNINTERESTING_FEATURE (DynamicActorIsolation)
285
-
286
189
UNINTERESTING_FEATURE(NonfrozenEnumExhaustivity)
287
-
288
190
UNINTERESTING_FEATURE(ClosureIsolation)
289
191
290
192
static bool usesFeatureBitwiseCopyable2(Decl *decl) {
@@ -311,19 +213,11 @@ static bool usesFeatureIsolatedAny(Decl *decl) {
311
213
312
214
UNINTERESTING_FEATURE (MemberImportVisibility)
313
215
UNINTERESTING_FEATURE(IsolatedAny2)
314
-
315
- static bool usesFeatureGlobalActorIsolatedTypesUsability(Decl *decl) {
316
- return false ;
317
- }
318
-
216
+ UNINTERESTING_FEATURE(GlobalActorIsolatedTypesUsability)
319
217
UNINTERESTING_FEATURE(ObjCImplementation)
320
218
UNINTERESTING_FEATURE(ObjCImplementationWithResilientStorage)
321
219
UNINTERESTING_FEATURE(CImplementation)
322
-
323
- static bool usesFeatureSensitive(Decl *decl) {
324
- return decl->getAttrs ().hasAttribute <SensitiveAttr>();
325
- }
326
-
220
+ UNINTERESTING_FEATURE(Sensitive)
327
221
UNINTERESTING_FEATURE(DebugDescriptionMacro)
328
222
UNINTERESTING_FEATURE(ReinitializeConsumeInMultiBlockDefer)
329
223
UNINTERESTING_FEATURE(SE427NoInferenceOnExtension)
0 commit comments