struct A { struct { int b; }; };
A().^b;
This should be considered a reference to b, but currently it's
considered a reference to the anonymous struct field.
Paths
| Differential D104376
[clangd] Correct SelectionTree behavior around anonymous field access. ClosedPublic Authored by sammccall on Jun 16 2021, 6:27 AM.
Details Summary struct A { struct { int b; }; }; This should be considered a reference to b, but currently it's
Diff Detail
Event TimelineHerald added subscribers: usaxena95, kadircet, arphaman. · View Herald TranscriptJun 16 2021, 6:27 AM This revision is now accepted and ready to land.Jun 17 2021, 5:08 AM
Closed by commit rGbb41f8569138: [clangd] Correct SelectionTree behavior around anonymous field access. (authored by sammccall). · Explain WhyJun 30 2021, 8:45 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 355566 clang-tools-extra/clangd/Selection.cpp
clang-tools-extra/clangd/unittests/XRefsTests.cpp
|
I still think it is worth to explore this direction (will take a look on this if I have time), but also ok with the current approach.