Commit Graph

4 Commits

Author SHA1 Message Date
Hamish Knight
bc5c8f51bd [test] Fix extension macros in test suite
Make sure we're using `providingExtensionsOf` as the extended type,
previously we were just using the unqualified name of the decl.
2025-03-28 21:35:59 +00:00
Artem Chikin
f5f0c0043d [Compile Time Constant Extraction] Query nominal type conformances to get at the protocols, instead of getAllProtocols.
As it stands, for extension macros which add protocol conformances, the list of protocols specified on the macro's 'conformances:' parameter gets added in its entirety to the list of a nominal type's protocols in 'ConformanceLookupTable::addMacroGeneratedProtocols'. Whereas the macro itself, may only add *some* of the specified conformances. This means that `getAllProtocols` may contain a super-set of protocols captured in `getAllConformances`, some of which may not actually be generated by the macro.

This change narrowly fixes ConstExtract to query actual generated conformances. Though, potentially we should make 'ConformanceLookupTable::addMacroGeneratedProtocols' behave in a way that reflects the protocols the macro actually adds the conformances to, instead of the ones it may add conformances to.

Resolves rdar://130316531
2024-06-25 12:29:29 -07:00
Apollo Zhu
708fb13c5b Extract decl in macro added extensions 2024-03-18 22:58:17 -07:00
Apollo Zhu
9f9b3abeaa [Compile Time Constant Extraction] Extract from macro expansions
Fix logic for @_objcImplementation
2023-12-06 16:08:02 -08:00