Skip to content

Commit

Permalink
[lldb][ClangExpressionParser] Remove duplicate construction of Extern…
Browse files Browse the repository at this point in the history
…alASTSourceWrapper

This is an oversight from #104817 where the intention
was to hoist the ExternalASTSourceWrapper construction out of the
conditional so it can be set on both the `SemaSourceWithPriorities` and
be added as an external source to Sema. But the inner
`ExternalASTSourceWrapper` allocation wasn't actually removed.

This currently all works fine because all these AST sources are
refcounted and point to the same underlying AST sources. But this
patch cleans this up regardless.
  • Loading branch information
Michael137 committed Aug 27, 2024
1 parent 91e09c3 commit 0b1c8fd
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1229,8 +1229,6 @@ ClangExpressionParser::ParseInternal(DiagnosticManager &diagnostic_manager,
auto *module_wrapper =
new ExternalASTSourceWrapper(ast_context.getExternalSource());

auto *ast_source_wrapper = new ExternalASTSourceWrapper(ast_source);

auto *multiplexer =
new SemaSourceWithPriorities(module_wrapper, ast_source_wrapper);

Expand Down

0 comments on commit 0b1c8fd

Please sign in to comment.