Commit Graph

24822 Commits

Author SHA1 Message Date
swift_jenkins
f919e12436 Merge remote-tracking branch 'origin/master' into master-next 2019-11-17 15:40:26 -08:00
Michael Gottesman
269762eee3 [ownership] Enable ownership lowering /after/ the diagnostic passes.
I also updated the last group of straggling tests.
2019-11-17 11:34:43 -08:00
swift_jenkins
3c0be18594 Merge remote-tracking branch 'origin/master' into master-next 2019-11-17 07:21:07 -08:00
Michael Gottesman
6759d82dad Revert "Revert "[pmo] Fix load [copy] like I fixed load_borrow.""
This reverts commit 2b8e266694.

That reapplies 7623367208.
2019-11-17 03:48:00 -08:00
David Ungar
0a0d22abab fmt 2019-11-16 23:54:52 -08:00
David Ungar
a6bf84e20b refactoring WIP unfmt 2019-11-16 23:17:37 -08:00
David Ungar
3433bf8cef comparision WIP 2019-11-16 21:39:19 -08:00
swift_jenkins
48eb5d574e Merge remote-tracking branch 'origin/master' into master-next 2019-11-16 18:00:20 -08:00
Brent Royal-Gordon
2b8e266694 Revert "[pmo] Fix load [copy] like I fixed load_borrow." 2019-11-16 15:54:12 -08:00
David Ungar
0b00afea7e pass compilation in to loadAllInfo in prep to do removed files 2019-11-16 08:52:11 -08:00
swift_jenkins
32c90f9c53 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 21:39:51 -08:00
Michael Gottesman
7623367208 Merge pull request #28295 from gottesmm/pr-5dfaf35e4af5aa2b6e46e3db704bc973cd4e6d53
[pmo] Fix load [copy] like I fixed load_borrow.
2019-11-15 21:37:08 -08:00
swift_jenkins
d3729b5b76 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 20:19:52 -08:00
Harlan Haskins
26b20ef198 Merge pull request #28227 from keith/ks/remove-frozen-warning
Remove warning about @frozen without library evolution
2019-11-15 20:14:24 -08:00
Nathan Hawes
125c1fb03e [Sema] Avoid needing the typechecker for the IsStaticRequest request
It was being used purely to get the name of the type context for a diagnostic
message. SourceKit's syntactic-only requests were hitting an assertion when
this diagnostic was triggered because they don't set up a type checker.
2019-11-15 18:10:22 -08:00
David Ungar
c913ffa40e Tests the source-comparator 2019-11-15 17:26:37 -08:00
Jonas Devlieghere
2ab36e22f9 Adjust for upstream LLVM changes 2019-11-15 17:08:49 -08:00
Marc Rasi
e5e25a6c71 Merge branch 'master' of github.com:apple/swift into ast-nondiff 2019-11-15 16:41:30 -08:00
Marc Rasi
1058a38abd clang-format 2019-11-15 16:37:29 -08:00
Marc Rasi
6e559ab8fa rename nondiff => noDerivative 2019-11-15 16:36:26 -08:00
Hamish Knight
2853615880 Add type to package inputs to UnqualifiedLookupRequest
This allows us use an OptionSet parameter for
the request (as currently we can't directly use it
as a parameter due to not having an == definition
for it). It also allows us to regain default
arguments for the source loc and flag parameters.
2019-11-15 16:35:14 -08:00
swift_jenkins
b9f998ffa4 Merge remote-tracking branch 'origin/master' into master-next 2019-11-15 15:56:48 -08:00
Michael Gottesman
b8a1ecdb3f [stlextras] Add overloads for binary_search that take containers. 2019-11-15 15:16:58 -08:00
David Ungar
692ca29bd2 Dump both sides' changes for testing. 2019-11-15 14:53:34 -08:00
Hamish Knight
acbf0b264c Remove NumUnqualifiedLookup counter
We now have an equivalent counter for
UnqualifiedLookupRequest.
2019-11-15 14:25:42 -08:00
Hamish Knight
e8c30ca1b7 Remove UnqualifiedLookup
Now that we have UnqualifiedLookupRequest, this
class no longer serves much of a purpose. Inline
its constructor logic into the request.
2019-11-15 14:25:42 -08:00
Hamish Knight
3aa7158d6c Switch UnqualifiedLookup callers over to UnqualifiedLookupRequest 2019-11-15 14:25:42 -08:00
Hamish Knight
633de0241b Add UnqualifiedLookupRequest
This request performs raw unqualified lookup,
and will be used to replace the UnqualifiedLookup
type.
2019-11-15 14:25:42 -08:00
Hamish Knight
185c265ef6 NFC: Move LookupResult from Sema to Name Lookup
This will be used as the result type for the
unqualified lookup request.
2019-11-15 14:25:41 -08:00
swift-ci
495917e677 Merge pull request #28291 from gottesmm/pr-bd9748e1a8090958d45317cc39774e603a709809 2019-11-15 14:20:54 -08:00
Michael Gottesman
d0219b6f7a [stlextras] Add overloads for binary_search that take containers. 2019-11-15 12:57:39 -08:00
Hamish Knight
6d6feb60de [CSDiagnostics] Support static "Type." fix-it
Check whether we found a static property, and if
so, suggest inserting "Type." instead of "self.".

Resolves SR-11788.
2019-11-15 11:12:12 -08:00
David Ungar
b5afac3c08 msgs unfmt 2019-11-15 10:30:55 -08:00
Andrew Trick
9a71f235d7 Merge pull request #27444 from atrick/fix-sink-address
Generalize and fix SinkAddressProjections.
2019-11-15 09:54:04 -08:00
Doug Gregor
0b6ef0d4d1 Merge pull request #28276 from DougGregor/constraint-solver-expr-ctor
[Constraint solver] Remove expression from the constructor.
2019-11-14 22:48:07 -08:00
Doug Gregor
24b47b5673 [Constraint solver] Sink Expr::getPreorderIndexMap() into its client. 2019-11-14 20:33:00 -08:00
Xi Ge
2fbb0c1170 Merge pull request #28272 from nkcsgexi/let-var-is-file
ABI/API checker: don't complain about changing var to let or vice versa
2019-11-14 18:22:21 -08:00
Marc Rasi
f5677cbe42 add @nondiff to AnyFunctionType params 2019-11-14 16:49:22 -08:00
Andrew Trick
38c29e231e Generalize and fix SinkAddressProjections.
Fixes a potential real bug in the case that SinkAddressProjections moves
projections without notifying SimplifyCFG of the change. This could
fail to update Analyses (probably won't break anything in practice).

Introduce SILInstruction::isPure. Among other things, this can tell
you if it's safe to duplicate instructions at their
uses. SinkAddressProjections should check this before sinking uses. I
couldn't find a way to expose this as a real bug, but it is a
theoretical bug.

Add the SinkAddressProjections functionality to the BasicBlockCloner
utility. Enable address projection sinking for all BasicBlockCloner
clients (the four different kinds of jump-threading that use it). This
brings the compiler much closer to banning all address phis.

The "bugs" were originally introduced a week ago here:

commit f22371bf0b (fork/fix-address-phi, fix-address-phi)
Author: Andrew Trick <atrick@apple.com>
Date:   Tue Sep 17 16:45:51 2019

    Add SIL SinkAddressProjections utility to avoid address phis.

    Enable this utility during jump-threading in SimplifyCFG.

    Ultimately, the SIL verifier should prevent all address-phis and we'll
    need to use this utility in a few more places.

    Fixes <rdar://problem/55320867> SIL verification failed: Unknown
    formal access pattern: storage
2019-11-14 16:11:00 -08:00
Doug Gregor
01f203a54d [Constraint system] Sink Expr::getDepthMap() into its one client.
NFC. It'll be easier to refactor this when it's not an API on Expr.
2019-11-14 15:02:58 -08:00
Hamish Knight
1be22c5d48 [Sema] Requestify default argument type checking (#27756)
[Sema] Requestify default argument type checking
2019-11-14 14:09:03 -08:00
Xi Ge
c8ce5b304c ABI/API checker: don't complain about changing var to let or vice versa
The tool diagnoses the removal of getter/setter for properties, so complaining about the keyword change can be redundant.

rdar://problem/57201030
2019-11-14 13:59:26 -08:00
Holly Borla
5bb50068ac Merge pull request #28243 from hborla/missing-generic-args-refactoring
[ConstraintSystem] Missing generic args/hole refactoring
2019-11-14 13:48:40 -08:00
swift-ci
29cc760ce5 Merge pull request #27569 from Azoy/wheres-my-type-metadata 2019-11-14 12:58:28 -08:00
Hamish Knight
3c05acac15 Address review feedback
Rename getDefaultArgumentInitContextCached,
and have it return an Optional<Initializer *>.
2019-11-14 12:51:04 -08:00
Doug Gregor
ec70b62d5e Merge pull request #28107 from allevato/emit-pcm
Add driver flag to precompile Swift-compatible explicit Clang modules.
2019-11-14 10:25:53 -08:00
Robert Widmann
3975e72706 Merge pull request #28246 from CodaFi/contextual-equivalence
Drop the TopLevelContext from the high-level type checker entrypoints
2019-11-13 19:58:57 -08:00
swift-ci
3b50749907 Merge pull request #28247 from gmittert/ShiftingBlame 2019-11-13 19:22:33 -08:00
Dan Liew
5446d333b8 Merge pull request #28126 from danliew-apple/rdar_56346688
[Sanitizers] Add Driver/Frontend option to enable sanitizer instrumentation that supports error recovery
2019-11-13 17:19:52 -08:00
Gwen Mittertreiner
5f3a6af0e5 Explicitly Specify a 64bit Shift to Fix Warning
Explicitly doing a 64bit shift silences the otherwise noisy warning:
```
[1548/1735] Building CXX object
tools\swift\lib\Sema\CMakeFiles\swiftSema.dir\NameBinding.cpp.obj

S:\toolchain\swift\include\swift/AST/IndexSubset.h(96): warning C4334:
'<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit
shift intended?)

S:\toolchain\swift\include\swift/AST/IndexSubset.h(184): warning C4334:
'<<': result of 32-bit shift implicitly converted to 64 bits (was 64-bit
shift intended?)
```
2019-11-13 15:59:27 -08:00