mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[NFC] Make EnumElementPattern carry a DeclName
This has the side effect of threading compound name support through more enum pattern code, although it’s still not complete.
This commit is contained in:
@@ -213,8 +213,8 @@ deriveBodyCodingKey_enum_stringValue(AbstractFunctionDecl *strValDecl, void *) {
|
||||
SmallVector<ASTNode, 4> cases;
|
||||
for (auto *elt : elements) {
|
||||
auto *pat = new (C) EnumElementPattern(TypeLoc::withoutLoc(enumType),
|
||||
SourceLoc(), SourceLoc(),
|
||||
Identifier(), elt, nullptr);
|
||||
SourceLoc(), DeclNameLoc(),
|
||||
DeclName(), elt, nullptr);
|
||||
pat->setImplicit();
|
||||
|
||||
auto labelItem = CaseLabelItem(pat);
|
||||
|
||||
Reference in New Issue
Block a user