JJonas Devlieghere[NFC][Py Reformat] Reformat python files in lldb
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[LLDB][ClangExpression] Allow expression evaluation from within C++ Lambdas This patch adds support for evaluating expressions which reference a captured this from within the context of a C++ lambda expression. Currently LLDB doesn't provide Clang with enough information to determine that we're inside a lambda expression and are allowed to access variables on a captured this; instead Clang simply fails to parse the expression. There are two problems to solve here: 1. Make sure clang::Sema doesn't reject the expression due to an illegal member access. 2. Materialize all the captured variables/member variables required to evaluate the expression. To address (1), we currently import the outer structure's AST context onto $__lldb_class, making the contextClass and the NamingClass match, a requirement by clang::Sema::BuildPossibleImplicitMemberExpr. To address (2), we inject all captured variables as locals into the expression source code. **Testing** * Added API test | 3 年前 | |
[NFC][Py Reformat] Reformat python files in lldb This is an ongoing series of commits that are reformatting our Python code. Reformatting is done with black (23.1.0). If you end up having problems merging this commit because you have made changes to a python file, the best way to handle that is to run git checkout --ours <yourfile> and then reformat it with black. RFC: https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style Differential revision: https://reviews.llvm.org/D151460 | 3 年前 | |
[LLDB][ClangExpression] Allow expression evaluation from within C++ Lambdas This patch adds support for evaluating expressions which reference a captured this from within the context of a C++ lambda expression. Currently LLDB doesn't provide Clang with enough information to determine that we're inside a lambda expression and are allowed to access variables on a captured this; instead Clang simply fails to parse the expression. There are two problems to solve here: 1. Make sure clang::Sema doesn't reject the expression due to an illegal member access. 2. Materialize all the captured variables/member variables required to evaluate the expression. To address (1), we currently import the outer structure's AST context onto $__lldb_class, making the contextClass and the NamingClass match, a requirement by clang::Sema::BuildPossibleImplicitMemberExpr. To address (2), we inject all captured variables as locals into the expression source code. **Testing** * Added API test | 3 年前 |