Without this, USR/DWARF mangling encodes inverse constraints that the
runtime mangler drops, so swift-api-digester reports a spurious "mangled
name changing" ABI break for any decl that adopts @_preInverseGenerics
alongside ~Copyable/~Escapable
Partially fixing rdar://176404397.
If the fix-it would remove a range that is followed by a newline and the
remaining text on the line is empty or all whitespace then remove the entire
line. This produces better results when a fix-it removes an attribute that is
written on a line by itself.
The new request in SourceKit allows to query this JSON format via the
usual SourceKit APIs. We use it here for testing but it can be
integrated in a client as needed.
Default to use new swift-driver to run lit tests as legacy swift driver
is deprecated for a long time. The lit tests for legacy drivers are also
disable when running new swift-driver.
Tests that relies on legacy swift driver (for example, tests merge
module) can be enabled on conditions `legacy_swift_driver`. Fix and
split up some existing tests that relies on legacy driver.
This change fixes rdar://172417385 and #45125 by using transformRec
to set no escape, instead of casting which drops sugar. This affects
how interfaces are printed, and could theoretically cause issues with
printing private aliases into public interfaces. Motivated by needing
to be able to diagnose issues with attributes on aliases; without this
change, the alias sugar is sometimes lost.
`compiler(>=)` is the simplest/best way to write code that needs to only
be built on a particular toolchain version. For that to work, we cannot
have the `main` branch report itself as the same version as
`release/6.3`; accordingly, bump the compiler version number to 6.4.
(The Swift Standard Library already reports itself as 6.4. If the `main`
branch ends up shipping under some other Swift version, then we can
simply update this as needed, like we did with 5.11 → 6.0.)
---------
Co-authored-by: Mishal Shah <shahmishal@users.noreply.github.com>
This test has been XFAILed since 2016 despite merely missing an error
expectation. However, given that the obsoleted pre-Swift-3 metatype
syntax tested here has not had a tailored compatibility diagnostic since
at least Swift 3 (the compiler), I do not think it carries its weight.
Resolves rdar://16172507.
swift-synthesize-interface needs to match the safe interop wrappers
setting of the compiler invocation that built the Swift module, but
doesn't have -enable/disable-experimental-feature options. Instead of
introducing them for a single feature, which isn't even experimental,
this introduces the -disable-safe-interop-wrappers instead.
This enables the stable subset of safe interop wrappers by default. It
can be manually disabled using
`-disable-experimental-feature StabilizedSafeInteropWrappers`.
rdar://148994016
lifetimebound does not imply that the parameter does not escape. For
stabilising safe wrappers we don’t want to use that assumption, so we
need a new feature flag.
rdar://170090534
Make sure we don't ever try to record semantic tokens for a different
buffer. This works around an ASTWalker issue where it will walk macro
expanded bodies even in non-macro-expansion mode.
rdar://165420658