Skip to content

Commit 759a73e

Browse files
authored
Merge pull request swiftlang#31887 from gribozavr/regex-always-works
Remove support for a broken std::regex in libstdc++ 4.8
2 parents df95485 + b6d0ef5 commit 759a73e

23 files changed

+3
-69
lines changed

CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -560,9 +560,6 @@ if(XCODE)
560560
swift_common_xcode_cxx_config()
561561
endif()
562562

563-
include(SwiftCheckCXXNativeRegex)
564-
check_cxx_native_regex(SWIFT_HAVE_WORKING_STD_REGEX)
565-
566563
# If SWIFT_HOST_VARIANT_SDK not given, try to detect from the CMAKE_SYSTEM_NAME.
567564
if(SWIFT_HOST_VARIANT_SDK)
568565
set(SWIFT_HOST_VARIANT_SDK_default "${SWIFT_HOST_VARIANT_SDK}")

cmake/modules/SwiftCheckCXXNativeRegex.cmake

Lines changed: 0 additions & 32 deletions
This file was deleted.

include/swift/Config.h.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
#ifndef SWIFT_CONFIG_H
55
#define SWIFT_CONFIG_H
66

7-
#cmakedefine SWIFT_HAVE_WORKING_STD_REGEX 1
8-
97
#cmakedefine HAVE_WAIT4 1
108

119
#cmakedefine HAVE_PROC_PID_RUSAGE 1

lib/IDE/SyntaxModel.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,7 +1509,6 @@ bool ModelASTWalker::processComment(CharSourceRange Range) {
15091509
bool ModelASTWalker::findUrlStartingLoc(StringRef Text,
15101510
unsigned &Start,
15111511
std::regex &Regex) {
1512-
#ifdef SWIFT_HAVE_WORKING_STD_REGEX
15131512
static const auto MailToPosition = std::find(URLProtocols.begin(),
15141513
URLProtocols.end(),
15151514
"mailto");
@@ -1541,7 +1540,6 @@ bool ModelASTWalker::findUrlStartingLoc(StringRef Text,
15411540
}
15421541
}
15431542
}
1544-
#endif
15451543
return false;
15461544
}
15471545

test/IDE/coloring_comments.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: %target-swift-ide-test -syntax-coloring -source-filename %s | %FileCheck %s
2-
// XFAIL: broken_std_regex
32

43
// CHECK: <comment-block>/* foo is the best */</comment-block>
54
/* foo is the best */

test/SourceKit/CodeComplete/complete_crash1.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// XFAIL: broken_std_regex
21
// RUN: %complete-test -tok=TOK1 -hide-none %s
32

43
import QuartzCore

test/SourceKit/CodeComplete/complete_filter.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ func foo() {
1111
x.#^FOO,,a,aa,ab,abc,abcd^#
1212
}
1313

14-
// XFAIL: broken_std_regex
1514
// RUN: %sourcekitd-test -req=complete.open -pos=11:5 %s -- %s > %t.all
1615
// RUN: %FileCheck -check-prefix=CHECK-ALL %s < %t.all
1716
// CHECK-ALL: key.name: "aaa

test/SourceKit/CodeComplete/complete_fuzzy.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ func footastic() {}
99

1010
// ===- Without a filter, we group.
1111

12-
// XFAIL: broken_std_regex
13-
1412
// RUN: %complete-test %s -group=stems -tok=TOP_LEVEL_NO_FILTER | %FileCheck %s -check-prefix=TOP_LEVEL_NO_FILTER
1513
// RUN: %complete-test %s -group=stems -fuzz -tok=TOP_LEVEL_NO_FILTER | %FileCheck %s -check-prefix=TOP_LEVEL_NO_FILTER
1614
func test1() {

test/SourceKit/CodeComplete/complete_group_overloads.swift

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// XFAIL: broken_std_regex
2-
31
struct A {}
42
struct B {}
53

test/SourceKit/CodeComplete/complete_import_module_flag.swift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// XFAIL: broken_std_regex
21
// RUN: %empty-directory(%t)
32
// RUN: %swift -Xcc -I%S/Inputs -emit-module -o %t/auxiliary_file.swiftmodule %S/Inputs/auxiliary_file.swift
43
// RUN: %complete-test -group=none -hide-none -raw -tok=TOP_LEVEL_0 %s -- -Xfrontend -import-module -Xfrontend auxiliary_file -I %t -I %S/Inputs | %FileCheck %s

0 commit comments

Comments
 (0)