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.
13 lines
632 B
Swift
13 lines
632 B
Swift
// REQUIRES: swift_swift_parser
|
|
// RUN: %empty-directory(%t.ranges)
|
|
// RUN: %refactor -find-rename-ranges -source-filename %s -pos="test" -is-function-like -old-name "StringifyMacro" | %FileCheck %s
|
|
|
|
// CHECK: struct /*test:def*/<base>StringifyMacro</base> {}
|
|
// CHECK: @freestanding(expression)
|
|
// CHECK: macro stringify<T>(_ value: T) -> (T, String) = #externalMacro(module: "MyMacroMacros", type: "/*test:ref*/<base>StringifyMacro</base>")
|
|
|
|
struct /*test:def*/StringifyMacro {}
|
|
|
|
@freestanding(expression)
|
|
macro stringify<T>(_ value: T) -> (T, String) = #externalMacro(module: "MyMacroMacros", type: "/*test:ref*/StringifyMacro")
|