[lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope...
[lldb][ClangUserExpression][NFCI] Pass the most specific ExecutionContextScope possible into ClangExpressionParser (#87657) The `ClangExpressionParser` takes an `ExecutionContextScope` which it uses to query the `Process`/`Target`/`StackFrame` to set various compiler options in preparation for parsing an expression. However, `TryParse` constructs the parser with a `Process` or `Target`, never a `StackFrame`. So when the parser tries to retrieve the current `StackFrame` from the `exe_scope`, it doesn't succeed. In future patches we want to query the `StackFrame` from within the `ClangExpressionParser` constructor. This patch simplifies `TryParse`, by removing the redundant `exe_scope` parameter, and instead uses the `exe_ctx` to derive the most fitting `exe_scope` to pass into `ClangExpressionParser`. Not entirely sure how to test this. This patch is a prerequisite to get subsequent patches that set `LangOpts` based on the current `StackFrame` to work.
parent
b2ea38f9
Please register or sign in to comment