Skip to content

Resolve conflicts with release/5.3 #1348

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 47 commits into from
Jul 2, 2020
Merged

Conversation

MaxDesiatov
Copy link

No description provided.

shahmishal and others added 30 commits June 22, 2020 15:51
Update release/5.3 branch for Xcode 12 beta
… closure

After trailing closure, we perform "Labeled trailing closure" completion
and fall back to other completion depending on the position.

If the completion happens at a newline position, it used to fallback to
global expression completion, but in type context, we should do override
completion instead.

Also, we didn't use to propagate 'hasCodeCompletion()' status properly.

rdar://problem/64650782
(cherry picked from commit f50b666)
Fixes <rdar://problem/64180813>.
Fixes <rdar://problem/64222181>.
Fixes <rdar://problem/60468458>.
Fixes <rdar://problem/55287757>.
Code completion always want to see implicit 'oldValue' with the correct
type. Return 'false' from 'SimpleDidSetRequest' in code completion
mode.

rdar://problem/64699286
(cherry picked from commit 21b9fc3)
…ar64699286

[5.3][CodeCompletion] Assume non-'isSimpleDidSet' in code completion
…ar64650782

[5.3][CodeCompletion] Fallback to nominal member completion after trailing closure
…r-incomplete-func-decl-5.3

[5.3][SourceKit/Indentation] Fix over-indent after function declaration with no param list or body.
When a function body has had a function builder applied to it, make
sure that we run all of the syntactic diagnostics for expressions and
statements within the body.

Fixes rdar://problem/64493626.
[5.3] test: xfail Driver/SourceRanges/range-lifecycle.swift
…-5.3

Revert "[Sema] Fix leak of implementation-only imported types in SPI signatures"
TypeContextInfo and ConformingMethodList

rdar://problem/64782333
(cherry picked from commit bbec1eb)
…nting relative to their first line.

doStuffWithList([
    firstItem
    .map { $0 }       // This line should be indented further.
    .append(\.foo),   // And so should this one.
    secondItem
])

Resolves rdar://problem/64834040
…yntactic-diags-5.3

[5.3] [Function builders] Run syntactic diagnostics for function bodies.
…pr-indentation-fix-5.3

[5.3][SourceKit/CodeFormat] Fix multi-line array literal elements not indenting relative to their first line.
'TypeContextInfo' and 'ConformingMethodList'

(cherry picked from commit 8307c6a)
…ndle compiler synthesized decls

We weren't printing memberwise inits, shorthand arguments (e.g. $0, $1), and
other implicit decls, so cursor info would give empty annotated decl and fully
annotated decl fields for them.

Resolves rdar://problem/58929991
BuilderClosureVisitor::visitPatternBindingDecl
…-shorthand-arguments-5.3

[5.3][SourceKit/CursorInfo] Still print implicit decls in cursorinfo to handle compiler synthesized decls
rintaro and others added 16 commits June 29, 2020 16:04
for 'ConformingMethodList' and 'TypeContextInfo'

(cherry picked from commit 33336df)
…sgen-failure

[5.3][Function Builders] Fix a function builder crash due to constraint generation failures
test: xfail Driver/loaded_module_trace_swiftinterface.swift
…mpletionlikereq-rdar64782333

[5.3][SourceKit] Enable ASTContext caching in other completion-like requests
Currently `generateInitPatternConstraints` assumes that all
patterns have types but it's not the case for patterns that
e.g. reference unknown types or have other structural issues.

Let's fail `generateInitPatternConstraints` if constraint
generation fails.

Resolves: rdar://problem/64157451
(cherry picked from commit caab4f4)
[5.3][CSGen] Handle incorrect patterns (e.g. referencing unknown types)
As a workaround for the issue where code completion fails to suggest
member completions for function builder closure parameters.

Added ConstraintSystem flag to force apply a solution even if there are
multiple viable solutions.

rdar://problem/64079439
…2641)

CopyForwarding attempts to enforce "normal" SIL address patterns using
asserts. This isn't a good strategy because it results in strange
crash diagnostics in release builds. Eventually, we should replace
this logic with a SIL address lifetime utility based on OSSA form and
enforced in the verifier.

Loosen one of these restrictions where we assume that a value
initialized with "copy_addr [initialization]" will be properly
destroyed. This assumption is violated when lowering
.int_fma_FPIEEE32, which knows that the type is trivial, so avoids
deinitialization.

The original SIL looks like this:

  copy_addr %src to [initialization] %dest : $*Float
  %fma = builtin "int_fma_FPIEEE32"(% : $Builtin.FPIEEE32, % : $Builtin.FPIEEE32, % : $Builtin.FPIEEE32) : $Builtin.FPIEEE32
  %result = struct $Float (%fma : $Builtin.FPIEEE32)
  store %result to %dest : $*Float

Fixes rdar://64671864.
…rceapply-rdar64079439

[5.3][CodeCompletion] Force apply a viable solution even if ambiguous
The effective access of an overridden declaration is subject to
escalation by -enable-testing. When this is flag is enabled, an
interface containing an internal-overriding-public declaration will
still print `override`. This is because the effective access of the base
of the override is formally internal but effectively public.

Instead, use the formal access scope of the overridden declaration to
compute its access relative to the override. While I'm here, catch the
case where the base declaration is `@usableFromInline` and therefore
*will* be printed in the interface. We treat these declarations as
effectively public for the purpose of printing `override`.

Resolves rdar://64969741
…tlang#32647)

This replaces the `count` comparison precondition with a limited index
offset, which converts the method from O(n) to O(k).
…ftlang#31979)

* Fix NULL deref for invalid mangled input (swiftlang#31878)

The `Qo` operator expects to consume a type name and a list (terminated with a `y` empty list marker) from the stack.  After popping the list, it doesn't check whether the stack is empty, so `$syQo` crashes (it pops down to the `y` then tries to pop again).

This PR just adds the obvious check to guard against this.

Resolves rdar://63128307

* Back out a bad merge
[5.3] Use Formal Access To Compute Override Elision Check
…3-merge

# Conflicts:
#	test/stdlib/simd.swift.gyb
@MaxDesiatov MaxDesiatov merged commit a970a73 into swiftwasm-release/5.3 Jul 2, 2020
@MaxDesiatov MaxDesiatov deleted the maxd/5.3-merge branch July 2, 2020 17:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.