forked from swiftlang/swift
-
Notifications
You must be signed in to change notification settings - Fork 28
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
[pull] swiftwasm from main #5391
Merged
Merged
Conversation
This file contains 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
…tion Resolves rdar://107638447
…ck for associated enum element types This ensures that we do not try to emit enums whose associated values come from dependent modules that don't have a C++ representation
…nction with the same C++ name
rdar://108163121
Treat the C++ interop modules similar to the Concurrency and StringProcessing modules, enabled through a top-level global flag. The flag now enables disabling the C++ interop modules when the standard library is built. Based on the original work by Egor Zhdan!
Unavailable decls cannot be overridden by available decls. This change improves the compiler diagnostics for this restriction in a few ways: - Duplicate diagnostics are suppressed for getters and setters inside property declarations that have already been diagnosed. - Diagnostics are suppressed for implicit accessors since they would typically duplicate diagnostics for the explicit accessors the implicit ones are derived from. - Decls inside unavailable a derived class are no longer incorrectly diagnosed.
Eliminate another circular reference through macro expansion mangling by adjusting the starting declaration context to ensure that it is from a suitable "outer" context. Fixes rdar://108511666.
They cause ambiguities with math functions from platform's libc
Thank you, Hamish, for the test case!
Expression macros ascribed to non-private contexts need private discriminators so they don't conflict with other uses of the same macro in other source files. Thank you, Richard, for noticing this omission!
The request returns the expanded buffer ID even if it failed to typecheck the expanded buffer. This makes refactoring 'Expand Macro' work regardless of the typechecking results. rdar://108530760
…unavailable-diagnostics Sema: Improve diagnostics for overrides of unavailable decls
Only fully resolved substitutions are eligible to be considered as conflicting, if holes are involved in any position that automatically disqualifies a generic parameter. Resolves: rdar://108534555 Resolves: swiftlang#63450
`SSAPrunedLiveness::invalidate` is used as though it reset the state of the instance it is called on. Clients then reuse the instance with the expectation that it has been reset. But since it has not been reset, this results in unexpected liveness results. rdar://108627366
…has package-name. This disallows building an interface file that imports such module which should be allowed since interface does not contain package symbols unless usableFromInline or inlinable. This change limits erroring only when building a .swift file. Resolves rdar://108633068
…that is far more common
…arsing This is needed to be able to perform code completion inside `@freestanding` and `@attached`.
…-completions [CodeCompletion] Suggest freestanding after @
…rivate-discriminator [Macros] Use private discriminators for expression macros
Print package-name in .private.swiftinterface only for better abstraction
…odifiers_in_operatordecl [Parser] Make parser aware of the unexpected attributes in operator declarations
Rather than requiring macro implementations to add required whitespace and indentation, basic format all macro expansions. Right now this uses the default four space indentation, we can consider having that inferred later. Macros can opt-out of automatic formatting by implementing `formatMode` and setting it to `.disabled`. Also moves the extra newlines before/after expansions to a new "Inline Macro" refactoring. Resolves rdar://107731047.
…argument label rdar://108163121
…structs inside global static initializers We missed converting such types inside static initializers of global variables. This results in ptrauth crashes when ptrauth is enabled. rdar://108165425
Tool selection is primarily done by checking the executable (= symlink) name. But sometimes (e.g. if the tool symlink is not there) it's useful to have an option for selecting the tool. The selection option (e.g. -sil-opt) must be the first argument of swift-frontend.
[SILOptimizer] Use BitfieldRef instead of invalidating SSAPrunedLiveness.
[interop][SwiftToCxx] do not expose enums with a protocol type associ…
[interop][SwiftToCxx] add additional type representation emission che…
[interop][SwiftToCxx] do not assert when emitting a public var and fu…
[interop] avoid importing math functions from the C++ standard library
…add accessors" This reverts commit ef7970b. We shouldn't need this.
Fixes rdar://108565923.
…ress LoadableByAddress: convert types of functions which are contained in structs inside global static initializers
…bservers When an accessor macro adds a non-observing accessor to a property, it subsumes the initializer. We had previously modeled this as removing the initializer, but doing so means that the initializer could not be used for type inference and was lost in the AST. Explicitly mark the initializer as "subsumed" here, and be more careful when querying the initializer to distinguish between "the initializer that was written" and "the initializer that will execute" in more places. This distinction already existed at the pattern-binding level, but not at the variable-declaration level. This is the proper fix for the circular reference issue described in rdar://108565923 (test case in the prior commit).
build: enable control over the C++ interop modules
driver: add swift-frontend options to select the tool to run
Limit loading error when importing a module built from interface with package-name
This is a revert of the workaround for creating debug info for error variables in b2109ab, while leaving the test added back then in place. The compiler is now emitting debug info for the error pattern binding as it's supposed to and after the recent migration to stricter debug scope generation, there are now situations where the variable added for the workaround and the correct one are in conflict. rdar://108576484
[stdlib] Adopt _pointerBitWidth conditional
Make sure we walk auxiliary declarations when gathering stored properties. This ensures that we will get any stored properties introduced by peer macros. Fixes rdar://108534298.
…uest-rdar108530760 [Macros] Requestify MacroExpansionExpr expansion
[Macros] Automatically format expanded macros
…x-decls Walk auxiliary declarations when gathering stored properties
[CSDiagnostics] Teach `diagnoseConflictingGenericArguments` about holes
…te-completions [CodeCompletion] Support completion for macro roles and the 'names:' argument label
Remove an obsolete workaround for error variables.
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]
Can you help keep this open source service alive? 💖 Please sponsor : )