Skip to content

Commit 76aa3ed

Browse files
authored
Merge pull request #19061 from ahoppen/swiftsyntax-new-repo
[master] Move SwiftSyntax to its own repository
2 parents 2f6b4cd + 3709431 commit 76aa3ed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

62 files changed

+161
-5495
lines changed

test/CMakeLists.txt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ function(get_test_dependencies SDK result_var_name)
4444
sil-func-extractor sil-llvm-gen sil-nm sil-passpipeline-dumper
4545
lldb-moduleimport-test swift-reflection-dump swift-remoteast-test
4646
swift-api-digester swift-refactor swift-demangle-yamldump)
47-
if (TARGET swift-swiftsyntax-test)
48-
list(APPEND deps_binaries swift-swiftsyntax-test)
49-
endif()
5047
if(NOT SWIFT_BUILT_STANDALONE)
5148
list(APPEND deps_binaries FileCheck arcmt-test c-arcmt-test c-index-test
5249
clang llc llvm-cov llvm-dwarfdump llvm-link llvm-as llvm-dis

test/IDE/coloring.swift

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,11 @@
1-
// We need to require macOS because swiftSyntax currently doesn't build on Linux
2-
// REQUIRES: OS=macosx
31
// RUN: %target-swift-ide-test -syntax-coloring -source-filename %s | %FileCheck %s
4-
// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s -check-prefixes CHECK,CHECK-OLD
5-
// RUN: %swift-swiftsyntax-test -classify-syntax -source-file %s | %FileCheck %s --check-prefixes CHECK,CHECK-NEW
2+
// RUN: %target-swift-ide-test -syntax-coloring -typecheck -source-filename %s | %FileCheck %s
63
// XFAIL: broken_std_regex
74

85
enum List<T> {
96
case Nil
107
// rdar://21927124
11-
// CHECK-OLD: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(T, List)
12-
// CHECK-NEW: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(<type>T</type>, <type>List</type>)
8+
// CHECK: <attr-builtin>indirect</attr-builtin> <kw>case</kw> Cons(T, List)
139
indirect case Cons(T, List)
1410
}
1511

@@ -85,8 +81,7 @@ class Attributes {
8581
// CHECK: <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v0: <type>Int</type>
8682
@IBOutlet var v0: Int
8783

88-
// CHECK-OLD: <attr-builtin>@IBOutlet</attr-builtin> <attr-id>@IBOutlet</attr-id> <kw>var</kw> v1: <type>String</type>
89-
// CHECK-NEW: <attr-builtin>@IBOutlet</attr-builtin> <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v1: <type>String</type>
84+
// CHECK: <attr-builtin>@IBOutlet</attr-builtin> <attr-id>@IBOutlet</attr-id> <kw>var</kw> v1: <type>String</type>
9085
@IBOutlet @IBOutlet var v1: String
9186

9287
// CHECK: <attr-builtin>@objc</attr-builtin> <attr-builtin>@IBOutlet</attr-builtin> <kw>var</kw> v2: <type>String</type>
@@ -239,8 +234,7 @@ func f(x: Int) -> Int {
239234
)
240235
"""
241236

242-
// CHECK-OLD: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str>
243-
// CHECK-NEW: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str></str>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str>
237+
// CHECK: <str>"</str>\<anchor>(</anchor><int>1</int><anchor>)</anchor>\<anchor>(</anchor><int>1</int><anchor>)</anchor><str>"</str>
244238
"\(1)\(1)"
245239
}
246240

@@ -330,17 +324,13 @@ func funcTakingIn(in internalName: Int) {}
330324
_ = 123
331325
// CHECK: <int>123</int>
332326
_ = -123
333-
// CHECK-OLD: <int>-123</int>
334-
// CHECK-NEW: -<int>123</int>
327+
// CHECK: <int>-123</int>
335328
_ = -1
336-
// CHECK-OLD: <int>-1</int>
337-
// CHECK-NEW: -<int>1</int>
329+
// CHECK: <int>-1</int>
338330
_ = -0x123
339-
// CHECK-OLD: <int>-0x123</int>
340-
// CHECK-NEW: -<int>0x123</int>
331+
// CHECK: <int>-0x123</int>
341332
_ = -3.1e-5
342-
// CHECK-OLD: <float>-3.1e-5</float>
343-
// CHECK-NEW: <float>3.1e-5</float>
333+
// CHECK: <float>-3.1e-5</float>
344334
345335
"--\"\(x) --"
346336
// CHECK: <str>"--\"</str>\<anchor>(</anchor>x<anchor>)</anchor><str> --"</str>
@@ -397,15 +387,12 @@ class Ownership {
397387
weak var w
398388
// CHECK: <attr-builtin>unowned</attr-builtin> <kw>var</kw> u
399389
unowned var u
400-
// CHECK-OLD: <attr-builtin>unowned(unsafe)</attr-builtin> <kw>var</kw> uu
401-
// CHECK-NEW: <attr-builtin>unowned</attr-builtin>(unsafe) <kw>var</kw> uu
390+
// CHECK: <attr-builtin>unowned(unsafe)</attr-builtin> <kw>var</kw> uu
402391
unowned(unsafe) var uu
403392
}
404-
// CHECK-OLD: <kw>let</kw> closure = { [<attr-builtin>weak</attr-builtin> x=bindtox, <attr-builtin>unowned</attr-builtin> y=bindtoy, <attr-builtin>unowned(unsafe)</attr-builtin> z=bindtoz] <kw>in</kw> }
405-
// FIXME: CHECK-NEW: <kw>let</kw> closure = { [weak x=bindtox, unowned y=bindtoy, unowned(unsafe) z=bindtoz] <kw>in</kw> }
393+
// CHECK: <kw>let</kw> closure = { [<attr-builtin>weak</attr-builtin> x=bindtox, <attr-builtin>unowned</attr-builtin> y=bindtoy, <attr-builtin>unowned(unsafe)</attr-builtin> z=bindtoz] <kw>in</kw> }
406394
let closure = { [weak x=bindtox, unowned y=bindtoy, unowned(unsafe) z=bindtoz] in }
407395

408396
protocol FakeClassRestrictedProtocol : `class` {}
409-
// CHECK-OLD: <kw>protocol</kw> FakeClassRestrictedProtocol : <type>`class`</type> {}
397+
// CHECK: <kw>protocol</kw> FakeClassRestrictedProtocol : <type>`class`</type> {}
410398
// FIXME: rdar://42801404: OLD and NEW should be the same '<type>`class`</type>'.
411-
// CHECK-NEW: <kw>protocol</kw> FakeClassRestrictedProtocol : `<type>class</type>` {}

0 commit comments

Comments
 (0)