File tree Expand file tree Collapse file tree 6 files changed +16
-8
lines changed
test/Macros/PointerBounds Expand file tree Collapse file tree 6 files changed +16
-8
lines changed Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
- // XFAIL: OS=windows-msvc
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
3
+ // REQUIRES: swift_feature_Span
4
+
5
+ // RUN: not %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span > %t.log 2>&1
6
+ // RUN: %FileCheck --match-full-lines %s < %t.log
5
7
6
8
@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
7
9
func myFunc( _ ptr: UnsafeMutablePointer < CInt > , _ len: CInt ) {
Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
+ // REQUIRES: swift_feature_Span
3
4
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
5
+ // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span 2>&1 | %FileCheck --match-full-lines %s
5
6
6
7
@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
7
8
func myFunc( _ ptr: UnsafePointer < CInt > , _ len: CInt ) {
Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
+ // REQUIRES: swift_feature_Span
3
4
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
5
+ // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span 2>&1 | %FileCheck --match-full-lines %s
5
6
6
7
@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
7
8
func myFunc( _ ptr: UnsafePointer < CInt > , _ len: CInt ) -> CInt {
Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
- // XFAIL: OS=windows-msvc
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
3
+ // REQUIRES: swift_feature_Span
4
+
5
+ // RUN: not %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span > %t.log 2>&1
6
+ // RUN: %FileCheck --match-full-lines %s < %t.log
5
7
6
8
@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
7
9
func myFunc( _ ptr: UnsafeMutableRawPointer , _ size: CInt ) {
Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
+ // REQUIRES: swift_feature_Span
3
4
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
5
+ // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span 2>&1 | %FileCheck --match-full-lines %s
5
6
6
7
@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
7
8
func myFunc( _ ptr: UnsafeRawPointer , _ size: CInt ) {
Original file line number Diff line number Diff line change 1
1
// REQUIRES: swift_swift_parser
2
2
// REQUIRES: pointer_bounds
3
+ // REQUIRES: swift_feature_Span
3
4
4
- // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions 2>&1 | %FileCheck --match-full-lines %s
5
+ // RUN: %target-swift-frontend %s -swift-version 5 -module-name main -disable-availability-checking -typecheck -plugin-path %swift-plugin-dir -dump-macro-expansions -enable-experimental-feature Span 2>&1 | %FileCheck --match-full-lines %s
5
6
6
7
@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
7
8
func myFunc( _ ptr: UnsafeRawPointer , _ size: CInt ) -> CInt {
You can’t perform that action at this time.
0 commit comments