[Lldb-commits] [PATCH] D129078: [LLDB][ClangExpression] Allow expression evaluation from within C++ Lambdas

Michael Buch via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jul 12 01:46:48 PDT 2022


Michael137 marked an inline comment as done.
Michael137 added inline comments.


================
Comment at: lldb/source/Expression/Materializer.cpp:819
+
+  bool LocationExpressionIsValid() const override { return true; }
+
----------------
Michael137 wrote:
> jingham wrote:
> > Is this right?  For instance, in the case where the fake "this" Variable in the lambda expression has an invalid expression, all the ValueObjects you try to make (the "real captured this" as well as any other captures that were hanging off the fake "this" would have invalid location expressions.
> If the location expression is invalid for the fake "this", would we ever be able to get ValueObject's out of it? By the time these Entity objects get instantiated we either managed to get ValueObject's from "this" or if we didn't, then we wouldn't have added them to the `$__lldb_local_vars` namespace
Added a check for ValueObject's error status here.

Manual testing shows we'd catch lack of variable location earlier in materialisation


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D129078/new/

https://reviews.llvm.org/D129078



More information about the lldb-commits mailing list