Skip to content

Commit 41de090

Browse files
committed
Merge remote-tracking branch 'origin/main' into rebranch
2 parents 3e99010 + 8fb4b1c commit 41de090

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/Sema/DerivedConformance/DerivedConformanceRawRepresentable.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ deriveBodyRawRepresentable_raw(AbstractFunctionDecl *toRawDecl, void *) {
105105

106106
auto *argList = ArgumentList::forImplicitCallTo(functionRef->getName(),
107107
{selfRef, typeExpr}, C);
108-
auto call = CallExpr::createImplicit(C, functionRef, argList);
108+
Expr *call = CallExpr::createImplicit(C, functionRef, argList);
109+
if (C.LangOpts.hasFeature(Feature::StrictMemorySafety))
110+
call = UnsafeExpr::createImplicit(C, SourceLoc(), call);
109111
auto *returnStmt = ReturnStmt::createImplicit(C, call);
110112
auto body = BraceStmt::create(C, SourceLoc(), ASTNode(returnStmt),
111113
SourceLoc());

0 commit comments

Comments
 (0)