[AST] ASTPrinter: Always print attributes after parameter specifiers

(cherry picked from commit 4fd4c00bc9)
This commit is contained in:
Pavel Yaskevich
2025-04-15 15:11:17 -07:00
parent 3bb3a0744f
commit fbadca2f2b
2 changed files with 19 additions and 10 deletions

View File

@@ -92,3 +92,12 @@ public func testExecutionConcurrent() async {}
nonisolated(nonsending)
public func testExecutionCaller() async {}
// CHECK: nonisolated(nonsending) public func testExecutionCaller() async
public struct TestPlacementOfAttrsAndSpecifiers {
// CHECK: public func test1<T>(_: sending @autoclosure () -> T)
public func test1<T>(_: sending @autoclosure () -> T) {}
// CHECK: public func test2<T>(_: borrowing @autoclosure () -> T)
public func test2<T>(_: borrowing @autoclosure () -> T) {}
// CHECK: public func test3<T>(_: inout () async -> T)
public func test3<T>(_: inout () async -> T) {}
}