Skip to content

Commit caa35dd

Browse files
Michael137adrian-prantl
authored andcommitted
[lldb][ClangExpressionParser] Remove duplicate construction of ExternalASTSourceWrapper
This is an oversight from llvm#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. (cherry picked from commit 0b1c8fd)
1 parent 731f850 commit caa35dd

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1127,8 +1127,6 @@ ClangExpressionParser::ParseInternal(DiagnosticManager &diagnostic_manager,
11271127
auto *module_wrapper =
11281128
new ExternalASTSourceWrapper(ast_context.getExternalSource());
11291129

1130-
auto *ast_source_wrapper = new ExternalASTSourceWrapper(ast_source);
1131-
11321130
auto *multiplexer =
11331131
new SemaSourceWithPriorities(module_wrapper, ast_source_wrapper);
11341132

0 commit comments

Comments
 (0)