forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 0
[pull] master from apple:master #27
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
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
…-inference Try to derive a type witness in a known conformance before attempting associated type inference
…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
- update the diagnostic error message - add educational notes
rdar://64844584
test: xfail Constraints/operator.swift
Instead of XFAILing whole `test/Constraints/operator.swift` let's adjust diagnostic responsible for flakiness.
[TypeChecker] NFC: Clarify flaky diagnostic XFAIL
CMake: Remove workaround fixed in CMake 2.8.4
Undent the code that was mis-indended leading to a warning with clang.
SourceKit: silence as `-Wmisleading-indent` warning (NFCI)
Copy out the result rather than form a dangling pointer. This fixes the incorrect usage that the compiler flags.
This simplifies the test pattern.
Use the Unix style path for the test.
SwiftPrivateThreadExtras: correct misuse of API
rdar://problem/64066210
Use the proper division operation as the test otherwise generates different patterns.
…457b84176753ff [ownership] Move the stdlib ome point to before global opt.
'TypeContextInfo' and 'ConformingMethodList'
test: unixise path for Parse.source_locs (NFCI)
test: unixise some paths in diagnostics tests (NFCI)
Attempt to properly quote the python interpreter path in the lit configuration. This was quoted in some places but not others. This attempts to homogenise the path quoting.
This change improves slightly the quality of the diagnostics and detects the use of local SPI types on public property with a default value.
test: make stdlib.NumericParsing Python 3 friendly
…d-arguments [SourceKit/CursorInfo] Still print implicit decls in cursorinfo to handle compiler synthesized decls
Move 'MetadataSections' from 'ImageInspectionElf.h' to SwiftShims
This adds support to `ClangImporter` to import C++ member function operators as static methods into Swift, which is part of SR-12748. The left-hand-side operand, which gets passed as the `this` pointer to the C++ function is represented as an additional first parameter in the Swift method. It gets mapped back in SILGen. Two of the tests are disabled on Windows because we can't yet call member functions correctly on Windows (SR-13129).
[SIL] NFC: Move #include of CanTypeVisitor.h
[SIL] NFC: Add more paranoia checks to SILType
…eric specialization tests behind a flag. The idea is that this will let me remove these assertions that were in place to make sure we were really conservative around specializing ownership code. For me to remove that I need to be able to actually test out this code (since I think there are some code paths where this will trigger in other parts of the compiler now). So to work out the kinks, I added a flag that allows for the generic specializer to process ownership code and translated most of the .sil test cases/fixed any bugs that I found. This hopefully will expose anything that is missing. NOTE: I have not enabled the generic specializer running in ownership in the pipeline. This is just a step in that direction by adding tests/etc.
Array literals only need to be finalized, if the array is really allocated. In case of zero elements, no allocation is done, but the empty-array singleton is used. "Finalization" means to emit an end_cow_mutation instruction on the array. As the empty-array singleton is a read-only and shared object, it's not legal to do a end_cow_mutation on it.
…builds. This was blocked by an LLDB problem, which is now fixed (swiftlang/llvm-project#1333)
…eralKeyPath)" This reinstates commit d7d829c with a fix for C tail-allocated arrays. Replace a call of the getter of AnyKeyPath._storedInlineOffset with a "constant" offset, in case of a keypath literal. "Constant" offset means a series of struct_element_addr and tuple_element_addr instructions with a 0-pointer as base address. These instructions can then be lowered to "real" constants in IRGen for concrete types, or to metatype offset lookups for generic or resilient types. Replace: %kp = keypath ... %offset = apply %_storedInlineOffset_method(%kp) with: %zero = integer_literal $Builtin.Word, 0 %null_ptr = unchecked_trivial_bit_cast %zero to $Builtin.RawPointer %null_addr = pointer_to_address %null_ptr %projected_addr = struct_element_addr %null_addr ... // other address projections %offset_ptr = address_to_pointer %projected_addr %offset_builtin_int = unchecked_trivial_bit_cast %offset_ptr %offset_int = struct $Int (%offset_builtin_int) %offset = enum $Optional<Int>, #Optional.some!enumelt, %offset_int rdar://problem/53309403
stdlib: enable runtime checking for COW support by default in assert builds.
Attempt to appease the python linter
Reinstate "SILCombine: Constant-fold MemoryLayout<T>.offset(of: \.literalKeyPath)"
test: make `validate_parse` more python3 friendly
…7c43d7b3a743d5 [ownership] Loosen restrictions around what we specialize and add generic specialization tests behind a flag.
Co-authored-by: Olivier Halligon <[email protected]>
Co-authored-by: Xiaodi Wu <[email protected]>
Co-authored-by: Xiaodi Wu <[email protected]>
[master] Apple Silicon support
This facilitates debugging.
This facilitates debugging.
Improve `@derivative` and `@transpose` type-checking diagnostics for resolving the referenced original declaration. Previously, an error was produced on one invalid candidate at the attribute's location. This did not indicate the invalid candidate's location or the total number of invalid candidates. Now: - Diagnostic notes are produced on all invalid candidates at their location. Invalid candidates' descriptive declaration kind are shown for clarity. - Derivative registration for protocol requirements (not yet supported, TF-982) now has a clear, dedicated diagnostic. - The "original declaration type mismatch" diagnostic is improved for expected original function types with generic signatures. The message now accurately reads "candidate does not have type equal to *or less constrained than* ...", instead of "candidate does not have expected type ...". Resolves SR-13150. Paves the way for future diagnostic improvements: SR-13151, SR-13152.
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.
See Commits and Changes for more details.
Created by
pull[bot]. Want to support this open source service? Please star it : )