Files
David Rönnqvist 1793966c66 [SymbolGraphGen] Emit "functionSignature" info for macros (#88249)
This makes the Swift symbol graph generator emit "functionSignature"
information for macros, just like it does for functions, initializers,
and subscripts.

Resolves rdar://173856819.

(This is very similar to https://github.com/swiftlang/swift/pull/70207
from 2023)

------

- **Explanation**: This makes the Swift symbol graph generator/extractor
emit "functionSignature" information for macros, just like it does for
functions/methods/operators, initializers, and subscripts.
- **Scope**: This change is isolated to the creation of supplementary
"symbol graph" files that other tools can use to process the public API
surface and documentation for a Swift module. For example, Swift-DocC
uses this "functionSignature" information both to check that all
parameters are documented (if any of them are) and to support
human-readable link disambiguation using type name spellings (like
`-(_,Int)` or `->String`). Currently, neither of those features work for
macro symbols but both work for functions/methods/operators,
initializers, and subscripts.
- **Issues**: rdar://173856819
- **Risk**: This is a low risk change that is isolated to the creation
of "symbol graph" files and that applies past good changes (from
https://github.com/swiftlang/swift/pull/70207 in 2023) to a new type of
symbol.
- **Testing**: New unit test verifies that macro symbols output the
"functionSignature" information the same way as
functions/methods/operator, initializers, and subscripts do. Manual
testing verified that existing features in Swift-DocC can process this
information in the output symbol graph file.
2026-04-13 10:30:18 -06:00
..