Skip to content

Commit c2e2bd1

Browse files
authored
Merge pull request #1166 from CodaFi/a-pattern-of-excellence
Update for the removal of implicit pattern bits
2 parents 05ec81f + a61501c commit c2e2bd1

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,8 @@ swift::Stmt *SwiftASTManipulator::ConvertExpressionToTmpReturnVarAccess(
430430
result_loc_info.tmp_var_decl->setSetterAccess(internal_access);
431431

432432
auto *var_pattern =
433-
new (ast_context) swift::NamedPattern(result_loc_info.tmp_var_decl, true);
433+
swift::NamedPattern::createImplicit(ast_context,
434+
result_loc_info.tmp_var_decl);
434435

435436
const auto static_spelling_kind = swift::StaticSpellingKind::KeywordStatic;
436437
result_loc_info.binding_decl = swift::PatternBindingDecl::createImplicit(
@@ -996,10 +997,8 @@ GetPatternBindingForVarDecl(swift::VarDecl *var_decl,
996997
swift::DeclContext *containing_context) {
997998
swift::ASTContext &ast_context = var_decl->getASTContext();
998999

999-
const bool is_implicit = true;
1000-
10011000
swift::NamedPattern *named_pattern =
1002-
new (ast_context) swift::NamedPattern(var_decl, is_implicit);
1001+
swift::NamedPattern::createImplicit(ast_context, var_decl);
10031002

10041003
// Since lldb does not call bindExtensions, must ensure that any enclosing
10051004
// extension is bound

0 commit comments

Comments
 (0)