Commit Graph

8 Commits

Author SHA1 Message Date
Ben Barham
e5a28caa9a [Test] Fix swift_swift_parser feature and use in tests
The macro tests were all using "REQUIRES: OS=macosx" as a proxy for
"have the Swift Swift parser". There was an existing feature for this,
but it was just checking whether the path was passed through. Fix that
to use the same variable as in CMake.

Also remove all extraneous `-I` and `-L` to the host libs in the target
invocations.
2023-04-03 09:25:03 -07:00
Rintaro Ishizaki
1d2fd4223f [Test] Add %host_triple and %host_sdkroot substitutions
Macro tests need to build host libraries/tools. We can't use %target-*
substitutions for that.

rdar://107398734
2023-03-31 07:41:41 -07:00
Doug Gregor
a2737df55a [Macros] Unpack DiagnosticsError into separate diagnostics
Fixes rdar://107289985.
2023-03-29 15:28:52 -07:00
Doug Gregor
f88d2c638f Clean up feature flags for macros.
Enable expression macros by default, and add separate feature flags for
attached and freestanding macros.
2023-03-02 14:34:59 -08:00
Doug Gregor
9950ea06ef Trim the attribute name when grabbing it from a syntax tree 2023-02-15 12:46:59 -08:00
Alex Hoppen
ba5a727983 [Macros] Compile Macros tests with swift-version 5 instead of swift-version 4 2023-02-04 11:10:08 +01:00
Doug Gregor
a54bc7489e Add missing requirement for macOS 2023-02-01 16:56:51 -08:00
Doug Gregor
cbdb18097e [Macros] Fix emission of thrown errors.
Errors that were thrown out of a macro implementation were being
emitted and then lost. The result of this is a SILGen assertion later
on, if there were no other errors in the code.

Make sure we properly emit these diagnostics through the source
manager, which required fixing an issue in the offset computation used
for diagnostics.
2023-02-01 15:01:44 -08:00