Skip to content

Merge master 2020-09-23 #1804

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 31 commits into from
Sep 23, 2020
Merged

Conversation

kateinoigakukun
Copy link
Member

No description provided.

varungandhi-apple and others added 30 commits September 6, 2020 20:58
This patch includes a large number of changes to make sure that:
1. When ExtInfo values are created, we store a ClangTypeInfo if applicable.
2. We reduce dependence on storing SIL representations in ASTExtInfo values.
3. Reduce places where we sloppily create ASTExtInfo values which should
   store a Clang type but don't. In certain places, this is unavoidable;
   see [NOTE: ExtInfo-Clang-type-invariant].

Ideally, we would check that the appropriate SILExtInfo does always store
a ClangTypeInfo. However, the presence of the HasClangFunctionTypes option
means that we would need to condition that assertion based on a dynamic check.
Plumbing the setting down to SILExtInfoBuilder's checkInvariants would be too
much work. So we weaken the check for now; we should strengthen it once we
"turn on" HasClangFunctionTypes and remove the dynamic feature switch.
…ituations

If there are multiple overloads and all of them require explicit
base type for a member reference, let's diagnose it as a single
error since the problem is the same across the overload choices:

```swift
func foo<T>(_: T, defaultT: T? = nil) {}
func foo<U>(_: U, defaultU: U? = nil) {}

foo(.bar)
```

In this example there is not enough contextual information to
determine base type of `.bar` reference and hence both `foo`
overloads are a considered valid solutions until explicitly set
base type disambiguates them.

Resolves: rdar://problem/66891544
This was happening in the error recovery path when parsing accessors
on a pattern binding declaration that does not bind any variables, eg

let _: Int { 0 }
…pbds

ASTScope: Clean up handling of PatternBindingDecls and AccessorDecls
…pes-in-sil-retry

Propagate Clang function types through SIL
With this option enabled, the dependency scanner gathers all import statements in source files of the main module (non-transitive) and outputs a list of imported modules.
This will be used by build systems and the swift-driver as a way to avoid redundant re-scanning in incremental contexts.
[Diagnostics] Allow "unknown base" fix to be diagnosed in ambiguity situ…
[SR-10251] Add test case for a bug that's already been fixed.
[Dependency Scanner] Add option to execute an import prescan
[NFC] Remove a typealias from SILInstruction.h that's unused in noasserts builds.
@kateinoigakukun kateinoigakukun merged commit 678bb55 into swiftwasm Sep 23, 2020
@kateinoigakukun kateinoigakukun deleted the katei/merge-master-2020-09-23 branch October 30, 2020 00:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.