jimingham wrote: First off, it is not the case that the "ValueObject Path Expression" operators - part of what we're starting to call the DIL (Data Inspection Language) - are supposed to exactly mirror C++ semantics. Since they reflect all the ways that a synthetic child provider might present its children, and since this part of lldb is independent of language - it gets used for C/ObjC/C++/Swift/Rust etc values, not just C++ - I don't think this would a feasible or particularly useful requirement.
So "be the same as C++ semantics" is not a sufficient justification to change how the path expressions get interpreted in lldb. The better motivation is "what is a useful and consistent syntax for static poking at data objects". The question "where does this reference live" isn't a particularly useful question to ask in C++ code, but it does seem like a useful question to ask when poking around in data. And since we're generally treating `&` to mean "what is the location of this object in memory" in the DIL, then interpreting the & in this case the way it was before the patch seems more natural. I agree with Pavel, we should take a step back and actually define what `&` and `*` will mean in the DIL, and then implement that. https://github.com/llvm/llvm-project/pull/113596 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits