Files
swift-mirror/test/Macros/macros_diagnostics.swift
Rintaro Ishizaki ee3c2ab49a [Macros] Don't include attr range when checking macro definition
For macro definition checking, we use the range of the `macro`
declaration and re-parse it with `SwiftParser`. Previously it uses the
range including the attributes, but that can result invalid code because
the attribute can be in a `#if ... #endif` region.

Since we don't use attributes for checking the definition, just use the
range without the attributes instead.

rdar://150805795
(cherry picked from commit 8519e71602)
2025-05-07 09:31:17 -07:00

13 KiB