Skip to content

Commit e2f051b

Browse files
authored
Merge pull request #62697 from xedin/replace-flag-with-info-from-applied-tranform
[CSSyntacticElement] Replace global flag check with info from the solver
2 parents 5004cee + 6c02e51 commit e2f051b

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/Sema/CSSyntacticElement.cpp

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,11 +2111,9 @@ SolutionApplicationToFunctionResult ConstraintSystem::applySolution(
21112111
if (auto transform = solution.getAppliedBuilderTransform(fn)) {
21122112
NullablePtr<BraceStmt> newBody;
21132113

2114-
if (Context.LangOpts.hasFeature(Feature::ResultBuilderASTTransform)) {
2115-
BraceStmt *transformedBody =
2116-
const_cast<BraceStmt *>(transform->transformedBody.get());
2117-
2118-
fn.setParsedBody(transformedBody, /*singleExpression=*/false);
2114+
if (auto transformedBody = transform->transformedBody) {
2115+
fn.setParsedBody(const_cast<BraceStmt *>(transformedBody.get()),
2116+
/*singleExpression=*/false);
21192117

21202118
ResultBuilderRewriter rewriter(solution, fn, *transform, rewriteTarget);
21212119

0 commit comments

Comments
 (0)