Commit Graph

6 Commits

Author SHA1 Message Date
Eric Miotto
89c3f47c41 Require build of StringProcessing for some Macros tests (#84126)
Also mark them as not executable, since they don't call `%target-run`.
    
This is needed in back deployment configurations where StringProcessing is
not supported.
    
Addresses rdar://159635486
2025-09-05 22:34:12 -07:00
Doug Gregor
75aae222df Fix tests for Linux 2024-11-13 23:28:37 -08:00
Doug Gregor
11ed132614 [Clang importer + macros] Handle name lookup and type checking for expanded macros
Introduce a number of fixes to allow us to fully use declarations that
are produced by applying a peer macro to an imported declarations.
These changes include:
* Ensuring that we have the right set of imports in the source file
containing the macro expansion, because it depends only on the module
it comes from
* Ensuring that name lookup looks in that file even when the
DeclContext hierarchy doesn't contain the source file (because it's
based on the Clang module structure)

Expand testing to be sure that we're getting the right calls,
diagnostics, and generated IR symbols.
2024-11-13 21:21:56 -08:00
Daniel Rodríguez Troitiño
ba68faaed5 [test] Mark tests that use experimental/upcoming features as such
Find all the usages of `--enable-experimental-feature` or
`--enable-upcoming-feature` in the tests and replace some of the
`REQUIRES: asserts` to use `REQUIRES: swift-feature-Foo` instead, which
should correctly apply to depending on the asserts/noasserts mode of the
toolchain for each feature.

Remove some comments that talked about enabling asserts since they don't
apply anymore (but I might had miss some).

All this was done with an automated script, so some formatting weirdness
might happen, but I hope I fixed most of those.

There might be some tests that were `REQUIRES: asserts` that might run
in `noasserts` toolchains now. This will normally be because their
feature went from experimental to upcoming/base and the tests were not
updated.
2024-11-02 11:46:46 -07:00
Doug Gregor
70980b95f8 Add experimental feature MacrosOnImporters for applying macro to imported decl
This is still very much experimental and we don't want to accidentally
enable it everywhere.
2024-10-08 11:12:55 -07:00
Doug Gregor
593f1dedb0 Test that macros can be applied to imported Objective-C declarations
These currently end up as "open", which is incorrect (we need to make them
"final"). This cannot be addressed until we pass the lexical context
down to the macro, which is currently... a bit tricky.
2024-10-08 11:12:53 -07:00