[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:
Brent Royal-Gordon
2019-12-10 18:41:56 -08:00
parent 93b9c0b0c6
commit 8551b32af2
7 changed files with 72 additions and 59 deletions

View File

@@ -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);