Skip to content

Commit f647039

Browse files
authored
Merge pull request #1784 from hamishknight/typed-next
[master-next] Update for swiftlang/swift#33806
2 parents 5e18117 + b672137 commit f647039

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lldb/source/Plugins/ExpressionParser/Swift/SwiftASTManipulator.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1207,10 +1207,12 @@ bool SwiftASTManipulator::AddExternalVariables(
12071207
wrapper_element_iterator = wrapper_elements_copy.insert(
12081208
wrapper_element_iterator, swift::ASTNode(redirected_var_decl));
12091209

1210-
m_wrapper_decl->setBody(swift::BraceStmt::create(
1210+
auto *new_wrapper_body = swift::BraceStmt::create(
12111211
ast_context, wrapper_body->getLBraceLoc(),
12121212
ast_context.AllocateCopy(wrapper_elements_copy),
1213-
wrapper_body->getRBraceLoc()));
1213+
wrapper_body->getRBraceLoc());
1214+
m_wrapper_decl->setBody(new_wrapper_body,
1215+
m_wrapper_decl->getBodyKind());
12141216
} else {
12151217
element_iterator =
12161218
elements.insert(element_iterator, swift::ASTNode(pattern_binding));
@@ -1234,9 +1236,10 @@ bool SwiftASTManipulator::AddExternalVariables(
12341236
m_variables.push_back(variable);
12351237
}
12361238

1237-
m_function_decl->setBody(swift::BraceStmt::create(
1239+
auto *new_function_body = swift::BraceStmt::create(
12381240
ast_context, body->getLBraceLoc(), ast_context.AllocateCopy(elements),
1239-
body->getRBraceLoc()));
1241+
body->getRBraceLoc());
1242+
m_function_decl->setBody(new_function_body, m_function_decl->getBodyKind());
12401243
}
12411244

12421245
return true;

0 commit comments

Comments
 (0)