Issue 71837
Summary lldb doesn't recognize class member variables in lambda on Windows
Labels lldb, platform:windows
Assignees
Reporter ZequanWu
    Copy example from https://github.com/llvm/llvm-project/issues/71562:
```
$ cat a.cpp
#include <stdio.h>

class foo {
 public:
  void fun() {
    auto f = [=] {
      int c = a;
      int d = b;
 printf("%d %d\n", c, d);
    };
    f();
  }

 private:
  int a = 1;
  int b = 2;
};

int main() {
  foo f;
  f.fun();
  return 0;
}
$ clang-cl a.cpp /c /Foa.obj /Z7
$ lld-link /debug a.obj /out:a.exe /pdb:a.pdb
```
Setting breakpoint inside lambda `f` and print a or b shows:
`error: <user _expression_ 0>:1:1: use of undeclared identifier 'a'`

It's likely this functionality is missing.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to