Commit Graph

4 Commits

Author SHA1 Message Date
Rintaro Ishizaki
d51bbefae9 [Macros] Test case for opt-out from automatic attrs propagation
rdar://110364154
2023-06-07 10:59:55 -07:00
Richard Wei
9c91d1b705 [Macros] Fix lookup of macro-produced variables (#65939)
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.
2023-05-18 15:32:21 -07:00
Rintaro Ishizaki
7c2a73ebbd [Macros] Create type refinement context for MacroExpansionDecl 2023-05-16 20:47:12 -07:00
Rintaro Ishizaki
aa4504eb8a [Macros] Test cases for macro expansion decl with attribtutes 2023-05-15 16:18:34 -07:00