diff options
author | Pavel Labath <pavel@labath.sk> | 2025-04-29 08:27:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-29 08:27:18 +0200 |
commit | 15cd71afd24437d9480aff41de61b3edf739408b (patch) | |
tree | f3dfd89aca4ee4b6d957135b4b77f87e934a942c /clang/lib/InstallAPI/HeaderFile.cpp | |
parent | 679cc0a1ed60ea529abc04cecbcdd75d65ea0588 (diff) | |
download | llvm-15cd71afd24437d9480aff41de61b3edf739408b.zip llvm-15cd71afd24437d9480aff41de61b3edf739408b.tar.gz llvm-15cd71afd24437d9480aff41de61b3edf739408b.tar.bz2 |
[lldb] Make ValueObject::Dereference less aggressive (#137311)
The function was always trying to dereference both the synthetic and
non-synthetic view of the object. This is wrong as the caller should be
able to determine which view of the object it wants to access, as is
done e.g. for child member access.
This patch removes the nonsynthetic->synthetic fallback, which is the
more surprising path, and fixes the callers to try both versions of the
object (when appropriate). I also snuck in simplification of the member
access code path because it was possible to use the same helper function
for that, and I wanted to be sure I understand the logic correctly.
I've left the synthetic->nonsynthetic fallback in place. I think we may
want to keep that one as we often have synthetic child providers for
pointer types. They usually don't provide an explicit dereference
operation but I think users would expect that a dereference operation on
those objects would work. What we may want to do is to try the
*synthetic* operation first in this case, so that the nonsynthetic case
is really a fallback.
---------
Co-authored-by: Ilia Kuklin <kuklin.iy@mail.ru>
Diffstat (limited to 'clang/lib/InstallAPI/HeaderFile.cpp')
0 files changed, 0 insertions, 0 deletions