Holly Borla
8091744296
Merge pull request #67428 from hborla/dependent-type-pack-syntax
...
[Type Resolution] Only allow `each` applied directly to a type parameter pack.
2023-07-20 20:12:32 -07:00
swift-ci
7741409f8e
Merge pull request #67075 from beccadax/kinder-diagnostics
...
Improve DiagnosticEngine's handling of ValueDecl arguments
2023-07-20 18:26:14 -07:00
swift-ci
c3c84d3625
Merge pull request #67421 from JTurcotti/more-diags
...
[SendNonSendable] Improve diagnostics and fix bugs
2023-07-20 16:56:56 -07:00
Holly Borla
7b586d20cc
[Type Resolution] Only allow each applied directly to a type parameter pack.
2023-07-20 15:29:53 -07:00
Becca Royal-Gordon
fe6753485f
[NFC] Adopt new diagnostic features across Sema
2023-07-20 15:23:47 -07:00
jturcotti
853ef7cf3c
fix bugs that present themselves when handling multiarg and varargs functions, including adding better debug dump methods
2023-07-20 14:01:08 -07:00
Sophia Poirier
60c579c001
Merge pull request #67415 from sophiapoirier/remove-TupleType-isSingleUnlabeledPackExpansion
...
[ConstraintSystem] remove TupleType::isSingleUnlabeledPackExpansion in favor of constraints::getPatternTypeOfSingleUnlabeledPackExpansionTuple
2023-07-20 09:43:14 -07:00
Holly Borla
f76783d619
Merge pull request #67405 from hborla/enable-extension-macros
...
[Macros] Remove the `ExtensionMacros` experimental feature flag.
2023-07-19 17:59:21 -07:00
jturcotti
a83d7aa39c
improve diagnostics about data races; highlight the individual expressions being sent and accessed as precisely as possible, and include information about specific non-sendable types and isolation crossings
2023-07-19 17:27:16 -07:00
Sophia Poirier
8173c721eb
[ConstraintSystem] remove TupleType::isSingleUnlabeledPackExpansion in favor of constraints::getPatternTypeOfSingleUnlabeledPackExpansionTuple
2023-07-19 15:10:40 -07:00
Steven Wu
67e919f632
Merge pull request #67229 from cachemeifyoucan/eng/PR-dep-scan-avoid-repeated-cmd-update
...
[DependencyScan] Prevent command-line flags added again on re-scan
2023-07-19 13:44:38 -07:00
Becca Royal-Gordon
9c6b3bb6ff
Adopt %kind in diag::objc_overriding_objc_decl
...
Slightly alters wording of a diagnostic.
2023-07-19 13:08:13 -07:00
Becca Royal-Gordon
325ab9118e
[NFC] Adopt new features in availability diagnostics
...
Allows the removal of a helper function.
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
1d6b041e58
Reword @objcImpl diagnostics to avoid “an”
...
…and also adopt new DiagnosticEngine features.
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
fca140211d
Adopt warnUntilSwiftVersion for diag::witness_not_usable_from_inline_warn
...
This changes the wording of some diagnostics in Swift 4.2 and Swift 4 modes.
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
b4855aee1f
Adopt ValueDecl in autodiff diagnostics
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
025728f568
Adopt ValueDecl for invalid redeclaration errors
...
Causes slight changes to notes on certain `init`s.
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
09e20776cb
Remove diag::descriptive_decl_declared_here
...
It was used in one place to handle accessors, which happily is no longer necessary.
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
1b81c3de7b
[NFC] Adopt ValueDecl * for decl_declared_here
2023-07-19 13:08:12 -07:00
Becca Royal-Gordon
fc2c66f674
[NFC] Adopt %kind for Sema ValueDecl diagnostics
2023-07-19 13:08:11 -07:00
Becca Royal-Gordon
84592b8f8e
Adopt %kind in Sendable checking diagnostic
...
Causes minor changes in diagnostic text.
2023-07-19 13:06:51 -07:00
Becca Royal-Gordon
3732c75e97
Adopt %kind for certain access control diagnostics
...
These particular changes slightly alter some diagnostics.
2023-07-19 13:06:51 -07:00
Becca Royal-Gordon
1318bf5bf5
[NFC] Begin adopting new diagnostics features
2023-07-19 13:06:51 -07:00
Becca Royal-Gordon
2ab1e05c68
[NFC] Add new DiagnosticEngine Decl features
...
Implements several enhancements to DiagnosticEngine’s handling of Decl arguments:
• All Decl classes, not just ValueDecls, are now valid to use as arguments.
• There is built-in logic to handle accessors by printing a phrase like `getter for 'foo'`, so this no longer has to be special-cased for each diagnostic.
• `%kind` can be used to insert the descriptive kind before a name; `%kindonly` inserts only the descriptive kind. This can eliminate kind/name argument pairs.
• `%base` can insert only the base name, leaving out any argument labels; `%kindbase` combines `%kind` and `%base`.
This PR is marked NFC because there are no intentional uses of these changes yet.
2023-07-19 13:06:51 -07:00
Steven Wu
43add116d2
[ExplicitModule] Allow typecheck-module-from-interface using explicit module
...
Allow `-typecheck-module-from-interface` using explicit module instead
of building implicit module.
This setups swift-frontend to accept explicit module build arguments and
loading explicit module during verifying. SwiftDriver needs to setup
correct arguments including the output path for swift module to fully
enable explicit module interface check.
2023-07-19 10:47:41 -07:00
Holly Borla
9ac257baa1
[Macros] Diagnose conformance macros as being replaced by extension macros.
2023-07-19 10:02:12 -07:00
Joshua Turcotti
992fc6c987
Merge pull request #67318 from JTurcotti/better-diags
...
[SendNonSendable] Diagnose consumption sites not requirement sites for flow-sensitive region-based Sendable Analysis
2023-07-19 09:38:40 -07:00
Alex Lorenz
3748b0ff1c
Merge pull request #65129 from hyp/eng/no-evo-cxx
...
[interop] Prohibit use of C++ APIs in public interfaces that opt-in i…
2023-07-19 08:10:23 -07:00
Holly Borla
769fc5d2c5
Merge pull request #67383 from hborla/diagnose-undocumented-conformances
...
[Macros] Diagnose undocumented conformances in extension macro expansions.
2023-07-18 22:39:22 -07:00
John McCall
a934f1f66c
Merge pull request #67368 from rjmccall/unimplementable-variadic-reabstraction
...
Diagnose attempts to reabstract variadic functions in unimplementable ways
2023-07-18 21:28:59 -04:00
Holly Borla
3c24932138
[Macros] Diagnose undocumented conformances in extension macro expansions.
2023-07-18 18:06:51 -07:00
Holly Borla
75ea47d875
Merge pull request #67314 from hborla/missing-peer-property-metadata
...
[IRGen] Visit members generated by peer macros in ClassDataBuilder.
2023-07-18 15:10:44 -07:00
John McCall
1a7d44a11d
Diagnose attempts to reabstract variadic function types in unimplementable ways.
2023-07-18 13:22:35 -04:00
Stéphan Kochen
7b460ce495
build: fix accidental cmake expansions
...
As of CMake 3.25, there are now global variables `LINUX=1`, `ANDROID=1`,
etc. These conflict with expressions that used these names as unquoted
strings in positions where CMake accepts 'variable|string', for example:
- `if(sdk STREQUAL LINUX)` would fail, because `LINUX` is now defined and
expands to 1, where it would previously coerce to a string.
- `if(${sdk} STREQUAL "LINUX")` would fail if `sdk=LINUX`, because the
left-hand side expands twice.
In this patch, I looked for a number of patterns to fix up, sometimes a
little defensively:
- Quoted right-hand side of `STREQUAL` where I was confident it was
intended to be a string literal.
- Removed manual variable expansion on left-hand side of `STREQUAL`,
`MATCHES` and `IN_LIST` where I was confident it was unintended.
Fixes #65028 .
2023-07-17 21:50:50 +02:00
jturcotti
34113c4c0f
implement searching for a ConsumeReason instead of just diagnosing accesses to consumed values
2023-07-14 16:12:52 -07:00
Sophia Poirier
6e47a36808
Merge pull request #67292 from sophiapoirier/pack-stored-propety-shadows-global
...
[ConstraintSystem] implement implicit pack materialization for abstract tuples instead of explicit '.element'
2023-07-14 15:11:05 -07:00
Holly Borla
d3c67ef898
[IRGen] Visit members generated by peer macros in ClassDataBuilder
...
by calling getAllMembers() instead of getMembers() in
TypeMemberVisitor::visitImplementationMembers.
2023-07-14 14:57:29 -07:00
Sophia Poirier
fa41015ae4
[ConstraintSystem] implement implicit pack materialization for abstract tuples instead of explicit '.element'
2023-07-14 10:32:38 -07:00
Holly Borla
c55d0e2e44
Merge pull request #67106 from hborla/validate-extension-macros
...
[Macros] Add missing macro validation.
2023-07-14 07:53:43 -07:00
Holly Borla
04ea8b0a67
[Macros] Diagnose macros attached to declarations they cannot apply to.
2023-07-13 17:07:24 -07:00
Slava Pestov
aa026f4d06
Merge pull request #67266 from slavapestov/transform-type-parameter-packs
...
Fix various places where we didn't handle "bound" pack references correctly
2023-07-13 08:09:04 -04:00
Allan Shortlidge
e973ff941f
Merge pull request #67225 from tshortli/allow-usable-from-inline-access-in-default-args
...
Sema: Allow default arguments to access `@usableFromInline` decls
2023-07-12 20:40:24 -07:00
Xi Ge
45b5b4c13e
Merge pull request #67269 from apple/block-list-note
...
ModuleLoader: emit a note when encountering a blocklisted module interface
2023-07-12 16:55:39 -07:00
Slava Pestov
d0202a7081
AST: Implement Type::transformTypeParameterPacks()
2023-07-12 18:02:14 -04:00
Konrad `ktoso` Malawski
2044cb78cf
Merge pull request #66934 from kabiroberai/main
2023-07-13 06:53:23 +09:00
Xi Ge
b697d40fb6
ModuleLoader: emit a note when encountering a blocklisted module interface
2023-07-12 13:53:36 -07:00
Allan Shortlidge
496d29c47f
AST: Remove FragileFunctionKind.allowUsableFromInline.
...
It was effectively always true after allowing default argument expressions to
reference `@usableFromInline` decls.
2023-07-12 12:47:06 -07:00
Alex Lorenz
4d084100ce
[cxx-interop] Mark C++ functions with unavailable return type as unavailable
...
This prevents users from calling functions with unsupported or unavailable return types. This ensures that users don't for example call a function that returns a non-copyable and non-movable type
Fixes https://github.com/apple/swift/issues/64401
2023-07-11 16:40:57 -07:00
Joshua Turcotti
e8111932d9
Merge pull request #67172 from JTurcotti/sil-pass
...
Add SIL Pass for flow-sensitive, region-based Sendable checking
2023-07-11 15:08:36 -07:00
Rintaro Ishizaki
2b13365f0b
Merge pull request #67206 from rintaro/parse-each-self-rdar107450487
...
[Parse] Accept 'self' after 'each'
2023-07-11 15:02:26 -07:00