Holly Borla
27aa3651e8
[ConstraintSystem] Open pack element types using a PackElementOf constraint
...
when resolving pack reference type reprs inside pack expansion expressions.
2022-12-20 11:36:58 -05:00
swift-ci
8f88e3d522
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-19 15:44:32 -08:00
Artem Chikin
514b7031a8
Merge pull request #62628 from artemcm/ScannerRefactor
...
[NFC][Dependency Scanner] Rename scanner classes to better represent their meaning
2022-12-19 15:24:49 -08:00
swift-ci
53edbec88e
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-16 08:55:12 -08:00
Artem Chikin
1230966e80
[Dependency Scanner] Rename 'ModuleDependenceis' -> 'ModuleDependencyInfo'
2022-12-15 14:18:29 -08:00
Holly Borla
dc941de45e
[ConstraintLocator] Add a locator path element that stores an opened pack element
...
generic signature.
2022-12-14 20:45:51 -08:00
swift-ci
446f63fdc1
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-13 07:53:58 -08:00
Alex Hoppen
fe2ae72ad2
[IDE] Rename CodeCompletion to IDEInspection in cases where the code path no longer exclusively applies to code completion
...
The code completio infrastructure is also being used for cursor info now, so it should no longer be called code completion.
rdar://103251187
2022-12-13 11:41:05 +01:00
swift-ci
4eaff05e0f
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-02 01:57:21 -08:00
Alex Hoppen
8e857d55c3
Merge pull request #62292 from ahoppen/ahoppen/solver-based-cursor-info-prep
...
[SourceKit] Preparation for solver-based cursor info
2022-12-02 10:52:30 +01:00
Alex Hoppen
b6e9a1db24
[IDE] Allow resolving of unresolved decl refs when computing shorthand shadows
2022-12-01 12:11:39 +01:00
Erik Eckstein
d89c6b2d70
Merge remote-tracking branch 'origin/main' into rebranch
2022-12-01 07:48:51 +01:00
Pavel Yaskevich
6b3776456c
Merge pull request #62053 from abdulowork/improve-type-checker-debugging-indentation
...
Improve indentation in type checker debugging output
2022-11-30 12:11:27 -08:00
swift-ci
1acf8b039b
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-29 10:14:02 -08:00
Doug Gregor
8adee85cb6
[Macros] Add support for explicit generic arguments of macros.
...
Enable type checking support for explicitly specifying generic arguments to
a macro, e.g., `#stringify<Double>(1 + 2)`. To do so, introduce a new
kind of constraint that performs explicit argument matching against the
generic parameters of a macro only after the overload is chosen.
2022-11-28 18:32:43 -08:00
swift-ci
efef52a86e
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-28 09:33:40 -08:00
Erik Eckstein
ab1b343dad
use new llvm::Optional API
...
`getValue` -> `value`
`getValueOr` -> `value_or`
`hasValue` -> `has_value`
`map` -> `transform`
The old API will be deprecated in the rebranch.
To avoid merge conflicts, use the new API already in the main branch.
rdar://102362022
2022-11-21 19:44:24 +01:00
Rintaro Ishizaki
d458c8b74a
Merge remote-tracking branch 'origin/main' into rebranch
...
Conflicts:
include/swift/Sema/ConstraintSystem.h
include/swift/Syntax/AbsoluteRawSyntax.h
include/swift/Syntax/Syntax.h
include/swift/Syntax/SyntaxData.h
lib/DependencyScan/ModuleDependencyCacheSerialization.cpp
lib/Syntax/SyntaxFactory.cpp.gyb
lib/Syntax/SyntaxNodes.cpp.gyb
tools/SourceKit/lib/SwiftLang/SwiftEditor.cpp
tools/swift-syntax-test/swift-syntax-test.cpp
2022-11-18 09:37:38 -08:00
Angela Laar
dcfeff715b
Merge pull request #61944 from angela-laar/refactor-generate-constraints-for-closures
...
[CSClosure] Refactor generateConstraints
2022-11-17 07:44:05 -08:00
Timofey Solonin
3f366947e4
Improve indentation in debugging output
2022-11-17 23:25:31 +08:00
Holly Borla
72d87b5ca5
[ConstraintSystem] Add a locator path element for the pattern of a pack expansion.
2022-11-16 09:06:58 -08:00
Holly Borla
5218a0d77a
[ConstraintSystem] Add a locator path element for pack shapes, and use it for
...
type variables representing pack shapes.
2022-11-15 21:33:17 -08:00
Angela Laar
b4549d63f0
[Constraint System] Refactor generateConstraints
...
We don't need a separate generateConstraints function for closures.
2022-11-15 16:13:58 -08:00
swift-ci
568db96259
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-15 02:54:21 -08:00
Hamish Knight
f2404feb91
[CS] Factor out BindingSet::favoredOverConjunction
...
And refactor the way we select the next step for
a ComponentStep. This should be NFC.
2022-11-14 20:03:41 +00:00
swift-ci
c6a647ae06
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-13 20:33:41 -08:00
Doug Gregor
1aa907500f
[Macros] Use the macro recorded in the constraint system for expansion.
...
Rather than lookup up the macro by name again during constraint
application, use the overload choice for the macro as recorded in the
constraint system to apply the correct macro.
2022-11-13 13:46:42 -08:00
swift-ci
e65fa9c45d
Merge remote-tracking branch 'origin/main' into rebranch
2022-11-11 22:52:44 -08:00
Doug Gregor
16f81fbad5
Introduce a Macro AST type and use it to describe the macros we find
2022-11-11 15:24:37 -08:00
Erik Eckstein
54fe1304a1
replace LLVM_NODISCARD -> [[nodiscard]]
...
This is possible because we are now compiling with the C++17 standard.
2022-11-04 20:44:18 +01:00
Alexis Laferrière
47b29b68db
Merge pull request #61649 from xymus/index-swiftinterfaces
...
[Index] Force indexing of system modules to read only from swiftinterfaces
2022-10-31 14:18:45 -07:00
Alexis Laferrière
730497e9a3
[Serialization] Add control over adding a loaded module to the in-memory cache
2022-10-31 10:58:57 -07:00
Robert Widmann
394d0645d9
Tidy Up The C AST Bridging File A Bit
2022-10-27 11:11:12 -07:00
Robert Widmann
822fd47b8a
Add Utilities to Retrieve the (Opened) Type of a Macro Reference
2022-10-27 11:11:11 -07:00
Anton Korobeynikov
41e6cbec3d
[NFC] Make the StoredIntegerElement<N> storage properties explicit:
...
specify the accepted field sizes in ctor.
This is a follow-up refactoring after discussion in #61726
2022-10-26 23:27:02 -07:00
Anton Korobeynikov
7b6c652dc7
Allow StoredIntegerElement to use full storage when necessary. ( #61726 )
...
* Allow StoredIntegerElement to use full storage when necessary.
This way we will be able to store whole 64-bit number when we store
only a single value, or two 32-bit numbers or 3 16-bit.
Fixes #61723
2022-10-25 23:28:07 -07:00
Slava Pestov
bb045423b3
Sema: Add diagnostics for ShapeOf constraint
2022-10-25 13:20:38 -04:00
Slava Pestov
731d903a43
Sema: Add ConstraintKind::ShapeOf
2022-10-25 12:55:04 -04:00
Holly Borla
032c511754
[ConstraintSystem] Add a PackElementOf constraint to delay mapping opened
...
element pattern types to pattern archetypes until after type variables are
resolved.
2022-10-24 19:46:44 -07:00
Slava Pestov
46d5fa68f9
Sema: Introduce ConstraintKind::SubclassOf
2022-10-21 22:17:38 -04:00
Slava Pestov
4e70f4fb19
Sema: Simplify matching logic for PackExpansionType
2022-10-17 23:23:09 -04:00
Slava Pestov
55210f6cae
Sema: Introduce TVO_CanBindToPack type variable flag
2022-10-16 21:37:25 -04:00
Slava Pestov
0dfdf1ca02
Sema: Remove unused function prototype
2022-10-16 21:37:25 -04:00
Slava Pestov
9ae9c369a5
Sema: Remove unnecessary overload of computeTupleShuffle()
2022-10-16 21:37:24 -04:00
Holly Borla
c4b946195e
[AST] Replace the "type sequence" terminology with "parameter pack".
2022-10-10 16:28:13 -07:00
Holly Borla
67fb143f0e
[AST] Remove ReifyPackExpr.
2022-10-10 16:25:26 -07:00
Sam Kortekaas
1bd0d9753e
[SourceKit] Add option for returning fully qualified types in variable type request
2022-09-29 09:32:09 +02:00
Sam Kortekaas
0efc3ea745
[SourceKit] Add option for returning fully qualified types in expression type request
2022-09-27 14:13:10 +02:00
Ben Barham
81c3a11436
Merge pull request #61162 from bnbarham/result-builder-completion-skip
...
[Sema] Skip adding solutions to completion callback if needed
2022-09-19 13:25:54 -07:00
Ben Barham
79b0cd60a8
[Sema] Skip adding solutions to completion callback if needed
...
If `CompletionContextFinder` fails to find a `CompletionNode`, skip
trying to filter and add solutions to the completion callback. This
prevents an assertion/crash in `filterSolutionsForCodeCompletion` which
assumes `CompletionNode` is non-null (either an expression or keypath).
Resolves rdar://99966094.
2022-09-16 11:39:39 -07:00