Commit fc52ee3
authored
[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.1 parent b2ea38f commit fc52ee3
File tree
2 files changed
+15
-26
lines changed- lldb/source/Plugins/ExpressionParser/Clang
2 files changed
+15
-26
lines changedLines changed: 12 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
557 | | - | |
558 | | - | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
559 | 559 | | |
560 | 560 | | |
561 | 561 | | |
| |||
574 | 574 | | |
575 | 575 | | |
576 | 576 | | |
577 | | - | |
| 577 | + | |
| 578 | + | |
578 | 579 | | |
579 | 580 | | |
580 | 581 | | |
| |||
669 | 670 | | |
670 | 671 | | |
671 | 672 | | |
672 | | - | |
673 | | - | |
674 | | - | |
675 | | - | |
676 | | - | |
677 | | - | |
678 | | - | |
679 | | - | |
680 | | - | |
| 673 | + | |
| 674 | + | |
681 | 675 | | |
682 | 676 | | |
683 | 677 | | |
| |||
695 | 689 | | |
696 | 690 | | |
697 | 691 | | |
698 | | - | |
699 | | - | |
700 | | - | |
| 692 | + | |
| 693 | + | |
701 | 694 | | |
702 | 695 | | |
703 | 696 | | |
| |||
759 | 752 | | |
760 | 753 | | |
761 | 754 | | |
| 755 | + | |
762 | 756 | | |
763 | 757 | | |
764 | 758 | | |
| |||
840 | 834 | | |
841 | 835 | | |
842 | 836 | | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
847 | | - | |
848 | | - | |
849 | | - | |
| 837 | + | |
| 838 | + | |
850 | 839 | | |
851 | 840 | | |
852 | 841 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
| |||
0 commit comments