Files
Saleem Abdulrasool e9007d6d2a ClangImporter: Apply APINotes types to imported macro constants
Macro constants do not have Clang declarations, so APINotes `Globals`
metadata cannot be applied through the normal declaration processing
path. When importing a macro constant, preserve the macro's
`IdentifierInfo` and owning Clang module, and ask Clang Sema whether
APINotes provides a replacement type for that macro name.

The owning module is needed for module APINotes sidecars such as
`WinSDK.apinotes`; location-only lookup can otherwise fall back to
directory `APINotes.apinotes` lookup and miss typed macro annotations.

Thread the macro identifier through the importer so recursive macro
aliases continue to use the originally imported macro name for APINotes
lookup while still resolving through to the target macro value.

Add APINotes coverage for typed macro constants, including an alias
whose target has a different APINotes type. This verifies both that the
alias keeps its own APINotes type and that it materializes the resolved
target value.
2026-07-24 10:11:53 -07:00
..