mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
Calling `getInnermostDeclContext()->getParentSourceFile()` on a macro-produced decl does not seem to be a reliable way to obtain the macro expansion source file, because `PatternBindingDecl` is not a `DeclContext` and `getInnermostDeclContext()` falls back outside the macro expansion file. This patch switches to using `getSourceFileContainingLocation` when possible. Resolves rdar://109376568.
4.9 KiB
4.9 KiB