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 11// REQUIRES: swift_swift_parser
22// 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
57
68@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
79func myFunc( _ ptr: UnsafeMutablePointer < CInt > , _ len: CInt ) {
Original file line number Diff line number Diff line change 11// REQUIRES: swift_swift_parser
22// REQUIRES: pointer_bounds
3+ // REQUIRES: swift_feature_Span
34
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
56
67@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
78func myFunc( _ ptr: UnsafePointer < CInt > , _ len: CInt ) {
Original file line number Diff line number Diff line change 11// REQUIRES: swift_swift_parser
22// REQUIRES: pointer_bounds
3+ // REQUIRES: swift_feature_Span
34
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
56
67@PointerBounds ( . countedBy( pointer: 1 , count: " len " ) , . nonescaping( pointer: 1 ) )
78func myFunc( _ ptr: UnsafePointer < CInt > , _ len: CInt ) -> CInt {
Original file line number Diff line number Diff line change 11// REQUIRES: swift_swift_parser
22// 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
57
68@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
79func myFunc( _ ptr: UnsafeMutableRawPointer , _ size: CInt ) {
Original file line number Diff line number Diff line change 11// REQUIRES: swift_swift_parser
22// REQUIRES: pointer_bounds
3+ // REQUIRES: swift_feature_Span
34
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
56
67@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
78func myFunc( _ ptr: UnsafeRawPointer , _ size: CInt ) {
Original file line number Diff line number Diff line change 11// REQUIRES: swift_swift_parser
22// REQUIRES: pointer_bounds
3+ // REQUIRES: swift_feature_Span
34
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
56
67@PointerBounds ( . sizedBy( pointer: 1 , size: " size " ) , . nonescaping( pointer: 1 ) )
78func myFunc( _ ptr: UnsafeRawPointer , _ size: CInt ) -> CInt {
You can’t perform that action at this time.
0 commit comments