Skip to content

Commit 1a94180

Browse files
authored
Merge pull request #64817 from hamishknight/enable-regex-for-real
2 parents 3d9a79e + af7134b commit 1a94180

File tree

10 files changed

+5
-37
lines changed

10 files changed

+5
-37
lines changed

include/swift/Basic/LangOptions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ namespace swift {
182182
version::Version PackageDescriptionVersion;
183183

184184
/// Enable experimental string processing
185-
bool EnableExperimentalStringProcessing = false;
185+
bool EnableExperimentalStringProcessing = true;
186186

187187
/// Disable API availability checking.
188188
bool DisableAvailabilityChecking = false;

lib/Frontend/CompilerInvocation.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -542,8 +542,6 @@ static bool ParseLangArgs(LangOptions &Opts, ArgList &Args,
542542
// forward slash regex `/.../`.
543543
if (!Opts.EnableExperimentalStringProcessing)
544544
Opts.EnableBareSlashRegexLiterals = false;
545-
} else {
546-
Opts.EnableExperimentalStringProcessing = true;
547545
}
548546

549547
Opts.DisableAvailabilityChecking |=

test/IDE/complete_from_stdlib.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: %empty-directory(%t)
2-
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
2+
// RUN: %target-swift-ide-test -disable-implicit-concurrency-module-import -disable-implicit-string-processing-module-import -batch-code-completion -source-filename %s -filecheck %raw-FileCheck -completion-output-dir %t
33

44
// NO_STDLIB_PRIVATE-NOT: Decl{{[^:]*}}/IsSystem: _
55

test/StringProcessing/Parse/forward-slash-regex-disabled.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing -disable-availability-checking
1+
// RUN: %target-typecheck-verify-swift -disable-availability-checking
22

33
// REQUIRES: swift_in_compiler
44

test/StringProcessing/Sema/string_processing_import.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %target-typecheck-verify-swift -enable-experimental-string-processing -disable-implicit-string-processing-module-import -disable-availability-checking
1+
// RUN: %target-typecheck-verify-swift -disable-implicit-string-processing-module-import -disable-availability-checking
22
// REQUIRES: swift_in_compiler
33

44
// expected-error @+1 {{missing 'Regex' declaration, probably because the '_StringProcessing' module was not imported properly}}

test/StringProcessing/Sema/string_processing_module_shadowing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// RUN: %empty-directory(%t)
22
// RUN: %target-swift-frontend -emit-module -emit-module-path %t/ShadowsStringProcessing.swiftmodule -module-name ShadowsStringProcessing %S/Inputs/ShadowsStringProcessing.swift -disable-availability-checking
3-
// RUN: %target-typecheck-verify-swift -I %t -enable-experimental-string-processing -disable-availability-checking
3+
// RUN: %target-typecheck-verify-swift -I %t -disable-availability-checking
44

55
import ShadowsStringProcessing
66

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

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -834,11 +834,6 @@ EnableExperimentalDistributed("enable-experimental-distributed",
834834
llvm::cl::desc("Enable experimental distributed actors and functions"),
835835
llvm::cl::init(false));
836836

837-
static llvm::cl::opt<bool> EnableExperimentalStringProcessing(
838-
"enable-experimental-string-processing",
839-
llvm::cl::desc("Enable experimental string processing"),
840-
llvm::cl::init(false));
841-
842837
static llvm::cl::opt<bool> EnableBareSlashRegexLiterals(
843838
"enable-bare-slash-regex",
844839
llvm::cl::desc("Enable the ability to write '/.../' regex literals"),
@@ -4375,9 +4370,6 @@ int main(int argc, char *argv[]) {
43754370
if (options::EnableExperimentalNamedOpaqueTypes) {
43764371
InitInvok.getLangOptions().Features.insert(Feature::NamedOpaqueTypes);
43774372
}
4378-
if (options::EnableExperimentalStringProcessing) {
4379-
InitInvok.getLangOptions().EnableExperimentalStringProcessing = true;
4380-
}
43814373
if (options::EnableBareSlashRegexLiterals) {
43824374
InitInvok.getLangOptions().Features.insert(Feature::BareSlashRegexLiterals);
43834375
InitInvok.getLangOptions().EnableExperimentalStringProcessing = true;

tools/swift-refactor/swift-refactor.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -129,10 +129,6 @@ static llvm::cl::opt<bool> EnableExperimentalConcurrency(
129129
"enable-experimental-concurrency",
130130
llvm::cl::desc("Whether to enable experimental concurrency or not"));
131131

132-
static llvm::cl::opt<bool> EnableExperimentalStringProcessing(
133-
"enable-experimental-string-processing",
134-
llvm::cl::desc("Whether to enable experimental string processing or not"));
135-
136132
static llvm::cl::opt<std::string>
137133
SDK("sdk", llvm::cl::desc("Path to the SDK to build against"));
138134

@@ -316,9 +312,6 @@ int main(int argc, char *argv[]) {
316312
if (options::EnableExperimentalConcurrency)
317313
Invocation.getLangOptions().EnableExperimentalConcurrency = true;
318314

319-
if (options::EnableExperimentalStringProcessing)
320-
Invocation.getLangOptions().EnableExperimentalStringProcessing = true;
321-
322315
for (auto FileName : options::InputFilenames)
323316
Invocation.getFrontendOptions().InputsAndOutputs.addInputFile(FileName);
324317
Invocation.setModuleName(options::ModuleName);

utils/refactor-check-compiles.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ def parse_args():
3131
- swift-refactor
3232
- temp-dir
3333
- enable-experimental-concurrency (sent to both)
34-
- enable-experimental-string-processing (sent to both)
3534
- I (sent to both)
3635
- sdk (sent to both)
3736
- target (sent to both)
@@ -73,14 +72,6 @@ def parse_args():
7372
swift-frontend
7473
'''
7574
)
76-
parser.add_argument(
77-
'-enable-experimental-string-processing',
78-
action='store_true',
79-
help='''
80-
Whether to enable experimental string processing in both swift-refactor
81-
and swift-frontend
82-
'''
83-
)
8475
parser.add_argument(
8576
'-I',
8677
action='append',
@@ -110,8 +101,6 @@ def main():
110101
extra_both_args = []
111102
if args.enable_experimental_concurrency:
112103
extra_both_args.append('-enable-experimental-concurrency')
113-
if args.enable_experimental_string_processing:
114-
extra_both_args.append('-enable-experimental-string-processing')
115104
if args.I:
116105
for path in args.I:
117106
extra_both_args += ['-I', path]

utils/swift-api-dump.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,6 @@ def create_parser():
104104
help='Enable experimental concurrency model.')
105105
parser.add_argument('--enable-experimental-distributed', action='store_true',
106106
help='Enable experimental distributed actors.')
107-
parser.add_argument('--enable-experimental-string-processing', action='store_true',
108-
help='Enable experimental string processing.')
109107
parser.add_argument('--enable-experimental-observation', action='store_true',
110108
help='Enable experimental observation.')
111109
parser.add_argument('-swift-version', metavar='N',
@@ -335,8 +333,6 @@ def main():
335333
extra_args = ['-skip-imports']
336334
if args.enable_experimental_concurrency:
337335
extra_args = extra_args + ['-enable-experimental-concurrency']
338-
if args.enable_experimental_string_processing:
339-
extra_args = extra_args + ['-enable-experimental-string-processing']
340336
if args.swift_version:
341337
extra_args = extra_args + ['-swift-version', '%s' % args.swift_version]
342338

0 commit comments

Comments
 (0)