diff --git a/lldb/include/lldb/Expression/ExpressionParser.h b/lldb/include/lldb/Expression/ExpressionParser.h --- a/lldb/include/lldb/Expression/ExpressionParser.h +++ b/lldb/include/lldb/Expression/ExpressionParser.h @@ -76,17 +76,6 @@ virtual bool Complete(CompletionRequest &request, unsigned line, unsigned pos, unsigned typed_pos) = 0; - /// Parse a single expression and convert it to IR using Clang. Don't wrap - /// the expression in anything at all. - /// - /// \param[in] diagnostic_manager - /// The diagnostic manager in which to store the errors and warnings. - /// - /// \return - /// The number of errors encountered during parsing. 0 means - /// success. - virtual unsigned Parse(DiagnosticManager &diagnostic_manager) = 0; - /// Try to use the FixIts in the diagnostic_manager to rewrite the /// expression. If successful, the rewritten expression is stored in the /// diagnostic_manager, get it out with GetFixedExpression. diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h @@ -77,7 +77,7 @@ /// \return /// The number of errors encountered during parsing. 0 means /// success. - unsigned Parse(DiagnosticManager &diagnostic_manager) override; + unsigned Parse(DiagnosticManager &diagnostic_manager); bool RewriteExpression(DiagnosticManager &diagnostic_manager) override; diff --git a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp --- a/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp +++ b/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp @@ -186,10 +186,10 @@ lldb::ProcessSP jit_process_sp(m_jit_process_wp.lock()); if (jit_process_sp) { const bool generate_debug_info = true; - m_parser.reset(new ClangExpressionParser(jit_process_sp.get(), *this, - generate_debug_info)); - - num_errors = m_parser->Parse(diagnostic_manager); + auto *clang_parser = new ClangExpressionParser(jit_process_sp.get(), *this, + generate_debug_info); + num_errors = clang_parser->Parse(diagnostic_manager); + m_parser.reset(clang_parser); } else { diagnostic_manager.PutString(eDiagnosticSeverityError, "no process - unable to inject function");