mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
When building the ASTScope tree, we set the insertion location for the macro expansion just before the end of the macro use. This is the right approach for attached macros, because we need to put the entities after the macro. However, for freestanding macros, which can have trailing closures, this location is a problem, because the scope for the macro expansion ends up inside the scope for the trailing closure. Use the start location of the freestanding macro instead. Fixes rdar://130923190.