teemperor added a comment. As we're anyway throwing in reduced test cases, here is another version:
struct PassByRef { // PassByRef should be pass by reference since the destructor is // user-defined which means it can not be passed in registers. ~PassByRef() {} int x = 0; }; struct Foo { PassByRef bar(Foo *f) const { PassByRef b; if (this == f) b.x = 11223344; return b; } }; int main() { Foo f; return f.bar(&f).x; // break here } We can save the typing work for the two constructors by just making a non-trivial destructor. (Also this patch currently deletes `TestGlobalVariables.py` which seems unintentional) CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61146/new/ https://reviews.llvm.org/D61146 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits