[Lldb-commits] [lldb] 0b1c8fd - [lldb][ClangExpressionParser] Remove duplicate construction of ExternalASTSourceWrapper
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Tue Aug 27 16:44:31 PDT 2024
Author: Michael Buch
Date: 2024-08-28T00:40:12+01:00
New Revision: 0b1c8fd162aa1be66332d57d7da68416a9acb5ef
URL: https://github.com/llvm/llvm-project/commit/0b1c8fd162aa1be66332d57d7da68416a9acb5ef
DIFF: https://github.com/llvm/llvm-project/commit/0b1c8fd162aa1be66332d57d7da68416a9acb5ef.diff
LOG: [lldb][ClangExpressionParser] Remove duplicate construction of ExternalASTSourceWrapper
This is an oversight from https://github.com/llvm/llvm-project/pull/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.
Added:
Modified:
lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
Removed:
################################################################################
diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
index 73f68945f58566..90f26de939a478 100644
--- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
+++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
@@ -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);
More information about the lldb-commits
mailing list