Commit Graph

32761 Commits

Author SHA1 Message Date
Sam Lazarus
44c6ad6654 Test: Update swift 4 keypath tests to reflect changed error message 2019-05-03 22:16:56 -04:00
Sam Lazarus
1a1e77077a Test / Sema: Change the wording of assignment through read-only key path error 2019-05-03 22:16:56 -04:00
Sam Lazarus
cefbb12ed2 Test: Update swift 5 keypath tests to reflect and test new behavior 2019-05-03 22:16:56 -04:00
Karoy Lorentey
211aae1574 [test] Array: Add availability guard to crash test
Array.init(unsafeUninitializedCapacity:…) back-deploys to the 5.0 stdlib, but the implementation there doesn’t catch buffer reassignment.
2019-05-03 19:09:47 -07:00
Karoy Lorentey
3c33145210 [test] Add availability guard on Character behavior test 2019-05-03 19:09:47 -07:00
Karoy Lorentey
7f1c139b28 [test] Add availability guards on Foundation hashing tests 2019-05-03 19:09:47 -07:00
David Smith
1192b914d2 Merge pull request #24457 from Catfish-Man/two-by-two-length-of-blue
Fix bounds check in bridged ASCII String comparison
2019-05-03 18:28:55 -07:00
Joe Groff
001c0dda76 Merge pull request #24485 from jckarter/opaque-type-signature-gsb
Sema: Use GSB to build the signature for opaque result type decls.
2019-05-03 17:59:43 -07:00
Brent Royal-Gordon
59d2feaa26 Improve strange-interpolation test
There were a number of mistakes in this test:

• The whole thing was indented one space.
• Some fix-it tests were malformed and therefore not being tested.
• The output checking could in theory allow content before or after the intended content.
2019-05-03 17:23:13 -07:00
Joe Groff
22793b4567 Fixes for opaque return types on local functions.
- In Sema, don't traverse nested declarations while deducing the opaque return type. This would
  cause returns inside nested functions to clobber the return type of the outer function.
- In IRGen, walk the list of opaque return types we keep in the SourceFile already for type
  reconstruction, instead of trying to visit them ad-hoc as part of walking the AST, since
  IRGen doesn't normally walk the bodies of function decls directly.

Fixes rdar://problem/50459091
2019-05-03 16:53:21 -07:00
Slava Pestov
c954dfa6a9 Sema: Tweak test/decl/protocol/conforms/nscoding.swift a bit
Make sure we test on both an "old" and "new" deployment target.
2019-05-03 18:56:46 -04:00
David Smith
008699e52d Fix bounds check in bridged ASCII String comparison 2019-05-03 15:55:58 -07:00
Pavel Yaskevich
d0ae1d9798 Merge pull request #24483 from xedin/rdar-50438071
[ConstraintSystem] Tighten "missing call" fix conditions by checking …
2019-05-03 15:49:27 -07:00
Arnold Schwaighofer
8c260467b5 Merge pull request #24478 from aschwaighofer/opaque_subst_use_resilience_expansion
ReplaceOpaqueTypesWithUnderlyingTypes: Use resilience expansion instead of inlinable attribute
2019-05-03 15:04:43 -07:00
Joe Groff
a58bc8a320 Sema: Use GSB to build the signature for opaque result type decls.
Our ad-hoc mechanism for building the signature did not always produce requirements in the order
expected by the rest of the system; using the GSB should ensure we build a valid generic signature.
Fixes rdar://problem/50309983.
2019-05-03 15:01:02 -07:00
Pavel Yaskevich
0275689cd3 [ConstraintSystem] Tighten "missing call" fix conditions by checking whether other side is an optional
If "convertTo" type is an optional let's look through it to see
whether it contains another function type which, if so, would
rule out possibility of missing explicit call.

Resolves: rdar://problem/50438071
2019-05-03 13:02:28 -07:00
David Goldman
970ffab44d Merge branch 'master' of https://github.com/apple/swift 2019-05-03 15:18:42 -04:00
Arnold Schwaighofer
d1eaa9cded Fix test case specialize_opaque_type_archetypes.swift 2019-05-03 11:45:55 -07:00
Arnold Schwaighofer
830abc3284 Add test case with alwaysEmitIntoClient 2019-05-03 11:21:46 -07:00
Arnold Schwaighofer
fa04369600 Remove preventInlining() in favor of @inline(never) in test 2019-05-03 11:21:23 -07:00
Nathan Hawes
09058cca19 Merge pull request #24479 from harlanhaskins/unremarkable
[test] Remove debug flag from module cache rebuild test
2019-05-03 11:16:03 -07:00
Jordan Rose
517f5d6b6a [ClangImporter] Retire the term "adapter" in favor of "overlay" (#24427)
Way back in Swift 1 I was trying to draw a distinction between
"overlays", separate libraries that added Swift content to an existing
Objective-C framework, and "the Swift part of a mixed-source
framework", even though they're implemented in almost exactly the same
way. "Adapter module" was the term that covered both of those. In
practice, however, no one knew what "adapter" meant. Bring an end to
this confusion by just using "overlay" within the compiler even for
the mixed-source framework case.

No intended functionality change.
2019-05-03 11:11:58 -07:00
Jordan Rose
f76d2c3976 [ModuleInterface] Short-circuit module loading for frameworks too (#24459)
Follow-up to 7969705 that handles frameworks as well. Oops.

rdar://problem/50070463
2019-05-03 11:11:07 -07:00
swift-ci
8732188afe Merge pull request #24477 from stephentyrone/disable-accelerate-tests 2019-05-03 10:58:07 -07:00
Harlan Haskins
385b60b21c [test] Remove debug flag from module cache rebuild test
This debug flag shouldn't have been included in the test, and it doesn't
exist when built without asserts.

rdar://50447378
2019-05-03 10:39:13 -07:00
Joe Groff
6c779bb487 Merge pull request #24445 from jckarter/opaque-type-remote
Debugger support for opaque types.
2019-05-03 08:18:59 -07:00
David Goldman
a3a4d2d22b Add InternalDiagnostic to CursorInfoData and NameTranslatingInfo 2019-05-03 11:01:22 -04:00
David Goldman
10ecea6269 [SourceKit] Fail requests when an error occurs
Previously, requests would fail silently by returning an empty struct
in the response.

With this change, responses will properly report fail with the internal
error.
2019-05-03 11:01:21 -04:00
Steve (Numerics) Canon
d4b90f4837 Temporarily disable all the Accelerate tests.
These are testing for bitwise identical results, but don't guarantee that
the buffers being used always have identical alignment. This will result
in small rounding differences when vector codepaths are used for different
elements of some results.

This is partially an underlying bug in Accelerate (which is outside the
scope of this project to fix), and partly a test bug (which we can address
by adopting approximate comparisons here). In the short term, though, I'm
going to disable these.
2019-05-03 09:12:30 -04:00
Harlan Haskins
f978cb0ba3 Merge pull request #24424 from harlanhaskins/an-absolutely-remarkable-thing
[ModuleInterface] Emit remarks when rebuilding from an interface
2019-05-02 22:45:15 -07:00
Pavel Yaskevich
b6b5725969 Merge pull request #24454 from xedin/rdar-50376224
[ConstraintSystem] Detect and fix invalid refs in dynamic key path me…
2019-05-02 21:23:42 -07:00
Pavel Yaskevich
d275c8afbb [ConstraintSystem] Add a tailored diagnostic for conversion of non-escaping parameter to dependent member type 2019-05-02 21:21:58 -07:00
eeckstein
344fe76e7f Merge pull request #24456 from eeckstein/fix-irgen-mangler
IRGen: mangle conformance access paths with opaque result type as a root
2019-05-02 19:53:41 -07:00
Harlan Haskins
f1b22b980b [test] Change stored-properties-client to an executable test (#21426)
This test was overfitting what it was trying to test, causing different
targets (and even different assert configurations) to fail to match.
Instead, make this an executable test and ensure that round-tripping
through setting and getting behaves as expected.

Fixes rdar://46486517
2019-05-02 19:02:41 -07:00
Harlan Haskins
dfe4491702 [ModuleInterface] Emit remarks when rebuilding from an interface
Keep track of information that led the module interface loader to reject loading a compiled module, if it needed to fall back to compiling an interface.

rdar://47792754
2019-05-02 17:46:34 -07:00
Joe Groff
edd30153fa Add TypeDecoder test 2019-05-02 17:28:08 -07:00
Joe Groff
a6b5a41a32 IRGen: Generate anonymous contexts for properties with opaque return types.
They aren't normally decl contexts, but if one has an opaque type, we want to be able to record
the property as a context so that we can reconstruct it in RemoteAST.
2019-05-02 17:28:08 -07:00
Erik Eckstein
0d971eebfe IRGen: mangle conformance access paths with opaque result type as a root
Fixes a crash in IRGen

TODO: also fix the demangler/remangler part of this mangling change.
Currently it's not a problem because we never demangle such a symbol (it's even not round-trip checked in Mangler::verify).

rdar://problem/50405691
2019-05-02 17:19:20 -07:00
swift-ci
a97b4c88ce Merge pull request #24430 from DougGregor/property-delegates-implicit-init 2019-05-02 16:24:19 -07:00
ravikandhadai
d912e3312e Merge pull request #24113 from ravikandhadai/constexpr-skip
[Const evaluator] Add support to "skip" instructions in step-wise evaluation
2019-05-02 15:52:05 -07:00
Arnold Schwaighofer
3089c86f0e Merge pull request #24436 from aschwaighofer/opaque_specializer_fix_cast_nested_types
Opaque archetypes specializer: Fix cast of nested types
2019-05-02 15:45:35 -07:00
Doug Gregor
6933382ac5 [Property delegates] Fix default argument printing with default initialization 2019-05-02 15:14:39 -07:00
Pavel Yaskevich
21216d8ecd [ConstraintSystem] Detect and fix invalid refs in dynamic key path member lookup
KeyPath dynamic member lookup is limited to what key path itself
could do, so let's detect and diagnose invalid references just
like we do for regular key path expressions.

Resolves: rdar://problem/50376224
2019-05-02 15:02:11 -07:00
Ben Langmuir
76ced562e0 Merge pull request #24440 from benlangmuir/syntax-custom-attr
Syntax: add Syntax support for property delegate attributes
2019-05-02 14:31:14 -07:00
swift-ci
986d5ca5ca Merge pull request #24409 from FlexMonkey/accelerate-vImage-arrayFromBuffer 2019-05-02 13:18:11 -07:00
Arnold Schwaighofer
d435460a73 Fix test specialize_opaque_type_archetypes.swift on 32bit 2019-05-02 11:07:15 -07:00
Erik Eckstein
5daf48b0d9 Demangler: fix substitutions for OpaqueType in the remangler.
rdar://problem/50132625
2019-05-02 10:22:46 -07:00
Xi Ge
24f5ba741a Syntax: add Syntax support for property delegate attributes
rdar://50056605
2019-05-02 09:50:40 -07:00
Jordan Rose
1e5637f841 Merge pull request #24420 from jrose-apple/underpromise
[ModuleInterfaces] Warn when emitting an interface in unsupported scenarios
2019-05-02 08:59:07 -07:00
Arnold Schwaighofer
1330d129a8 Opaque archetypes specializer: Fix cast of nested types 2019-05-02 07:20:38 -07:00