spyffe added a subscriber: aprantl.
spyffe added a comment.
How does Clang-emitted debug information express the region in which a type is
declared if it has been moved to the containing Decl? I'm thinking
specifically of this case:
int foo() {
return
[]() { struct A { int a; } a1; a1.a = 3; return a1.a; }() +
[]() { struct A { int b; } a2; a2.b = 4; return a2.b; }();
}
As another point, it's not clear to me that the test is validating this. There
are no type declarations in the lambda in the test.
I'm not convinced this is all working fine at the moment, though:
(lldb) br s -l 5
(lldb) br s -l 6
Breakpoint 2: 2 locations.
(lldb) r
3 int foo() {
4 return
-> 5 []() { struct A { int a; } a1; a1.a = 3;
return a1.a; }() +
6 []() { struct A { int b; } a2; a2.b =
4; return a2.b; }();
7 }
8
(lldb) fr var
(lldb) c
(lldb) fr var
(const (anonymous class) *) this = 0x00007fff5fbff678
(A) a1 = (a = 1606416064)
(lldb) c
(lldb) fr var
(lldb) c
(lldb) fr var
(const (anonymous class) *) this = 0x00007fff5fbff670
(A) a2 = (a = 3)
I suggest we bring @aprantl in to this discussion.
https://reviews.llvm.org/D27394
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits