labath wrote: I see this is just a draft, but in order to save time for everyone, I want to say this as early as possible.
With this patch, the biggest question you will have to answer is "why is the implementation of `&` more complicated than `inner_value->AddressOf()`" (and a similar question for dereferencing). I think I know why you did this (because you want `&variable_of_reference_type` to behave the same way as is C++). I understand that desire, but I don't think this is the way to achieve that. The implementation of `AddressOf` is intentional and it kind of makes sense -- despite of what the C++ standard says, (most) references do have an address, so it makes sense for a debugger to have a way to return that. I think it would also make sense (and I might even prefer that) if `AddressOf` returned the address of the referenced object (the "value" of the reference), but it's not how it works right now -- neither with `AddressOf` nor with the existing implementation of `frame var`. What *doesn't* make sense to me is for `AddressOf` and `frame var` do to something different. If we want to change how this works, the change should probably be inside `AddressOf`, so that it applies the same everywhere. Either way, it will require more discussion. If that's something you want to take on now, then we probably ought to move this to the RFC. If not, then I'd suggest sticking with the status quo (and *maybe* coming back to this later). I'm also not very convinced by this "FlowAnalysis" thingy. Is it supposed to be a performance optimization (collapsing `*&foo` to `foo`) or does it do something more? I mean, the optimization conceptually makes sense, but I'm somewhat surprised that it makes a difference in practice. Is there a particular pattern you want to optimize with this? I'd be surprised if users actually typed expressions like this. https://github.com/llvm/llvm-project/pull/134428 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits