Commit Graph

39091 Commits

Author SHA1 Message Date
Holly Borla
66e85721cb Merge pull request #30807 from hborla/property-wrapper-refactoring
[Property Wrappers] Refactor property wrappers so the synthesized backing init is only type checked once
2020-04-14 10:48:22 -07:00
AG
f9610de25b Merge pull request #31000 from bitjammer/acgarland/rdar-61178480-indirect-default-impls
[SymbolGraph] Look at inherited protocols for default implementations
2020-04-14 09:18:15 -07:00
Kuba Mracek
9fc98bf1d8 Add a test for a compiler crasher with -O -whole-module-optimization -sanitize=address 2020-04-13 22:22:10 -07:00
Robert Widmann
dc122a3d6d Merge pull request #30999 from CodaFi/mystery-flavored-cereal
Tighten-up a Foundation Deserialization Test
2020-04-13 22:08:23 -07:00
Doug Gregor
674490aba5 Merge pull request #30944 from DougGregor/import-module-for-empty-extensions
Revert "[PrintAsObjC] Don't include the module for empty extensions"
2020-04-13 21:14:08 -07:00
Holly Borla
48b6bcd869 Merge pull request #31002 from hborla/property-wrapper-contextual-type
[Property Wrappers] Use the outermost wrapper attribute type as the contextual type for property wrapper initialization
2020-04-13 20:38:43 -07:00
Holly Borla
df7735e545 [Property Wrappers] Use the outermost wrapper attribute type as the
contextual type for property wrapper initialization
2020-04-13 18:17:40 -07:00
AG
21eb60fc3c Merge pull request #30998 from bitjammer/acgarland/rdar-60963924-ignore-some-self-reqs
[SymbolGraph] Ignore some Self requirements
2020-04-13 15:48:27 -07:00
Ashley Garland
72dbdb097d [SymbolGraph] Look at inherited protocols for default implementations
rdar://61178480
2020-04-13 15:47:46 -07:00
Robert Widmann
86fa2f7ef9 Tighten-up a Foundation Deserialization Test
CocoaError.Code.fileReadUnknown conflicts with the CHECK-NOT line here.
We should be checking more specifically for UnknownBlock and UnknownCode
anyways.

rdar://53284293
2020-04-13 13:59:55 -07:00
Doug Gregor
091f987e28 Revert "[PrintAsObjC] Test that we don't leak extended implementationOnly types"
This reverts commit 4e8867e021.
2020-04-13 13:58:07 -07:00
swift-ci
9a0efcac2a Merge pull request #30548 from AnthonyLatsis/sr-7855 2020-04-13 13:20:27 -07:00
Ashley Garland
06d1d502a1 [SymbolGraph] Ignore some Self requirements
To ease the burden on the client, ignore some generic requirements involving
Self. For example, `Self: P` where we already know that `Self` conforms to `P`.

An example case:

```
public struct S: Equatable {
  public static func ==(lhs: S, rhs: S) -> Bool { ... }
}
```

`!=` is defined in terms of `Self` and the default implementation has a `Self:
Equatable`. For the purposes of documentation, it's not necessary to specify
that again on the page of documentation for `!=`.

rdar://60963924
2020-04-13 13:17:33 -07:00
Nathan Hawes
6f50aa4957 Merge pull request #30891 from nathawes/indent-enum-case-decl
[SourceKit/CodeFormat] Column-align enum element decls and the items in their parameter lists.
2020-04-13 12:08:05 -07:00
Nathan Hawes
b3b7aa8ecf Merge pull request #30964 from nathawes/syntactic-rename-for-callAsFunction
[IDE][Refactoring] Handle 'callAsFunction' specially in syntactic rename
2020-04-13 11:36:53 -07:00
Nathan Hawes
e03e130f6a Merge pull request #30989 from CodaFi/of-no-avail
[Index][SR-9567] Allow unavailable decls to be walked
2020-04-13 11:26:54 -07:00
marcrasi
99356cd9f4 [AutoDiff upstream] add more differentiation tests (#30933) 2020-04-13 09:40:45 -07:00
Bruno Rocha
160eb6cfd8 Update index test response to cover unavailable calls 2020-04-12 19:18:47 -07:00
Slava Pestov
ab45d517d5 Merge pull request #29931 from theblixguy/fix/SR-12178
[Typechecker] Fix _modify for wrapped properties with observers
2020-04-12 22:11:10 -04:00
Nathan Hawes
bce68fa4e5 [IDE][Refactoring] Handle 'callAsFunction' specially in syntactic rename.
This change makes us treat it exactly as we do 'init'. We don't allow renaming the base name,
and don't fail if the basename doesn't match for calls.

Also:
  - explicit init calls/references like `MyType.init(42)` are now reported with
    'init' as a keywordBase range, rather than nothing.
  - cursor info no longer reports rename as available on init/callAsFunction
    calls without arguments, as there's nothing to rename in that case.
  - Improved detection of when a referenced function is a call (rather than
    reference) across syntactic rename, cursor-info, and indexing.

Resolves rdar://problem/60340429
2020-04-12 17:14:15 -07:00
Robert Widmann
22b0526917 Merge pull request #30082 from 3405691582/OpenBSD_Port_Build
Build system recognizes OpenBSD.
2020-04-12 09:30:17 -07:00
Xi Ge
0c9c901c94 Merge pull request #30983 from nkcsgexi/61644469
ABI-checker: diagnose missing available attributes for members of extensions instead of the extensions themselves
2020-04-11 20:59:05 -07:00
Xi Ge
140a151de1 ABI-checker: diagnose missing available attributes for members of extensions instead of the extensions themselves
rdar://61644469
2020-04-11 19:00:49 -07:00
Daniel Rodríguez Troitiño
c02fa2dd45 [android] Add check for __aarch64__ besides __arm__ and __arm64__.
The spelling __arm64__ seems to be an Apple-only thing, which is not
provided when targetting Android, and probably other AArch64 Linuxes.
2020-04-11 17:30:16 -07:00
Saleem Abdulrasool
f7a65f8e6a Merge pull request #30961 from texasmichelle/change_filename
Add .gyb extension to filename
2020-04-11 16:02:51 -07:00
Saleem Abdulrasool
f9a14c0277 test: speculative fix after #30965
apple/swift#30965 broke the Windows test suite, this speculatively fixes
it.
2020-04-11 11:28:18 -07:00
David Ungar
4c4bf088dc Merge pull request #30968 from davidungar/rdar-61461187-tolerate-nonempty-brace-in-brace
[ASTScope lookup] Tolerate non-empty braces in braces
2020-04-11 10:12:03 -07:00
Slava Pestov
1af01edbf0 Merge pull request #30965 from slavapestov/enable-dynamic-replacement-vs-library-evolution
Enable dynamic replacement with library evolution
2020-04-11 01:39:09 -04:00
eeckstein
628bf7beae Merge pull request #30957 from eeckstein/fix-large-string-arrays
Several compile time fixes related to large string arrays.
2020-04-11 06:55:00 +02:00
Slava Pestov
365f0c7af5 Merge pull request #30861 from slavapestov/outdated-fixme
IRGen: Type reconstruction supports opaque result types now
2020-04-10 23:32:43 -04:00
swift-ci
d02c1400a9 Merge pull request #30899 from nathawes/improve-enum-case-trailing-comma-recovery 2020-04-10 20:30:42 -07:00
Slava Pestov
23cac673ca IRGen: Enable dynamic replacement with library evolution
It looks like the only thing that fails is the linkage computation
for the dynamic replacement key of class methods. Even though
methods have hidden linkage to prevent them from being directly
referenced from outside a resilient module, we need to ensure
the dynamic replacement key is visible.

Fixes <rdar://problem/58457716>.
2020-04-10 22:53:36 -04:00
Rintaro Ishizaki
14fbb8286b Merge pull request #29854 from rintaro/ide-completion-keypathfunc-paramty
[CodeCompletion] Use AnyFunctionType::Param::getParameterType()
2020-04-10 19:26:15 -07:00
Nathan Hawes
13d5a8addb Merge pull request #30870 from nathawes/mutiple-catch-pattern-indentation
[SourceKit/CodeFormat] Column-align multiple patterns in catch clauses
2020-04-10 19:07:44 -07:00
Xi Ge
bae31467a3 Merge pull request #30962 from nkcsgexi/44777994
AST: making `export: true` in @_specialized attribute a no-operation
2020-04-10 18:39:22 -07:00
David Ungar
a2a60e0b18 Test nonempty-brace-in-brace 2020-04-10 18:33:06 -07:00
Saleem Abdulrasool
3a8eea4d58 Merge pull request #30907 from compnerd/autodiff-fix
test: repair the AutoDiff test on Windows
2020-04-10 18:33:01 -07:00
Nathan Hawes
8edeab75ce [Parse] Don't drop the EnumCaseDecl when it has a trailing comma.
This meant we weren't producing sema diagnostics for the case, and it didn’t
get full syntactic/semantic highlighting or indentation.

enum CasesWithMissingElement {
  case a(Int, String),
  case b(Int, String),
}

Resolves rdar://problem/61476844
2020-04-10 18:22:33 -07:00
Xi Ge
435d13496e AST: making export: true in @_specialized attribute a no-operation
The client code doesn't actually call into these specialized functions even
though they have public linkage. This could lead to TBD verification failure
shown in rdar://44777994.

This patch also warns users' codebase when `export: true` is specified.
2020-04-10 16:52:22 -07:00
Michael Ilseman
c1ab69e2db Merge pull request #30729 from milseman/merge_me_if_available
[string] String(decoding:as:) fast path for withContiguousStorageIfAvailable
2020-04-10 16:10:06 -07:00
Rintaro Ishizaki
315f65f962 [CodeCompletion] Use AnyFunctionType::Param::getParameterType()
instead of getOldType() in KeyPath as funtions completion.
Also, don't think keypath's are convertible to functions that receives
variadic parameters.
2020-04-10 15:55:32 -07:00
Slava Pestov
120840e092 Fix formatting nits in test/Interpreter/dynamic_replacement.swift 2020-04-10 18:45:07 -04:00
Slava Pestov
dd271cd089 Add test cases for initializer replacement to test/Interpreter/dynamic_replacement.swift 2020-04-10 18:45:07 -04:00
Artem Chikin
e3ce6f7b7e Merge pull request #30939 from artemcm/ImplOnlyPropertyWrappers
[Sema] Diagnose use of implementation-only property wrappers
2020-04-10 15:12:41 -07:00
Saleem Abdulrasool
83183f465f Merge pull request #30950 from compnerd/no-fp80
AutoDiff: disable the test cases for FP80
2020-04-10 15:09:05 -07:00
Saleem Abdulrasool
abd4b12d21 Merge pull request #30951 from compnerd/cross-module-differentiation-win
AutoDiff: repair the cross-module-differentiation on Windows
2020-04-10 14:42:48 -07:00
Michelle Casbon
1c5eaed84d Add .gyb extension to filename 2020-04-10 21:22:01 +00:00
Suyash Srijan
4688f4de64 [Test] Add a SILGen test to make sure the observers are correctly called 2020-04-10 21:32:28 +01:00
Hamish Knight
a61223a255 [CS] Visit all fixed bindings for constraint re-activation (#30886)
[CS] Visit all fixed bindings for constraint re-activation
2020-04-10 12:27:47 -07:00
Dan Zheng
486e667904 [AutoDiff] Support direct init reference differentiation. (#30946)
Support `@differentiable` function conversion for `init` references, in
addition to `func` references and literal closures. Minor usability improvement.

Resolves SR-12562.
2020-04-10 12:23:19 -07:00