mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
This allows building sourcekitd and swift-refactor with `SWIFT_BUILD_SWIFT_SYNTAX=NO`. In these builds, the `relatedidents` and `find-syntactic-rename-ranges` requests will always return an error.
15 lines
284 B
Swift
15 lines
284 B
Swift
// REQUIRES: swift_swift_parser
|
|
// RUN: %sourcekitd-test -req=related-idents -pos=%(line + 1):10 %s -- %s | %FileCheck %s
|
|
func foo(x: Int) {
|
|
#if true
|
|
print(x)
|
|
#else
|
|
print(x)
|
|
#endif
|
|
}
|
|
|
|
// CHECK: START RANGES
|
|
// CHECK-NEXT: 3:10 - 1
|
|
// CHECK-NEXT: 5:9 - 1
|
|
// CHECK-NEXT: END RANGES
|