Commit Graph

7628 Commits

Author SHA1 Message Date
Butta
a3ea28ff19 [android] Remove ICU build flags since that requirement was dropped in #40340 2021-12-20 12:06:13 +05:30
Slava Pestov
aef6e7c1e6 Add CHECK: lines to explicitly verify some dodgy requirement signatures 2021-12-17 10:04:51 -05:00
swift-ci
2fc0e354e7 Merge pull request #40596 from CodaFi/label-and-slander 2021-12-16 16:40:34 -08:00
Robert Widmann
6f68210fb2 Use the API Name of Enum Parameters to Determine Coding Keys
Covers a missing case in codable synthesis for enums with argument
payloads that have internal and external labels. When the name of the
var decl is used, the internal name of the parameter becomes the key
instead of the API name. In this case, this causes an invalid reference
to an enum case with the internal name as an argument to be synthesized
in the derived Decodable conformance which (hopefully) crashes
downstream.

rdar://86339848
2021-12-16 13:02:35 -08:00
swift-ci
ad7abdcbc7 Merge pull request #40278 from atrick/fix-debuginfo 2021-12-15 16:14:50 -08:00
Andrew Trick
7fec04c8fb Fix a test case with copy-pasted SIL IDs. 2021-12-15 13:57:05 -08:00
Slava Pestov
01965d2c0d Merge pull request #40559 from slavapestov/typealias-in-protocol-fixes
Don't resolve protocol typealiases as DependentMemberTypes in Structural mode
2021-12-15 07:45:35 -05:00
Alejandro Alonso
b9b4e7516b Beef up Unicode.Scalar.Properties testing for binary properties 2021-12-14 21:02:55 -08:00
Slava Pestov
b32694e736 GSB: Try to avoid calling Type::subst() from expandConformanceRequirement() 2021-12-14 19:44:21 -05:00
Alejandro Alonso
90aa299bc2 Reenable some stdlib long_test 2021-12-14 12:29:33 -08:00
Slava Pestov
2441e688e4 Pass -requirement-machine-protocol-signatures=on in a few tests where the GSB got it wrong
These fail with -requirement-machine-protocol-signatures=verify because
the GSB produces incorrect output. Enable the requirement machine
unconditionally for these tests, bypassing verification.

A new file test/Generics/same_type_requirements_in_protocol.swift
contains reduced versions of all of the failures, with FileCheck
used to confirm the exact requirement signature output.
2021-12-14 02:17:51 -05:00
swift-ci
a77f161ec9 Merge pull request #38341 from 3405691582/FoundationInterop 2021-12-12 18:41:01 -08:00
swift-ci
6a752615d6 Merge pull request #40477 from nate-chandler/lexical-lifetimes/reenable-destroy-hoisting 2021-12-09 15:42:02 -08:00
Nate Chandler
59f3b37c35 [SIL] Reenable destroy hoisting under lexical lifetimes.
Until https://github.com/apple/swift/pull/40392 lands, run destroy
hoisting with lexical lifetimes.
2021-12-09 10:42:36 -08:00
Nate Chandler
ea42e2f334 Enabling copy propagation enables lexical lifetimes.
The effect of passing -enable-copy-propagation is both to enable the
CopyPropagation pass to shorten object lifetimes and also to enable
lexical lifetimes to ensure that object lifetimes aren't shortened while
a variable is still in scope and used.

Add a new flag, -enable-lexical-borrow-scopes=true to override
-enable-copy-propagation's effect (setting it to ::ExperimentalLate) on
SILOptions::LexicalLifetimes that sets it to ::Early even in the face of
-enable-copy-propagation.  The old flag -disable-lexical-lifetimes is
renamed to -enable-lexical-borrow-scopes=false but continues to set that
option to ::Off even when -enable-copy-propagation is passed.
2021-12-08 19:13:21 -08:00
Eric Miotto
403ccd4072 Extend freestanding to support targeting Darwin platforms (#40202)
* add an option to add freestanding to the Darwin platform, so that
  to get expected compile behaviours (e.g. setting the install name)
* rework testing configuration to relax assumptions about freestanding
* add a preset to test such configuration (at least for PR testing)

Addresses rdar://85465396
2021-12-08 07:09:44 -08:00
Nate Chandler
2356b07427 [Test] Add two lexical lifetime verification tests.
Verify that lexical-lifetimes and copy-propagation interact correctly to
keep objects named by variables alive in a couple interesting cases:
unsafe pointers, synchronization point calls.
2021-12-07 16:29:17 -08:00
Pavel Yaskevich
fecc887024 Merge pull request #40438 from xedin/rdar-85843677
[PreCheck] Don't use value declared in closure as outer candidate if …
2021-12-07 12:14:58 -08:00
eeckstein
307251a803 Merge pull request #40421 from eeckstein/remove-host-swiftlib-support
cmake: remove support for non-libswift swift support in host libraries/executables.
2021-12-07 09:32:30 +01:00
swift-ci
fe4d9af277 Merge pull request #40404 from nate-chandler/lexical_lifetimes/renamed_flag 2021-12-06 20:12:59 -08:00
Pavel Yaskevich
f642c3efc8 [PreCheck] Don't use value declared in closure as outer candidate if it's validated
With multi-statement closure inference enabled "outer candidates"
hack needs to be careful with its use of `isInvalid()` because some
of the declarations lookup finds might be coming from a multi-statement
closure that being type-checked, such declarations have to be avoided
as candidates, otherwise calling `isInvalid` on them results in a circular
type-checking.

Resolves: rdar://85843677
2021-12-06 16:47:56 -08:00
Erik Eckstein
6199876be7 cmake: remove support for non-libswift swift support in host libraries/executables.
This is not needed anymore because all swift code will be contained in libswift.
Also, remove the corresponding tests.
2021-12-05 19:06:00 +01:00
Nate Chandler
1961be8845 Renamed flag to -enable-lexical-lifetimes.
Previously, both swift-frontend and sil-opt put lexical lifetimes behind
a flag named -enable-experimental-lexical-lifetimes.  That's redundant.
Here, the experimental portion of the name is dropped.
2021-12-03 17:40:37 -08:00
swift-ci
f443f22fe9 Merge pull request #40391 from nate-chandler/test/disable/20211203/1 2021-12-03 10:46:35 -08:00
Nate Chandler
06971042e5 [Test] Disabled a couple tests on arm64e.
rdar://85526879
rdar://85526916
2021-12-03 08:32:40 -08:00
Erik Eckstein
1eca11dc28 tests: disable StringMemoryTest.swift, which fails with ASAN
rdar://85913190
2021-12-03 14:56:22 +01:00
Alejandro Alonso
2ab99418e2 Disable another a test (#40376) 2021-12-02 20:34:52 -08:00
Doug Gregor
fc3a124216 Merge pull request #40354 from DougGregor/clang-importer-stored-properties-crash
[Clang importer] Don't insert members found via lookup into the wrong context
2021-12-01 12:43:24 -08:00
Doug Gregor
4fccfccadf [Clang importer] Don't insert members found via lookup into the wrong context.
Discovered while investigating rdar://85840928.
2021-12-01 09:57:32 -08:00
Alex Hoppen
290df69412 Merge pull request #40344 from apple/more-backdeployment-trouble
[test] Fix back deployment for tests looking at exclusivity checking
2021-12-01 10:40:54 +01:00
Alejandro Alonso
7db88b2257 Disable some failing tests (#40338)
change to requires
2021-11-30 19:03:44 -08:00
Karoy Lorentey
83fee79056 [test] rdar://85620934 Fix back deployment vs exclusivity checking tests 2021-11-30 17:29:10 -08:00
Pavel Yaskevich
9649e74490 Merge pull request #40335 from xedin/atmpt-3-fix-flaky-test
[TypeChecker] NFC: Scope down per test-case for rdar://74035425
2021-11-30 15:47:15 -08:00
Kuba (Brecka) Mracek
34b45cbcc2 Add a crash reproducer for rdar://85843677 (#40327) 2021-11-30 13:50:49 -08:00
buttaface
1cfb8f024e [android] Do not pick a linker when testing anymore, as the NDK only uses lld now (#40303) 2021-11-30 10:52:46 -08:00
Pavel Yaskevich
053c874047 [TypeChecker] NFC: Scope down per test-case for rdar://74035425
Remove some literals from the test-case to prevent it from randomly
failing in some CI configurations.

Resolves: rdar://85267603
2021-11-30 10:29:57 -08:00
Pavel Yaskevich
bc54bc6bb7 Revert "[TypeChecker] SE-0326: Enable multi-statement closure inference by default" 2021-11-29 17:26:08 -08:00
Anthony Latsis
9fc633e0b8 Merge pull request #39652 from AnthonyLatsis/no-context
TypeResolution: Abolish TypeResolutionStage::Contextual
2021-11-29 16:44:27 +03:00
Richard Wei
65bffd7ad7 Add _MatchingEngine and _StringProcessing modules.
These modules are part of the experimental declarative string processing feature. If accepted to the Standard Library, _StringProcessing will be available via implicit import just like _Concurrency, though _MatchingEngine will still be hidden as an implementation detail.

`_MatchingEngine` will contain the general-purpose pattern matching engine ISA, bytecode, and executor. `_StringProcessing` will contain regular expression and pattern matching APIs whose implementation depends on the matching engine..

Also consolidates frontend flag `-enable-experimental-regex` as `-enable-experimental-string-processing`.

Resolves rdar://85478647.
2021-11-19 09:27:33 -08:00
Anthony Latsis
588603f795 Sema: Pass the correct substitutions to 'checkGenericArguments' instead of mapping into context in place 2021-11-19 16:39:37 +03:00
buttaface
30c292ca87 [android] Update to NDK 23b (#39921)
The latest Long Term Support NDK finally removed binutils, including the bfd/gold
linkers and libgcc. This simplifies our Android support, including making lld the
default linker for Android. Disable three reflection tests that now fail, likely
related to issues with swift-reflection-dump and switching to lld.
2021-11-17 20:58:42 -08:00
Pavel Yaskevich
63f355fde0 Merge pull request #39989 from xedin/more-diag-improvements-for-multi-stmt-closures
[TypeChecker] SE-0326: Enable multi-statement closure inference by default
2021-11-17 10:14:58 -08:00
Pavel Yaskevich
14939cf467 [CSGen] Rework nil-coalescing operator handling in LinkedExprAnalyzer
Allow `LinkedExprAnalyzer` to capture `??` operator and walk into
its arguments because they could have valuable type information,
but don't attempt to favor or link operators if `??` is present in a chain.

Resolves: rdar://85277993
2021-11-16 18:00:11 -08:00
Pavel Yaskevich
67d87e104f [Tests] NFC: Adjust all the test-cases improved by multi-statement inference 2021-11-15 16:42:06 -08:00
Karoy Lorentey
a2c9bc6470 Merge pull request #40146 from lorentey/label-validation-tests
[lit] Apply a different label for tests under validation-test/ than the ones under test/
2021-11-12 16:56:45 -08:00
Karoy Lorentey
f2132728b7 Merge pull request #40125 from apple/Set-test-cleanup
[test] Remove duplicate symmetricDifference tests
2021-11-11 19:42:35 -08:00
Karoy Lorentey
41c452804c Merge pull request #40134 from lorentey/fix-excl-tests-with-backdeployed-runtime
[test] Fix expected error message with backdeployed runtimes
2021-11-11 19:42:20 -08:00
Karoy Lorentey
8c3a8e798e [lit] Apply a different label for tests under validation-test/ than the ones under test/
This will let us find the test file that produced a failure on the first attempt, saving the project at least three trillion cumulative person-seconds each year.
2021-11-11 17:07:27 -08:00
Karoy Lorentey
bb36a87205 Update hasBackdeployedConcurrencyRuntime logic 2021-11-11 13:44:41 -08:00
Pavel Yaskevich
6fc646ac4a Merge pull request #40131 from xedin/rdar-85267603
[TypeChecker] NFC: Allow perf test-case for rdar://74035425 to run on…
2021-11-11 09:49:39 -08:00