forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 30
Resolve conflicts with master #1252
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
+1,280
−590
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…r fix diagnostics have failed If there are multiple solutions with fixes, let's not try to rank them based on overload choices because doing so would filter out viable candidates.
Refactor `diagnoseAmbiguityWithFixes` as follows: - Aggregate all of the available fixes based on callee locator; - For each ambiguous overload match aggregated fixes and diagnose; - Discard all of the fixes which have been already considered as part of overload diagnostics; - Diagnose remaining (uniqued based on kind + locator) fixes iff they appear in all of the solutions.
…eAmbiguityWithFixes`
…irements If there is a conditional requirement failure associated with member/function reference used in a call let's increase a score of a fix for such failure because it renders member/function unreachable in current context or with a given set of arguments.
…ssion pattern use
…nose ambiguity with fixes
…t specially If aggregate fix (based on callee locator) differs only in picked overload choices, let's diagnose that via `diagnoseForAmbiguity` associated with a particular fix kind all solutions share, that would produce a tailored diagnostic instead of the most general one.
…pe before diagnosing ambiguity Instead of requiring sub-classes of `ContextualMismatch` to implement `diagnoseForAmbiguity` let's implement it directly on `ContextualMismatch` itself and check whether all of the aggregated fixes have same types on both sides and if so, diagnose as-if it was a single fix.
…Ambiguity` For cases like this: ```swift struct X {} struct Y {} func overloaded<T>(_ value: T) -> T { value } func overloaded<T>(_ value: T) -> Int { 0 } func test(x: inout X, y: Y) { x = overloaded(y) } ``` Solver would record a `IgnoreAssignmentDestinationType` fix per overload, `diagnoseForAmbiguity` could be used to properly diagnose ambiguity cases like that.
…with a known foundation type Just like we already do for stdlib types, extend impact of missing conformances on _known_ foundation types because it's unlikely to be a valid suggestion to extend a foundation type with a new conformance.
…alid loc) or AST node
…ment positions If parameter has a function type and no argument overload choices match let's diagnose that specifically. Resolves: [SR-12689](https://bugs.swift.org/browse/SR-12689) Resolves: rdar://problem/62481592
This test requires ObjC interop, ensure that we explicitly enable the ObjC interop.
…is pattern match
These currently warn for being unused
Previously the path to covered files in the __LLVM_COV / __llvm_covmap section were absolute. This made remote builds with coverage information difficult because all machines would have to have the same build root. This change uses the values for `-coverage-prefix-map` to remap files in the coverage info to relative paths. These paths work correctly with llvm-cov when it is run from the same source directory as the compilation, or from a different directory using the `-path-equivalence` argument. This is analogous to this change in clang https://reviews.llvm.org/D81122
when falling back to "postfix expression completion" after labeled trailing closure completion. rdar://problem/64176730
Building each Swift module explicitly requires dependency PCMs to be built with the exactly same deployment target version. This means we may need to build a Clang module multiple times with different target triples. This patch removes the -target arguments from the reported PCM build arguments and inserts extraPcmArgs fields to each Swift module. swift-driver can combine the generic PCM arguments with these extra arguments to get the command suitable for building a PCM specifically for that loading Swift module.
These tests are duplicates of those from swift-driver.
…alization. We always lower ownership now after the diagnostic passes (what this option actually controlled). So remove it. NFC.
…us-with-fixes [ConstraintSystem] Overhaul ambiguity diagnostics
Remove unused variables
test: enable ObjC interop for test which requires it
…xfallback-rdar64176730 [CodeCompletion] Typecheck without CodeCompletionExpr
wrappers, equate the former wrappedValue type with the current wrapper type rather than generating value member constraints.
DependencyScanner: add a new extraPcmArgs field for each Swift module
…-C interoperability (swiftlang#32374)
There's no reason clients need to be able to access this data directly. It obscures where module loading is actually happening, and makes it too easy to accidentally register a module with the wrong identifier in the context. Hide the registration operations behind opaque accessors.
…cit-sdk-mismatch [Driver tests] Be explicit when we don't care about SDK/target mismatches
Temporarily disable dynamic_lookup.swift for non-macOS
…be97d25c2a159a16736d090 [ownership] Remove dead option: enable-ownership-stripping-after-serialization.
…sition-inference [Property Wrappers] Adjust composed property wrapper constraint generation
…etVector This preserves insertion order.
We should allow an associated type's default to reference the same associated type with a base other than 'Self'. Note that it now becomes easier to defeat this check, but it was never air-tight anyway -- for example, you could have a cycle of length two if each associated type's default was the other associated type. This is fine, because this check is purely 'cosmetic'; nothing goes really wrong if you have a cycle here, except that the diagnostic shifts from the declaration of the protocol to the conforming type. Fixes <rdar://problem/62355224>.
…pattern-metadata-on-flag [Runtime] Scribble on metadata allocations.
…nism-fix Dependencies: Change SourceFileDepGraphNode::defsIDependUpon into a SetVector
…he-rain-gets-in Build Module Interfaces in WMO
[NFC] Hide LoadedModules From Clients of ASTContext
…ines Fix Windows CR-LF detection in libMarkup.
Re-name the file "foo.h" in the SILOptimizer inputs to "TypesWithUserProvidedDestructor.h" which better describes its purpose (to define types with user provided destructors).
…default-cycle Sema: Relax associated type default circularity check
…merge # Conflicts: # test/Driver/infer-simulator.swift # test/Driver/linker.swift # test/Driver/profiling.swift # test/Driver/sanitizers.swift
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.