Skip to content

Commit 365d26e

Browse files
committed
AST: Promote ExpressionMacroDefaultArguments feature to baseline.
1 parent ec13858 commit 365d26e

File tree

3 files changed

+2
-14
lines changed

3 files changed

+2
-14
lines changed

include/swift/Basic/Features.def

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ SUPPRESSIBLE_LANGUAGE_FEATURE(ExtensionMacroAttr, 0, "@attached(extension)")
186186
BASELINE_LANGUAGE_FEATURE(TypedThrows, 413, "Typed throws")
187187
CONDITIONALLY_SUPPRESSIBLE_LANGUAGE_FEATURE(OptionalIsolatedParameters, 420, "Optional isolated parameters")
188188
SUPPRESSIBLE_LANGUAGE_FEATURE(Extern, 0, "@_extern")
189-
LANGUAGE_FEATURE(ExpressionMacroDefaultArguments, 422, "Expression macro as caller-side default argument")
189+
BASELINE_LANGUAGE_FEATURE(ExpressionMacroDefaultArguments, 422, "Expression macro as caller-side default argument")
190190
LANGUAGE_FEATURE(BuiltinStoreRaw, 0, "Builtin.storeRaw")
191191
BASELINE_LANGUAGE_FEATURE(BuiltinCreateTask, 0, "Builtin.createTask and Builtin.createDiscardingTask")
192192
SUPPRESSIBLE_LANGUAGE_FEATURE(AssociatedTypeImplements, 0, "@_implements on associated types")

lib/AST/FeatureSet.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -179,18 +179,6 @@ static bool usesFeatureAssociatedTypeImplements(Decl *decl) {
179179
return isa<TypeDecl>(decl) && decl->getAttrs().hasAttribute<ImplementsAttr>();
180180
}
181181

182-
static bool usesFeatureExpressionMacroDefaultArguments(Decl *decl) {
183-
if (auto func = dyn_cast<AbstractFunctionDecl>(decl)) {
184-
for (auto param : *func->getParameters()) {
185-
if (param->getDefaultArgumentKind() ==
186-
DefaultArgumentKind::ExpressionMacro)
187-
return true;
188-
}
189-
}
190-
191-
return false;
192-
}
193-
194182
UNINTERESTING_FEATURE(BuiltinStoreRaw)
195183
UNINTERESTING_FEATURE(BuiltinAddressOfRawLayout)
196184

test/Concurrency/sending_conditional_suppression.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ public struct TestInStruct {
206206
// Make sure that we emit compiler(>= 5.3) when emitting the suppressing check
207207
// to make sure we do not fail if we fail to parse sending in the if block.
208208

209-
// CHECK-LABEL: #if compiler(>=5.3) && $OptionalIsolatedParameters && $ExpressionMacroDefaultArguments // Suppression Count: 24
209+
// CHECK-LABEL: #if compiler(>=5.3) && $OptionalIsolatedParameters // Suppression Count: 24
210210
// CHECK-NEXT: #if compiler(>=5.3) && $SendingArgsAndResults // Suppression Count: 25
211211
// CHECK-NEXT: @inlinable public func withCheckedContinuation<T>(isolation: isolated (any _Concurrency.Actor)? = #isolation, function: Swift.String = #function, _ body: (_Concurrency.CheckedContinuation<T, Swift.Never>) -> Swift.Void) async -> sending T {
212212
// CHECK-NEXT: fatalError()

0 commit comments

Comments
 (0)