[Lldb-commits] [lldb] [lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (PR #87657)

Michael Buch via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 4 17:17:27 PDT 2024


================
@@ -553,9 +553,9 @@ bool ClangUserExpression::PrepareForParsing(
 }
 
 bool ClangUserExpression::TryParse(
-    DiagnosticManager &diagnostic_manager, ExecutionContextScope *exe_scope,
-    ExecutionContext &exe_ctx, lldb_private::ExecutionPolicy execution_policy,
-    bool keep_result_in_memory, bool generate_debug_info) {
+    DiagnosticManager &diagnostic_manager, ExecutionContext &exe_ctx,
+    lldb_private::ExecutionPolicy execution_policy, bool keep_result_in_memory,
+    bool generate_debug_info) {
----------------
Michael137 wrote:

I removed this parameter because it seemed redundant as it was only used for the `ClangExpressionParser`, which wants access to all of Process/Target/StackFrame. So if we can get that from the ExecutionContext, there's no point in passing the `exe_scope` down the the parser. Maybe I'm misunderstanding but my impression was that this is a simplification and wouldn't cause any functional change. This is purely about making the `ClangExpressionParser` get the `StackFrame` calculation right, which it doesn't even currently use apart for logging

https://github.com/llvm/llvm-project/pull/87657


More information about the lldb-commits mailing list