[LLDB][ClangExpression] Allow expression evaluation from within C++ LambdasThis patch adds support for evaluating expressions which referencea captured `this` from within the context of a C++ lamb
[LLDB][ClangExpression] Allow expression evaluation from within C++ LambdasThis patch adds support for evaluating expressions which referencea captured `this` from within the context of a C++ lambda expression.Currently LLDB doesn't provide Clang with enough information todetermine that we're inside a lambda expression and are allowed toaccess variables on a captured `this`; instead Clang simply failsto parse the expression.There are two problems to solve here:1. Make sure `clang::Sema` doesn't reject the expression due to anillegal member access.2. Materialize all the captured variables/member variables requiredto evaluate the expression.To address (1), we currently import the outer structure's AST contextonto `$__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 theexpression source code.**Testing*** Added API test
show more ...