Commit Graph

6 Commits

Author SHA1 Message Date
Hamish Knight
0a3d11722a [AST] Add flag to isRefutablePattern to determine IsPattern behavior
IsPattern coercions aren't properly implemented since they rely on
doing a runtime cast, which can fail for things like function subtyping.
Make clients choose what behavior they want. Unfortunately we need to
preserve the current behavior in places since it's relied upon for
things like exhaustivity checking. We ought to properly implement
coercion handling, then we should be able to remove this.
2026-01-23 15:17:28 +00:00
Tim Kientzle
1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Ben Barham
f292ec9784 Use the new template deduction guides rather than makeArrayRef
LLVM has removed `make*ArrayRef`, migrate all references to their
constructor equivalent.
2024-02-23 20:04:51 -08:00
Ben Barham
ef8825bfe6 Migrate llvm::Optional to std::optional
LLVM has removed llvm::Optional, move over to std::optional. Also
clang-format to fix up all the renamed #includes.
2024-02-21 11:20:06 -08:00
Hamish Knight
16cfca4186 [ASTWalker] NFC: Rename SkipChildren -> SkipNode
This better describes what the action currently
does, and allows us to re-introduce `SkipChildren`
with the correct behavior.
2024-02-05 15:27:25 +00:00
Alex Hoppen
cf71a105f2 [Refactoring] Move async refactorings into their own files 2023-09-11 19:05:00 -07:00