labath wrote: > @labath @jimingham This is just one way to allow C/C++ to dereference arrays > and let other languages decide on which types they allow to dereference. I > tried making a `GetDereferencedType` function in TypeSystem, but it doesn't > really need to do anything right now, everything is handled in > `GetChildCompilerTypeAtIndex` anyway.
I think something like `GetDereferencedType` would still look better. Maybe the clang implementation of that function could internally defer to `GetChildCompilerTypeAtIndex` ? > Also, you raised a problem that if a user has defined a synthetic child > provider for the array type, then after converting array to a pointer that > provider will not be used. Allowing the array to be dereferenced will do the > same because of where the check for a synthetic child is in > `ValueObject::Dereference`. I'm really not sure how to avoid that. I'm not worried about that with a patch like this since the problem remains contained within `ValueObject::Dereference`, and you're not changing the existing logic. If we wanted to implement something like this, I suspect we would want to first check with the synthetic child provider to see if it provides a dereference operation, and only then fall back to the "normal" type system logic. But that's yet another patch. https://github.com/llvm/llvm-project/pull/135843 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits