Skip to content

Commit 5292699

Browse files
committed
[AST] Drop ResultBuilderASTTransform feature flag
1 parent 3c90c89 commit 5292699

File tree

5 files changed

+3
-10
lines changed

5 files changed

+3
-10
lines changed

include/swift/Basic/Features.def

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,6 @@ LANGUAGE_FEATURE(BuiltinCopy, 0, "Builtin.copy()", true)
8484
LANGUAGE_FEATURE(BuiltinStackAlloc, 0, "Builtin.stackAlloc", true)
8585
LANGUAGE_FEATURE(BuiltinTaskRunInline, 0, "Builtin.taskRunInline", true)
8686
LANGUAGE_FEATURE(BuiltinUnprotectedAddressOf, 0, "Builtin.unprotectedAddressOf", true)
87-
LANGUAGE_FEATURE(ResultBuilderASTTransform, 0, "result builders as AST transform", true)
8887
SUPPRESSIBLE_LANGUAGE_FEATURE(SpecializeAttributeWithAvailability, 0, "@_specialize attribute with availability", true)
8988
LANGUAGE_FEATURE(BuiltinAssumeAlignment, 0, "Builtin.assumeAlignment", true)
9089
SUPPRESSIBLE_LANGUAGE_FEATURE(UnsafeInheritExecutor, 0, "@_unsafeInheritExecutor", true)

lib/AST/ASTPrinter.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3124,10 +3124,6 @@ static bool usesFeatureOneWayClosureParameters(Decl *decl) {
31243124
return false;
31253125
}
31263126

3127-
static bool usesFeatureResultBuilderASTTransform(Decl *decl) {
3128-
return false;
3129-
}
3130-
31313127
static bool usesFeatureTypeWitnessSystemInference(Decl *decl) {
31323128
return false;
31333129
}

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -708,8 +708,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
708708
if (Args.hasArg(OPT_enable_experimental_opaque_type_erasure))
709709
Opts.Features.insert(Feature::OpaqueTypeErasure);
710710

711-
Opts.Features.insert(Feature::ResultBuilderASTTransform);
712-
713711
Opts.EnableAppExtensionRestrictions |= Args.hasArg(OPT_enable_app_extension);
714712

715713
Opts.EnableSwift3ObjCInference =

lib/Sema/BuilderTransform.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2469,7 +2469,9 @@ ConstraintSystem::matchResultBuilder(AnyFunctionRef fn, Type builderType,
24692469
return None;
24702470
}
24712471

2472-
if (Context.LangOpts.hasFeature(Feature::ResultBuilderASTTransform)) {
2472+
auto disableASTTransform = [&](NominalTypeDecl *builder) { return false; };
2473+
2474+
if (!disableASTTransform(builder)) {
24732475
auto transformedBody = getBuilderTransformedBody(fn, builder);
24742476
// If this builder transform has not yet been applied to this function,
24752477
// let's do it and cache the result.

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4395,8 +4395,6 @@ int main(int argc, char *argv[]) {
43954395
options::ImportObjCHeader;
43964396
InitInvok.getClangImporterOptions().BridgingHeader =
43974397
options::ImportObjCHeader;
4398-
InitInvok.getLangOptions().Features.insert(
4399-
Feature::ResultBuilderASTTransform);
44004398
InitInvok.getLangOptions().EnableAccessControl =
44014399
!options::DisableAccessControl;
44024400
InitInvok.getLangOptions().EnableSwift3ObjCInference =

0 commit comments

Comments
 (0)