Commit Graph

12 Commits

Author SHA1 Message Date
Pavel Yaskevich
d53b1c48ec Merge pull request #75564 from dempseyatgithub/0441-language-mode-flag
SE-0441: Add language-mode option with alias to swift-version
2024-09-06 00:23:49 -07:00
James Dempsey
5fd2eeead5 Add tests for -language-mode flag 2024-08-19 12:15:15 -07:00
Allan Shortlidge
47454e3f03 Basic: Add support for -swift-version 7 to asserts mode compilers.
Begin accepting `-swift-version 7` in asserts compilers so that we can begin to
test source-breaking changes intended for the next language version mode, such
as diagnostics that need to be staged in without breaking existing code. There
are no announced plans yet for a language mode after Swift 6, so 7 serves as a
placeholder for some future language mode.

Tests that wish to use `-swift-version 7` currently must be marked with
`REQUIRES: swift7` or they will fail in no-asserts bots. The simplest pattern
is probably to duplicate part or all of the pre-Swift 7 test to check that will
behave as intended in Swift 7.
2024-08-18 23:01:25 -07:00
Varun Gandhi
a1716fe2a6 [Diagnostics] Update compiler diagnostics to use less jargon. (#31315)
Fixes rdar://problem/62375243.
2020-04-28 14:11:39 -07:00
Jordan Rose
00ed3e1185 [Driver] Don't suggest using the "major version" for -swift-version (#20563)
This was a nice feature when people said "-swift-version 3.1"...
up until we got "-swift-version 4.2" as an actual valid version.
Just drop the special case.

https://bugs.swift.org/browse/SR-8850
2018-12-10 08:41:21 -08:00
Ted Kremenek
46510a5eba Bump compiler version to Swift 5.
Main pieces:

- Bump swift-version to 5
- Remove -swift-version 3 support
2018-11-06 14:38:55 -08:00
Ted Kremenek
3da51018b6 Teach ClangImporter to handle effective Swift version with minor release.
Needed to support Swift 4.2.
2018-03-23 00:30:44 -07:00
Ewa Matejska
1272cd3aac Making master call itself 4.1, updating the swift 3 compatiblity mode to be 3.3 (from 3.2), adding ability to pass swift-version 5. Importer work not done yet. 2017-08-17 20:57:01 -07:00
Jordan Rose
3456d04925 "-swift-version 3" means Swift 3.1, not 3.0. (#7883)
Put in a general mechanism for mapping user-specified "compatibility
versions" to proper "effective versions" (what #if and @available
checking should respect). This may still be different from the
intrinsic "language version"; right now master is considered a "3.1"
compiler with a "Swift 4 mode", and we plan to ship a "4.0" compiler
with a "Swift 3 mode" that will have a version number of something
like "3.2".

rdar://problem/29884401 / SR-3791
2017-03-03 13:28:01 -08:00
Michael Ilseman
5d540ababd [Swift version] Note all supported versions when -swift-version is misused. 2016-10-18 14:43:21 -07:00
Michael Ilseman
12efcc9db6 [Version] Don't allow effective sub-versions, only major versions
Also offer a note when the major version is valid on its own.
2016-10-18 14:43:21 -07:00
Graydon Hoare
8970d44675 Add "-swift-version <n>" that sets LangOpts.EffectiveLanguageVersion.
This flag switches the "effective language version" of the compiler,
at least to any version supported (as of this change: "3" or "3.0").

At the moment nothing uses it except the language version build
configuration statements (#if swift(...)) and various other places
that report, encode, or otherwise check version numbers.

In the future, it's intended as scaffolding for backwards compatibility.

Fixes SR-2582
2016-09-20 15:11:37 -07:00