Sema: Fix a few places where we built AST that had to go through SanitizeExpr before type checking

This commit is contained in:
Slava Pestov
2020-06-25 23:37:34 -04:00
parent b663c9b79a
commit b50789404b
9 changed files with 35 additions and 62 deletions

View File

@@ -284,9 +284,9 @@ deriveBodyCodingKey_init_stringValue(AbstractFunctionDecl *initDecl, void *) {
auto labelItem = CaseLabelItem(litPat);
auto *eltRef = new (C) DeclRefExpr(elt, DeclNameLoc(), /*Implicit=*/true);
auto *metaTyRef = TypeExpr::createImplicit(enumType, C);
auto *valueExpr = new (C) DotSyntaxCallExpr(eltRef, SourceLoc(), metaTyRef);
auto *valueExpr = new (C) MemberRefExpr(metaTyRef, SourceLoc(), elt,
DeclNameLoc(), /*Implicit=*/true);
auto *assignment = new (C) AssignExpr(selfRef, SourceLoc(), valueExpr,
/*Implicit=*/true);