[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-09 Thread Nick Desaulniers via Phabricator via cfe-commits
nickdesaulniers accepted this revision. nickdesaulniers added a comment. This revision is now accepted and ready to land. Consider adding an AST test; that was something that came up in my patch https://reviews.llvm.org/D95408. > I'm pushing back on the WG14 lists to see if this is a good opport

[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/test/Sema/anonymous-struct-union.c:137-140 + // It's the access path that picks up the qualifiers, not the direct + // declaration of the field itself. So 'i' and 'j' are both 'int'. + _Static_assert(_Generic(x.i, int : 1, d

[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/docs/ReleaseNotes.rst:152-157 +- When forming a member expression, now consider any qualifiers written on an + anonymous structure or union as also applying to the field being referenced. + This fixes an issue where qualifi

[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-09 Thread Tom Honermann via Phabricator via cfe-commits
tahonermann added inline comments. Comment at: clang/docs/ReleaseNotes.rst:152-157 +- When forming a member expression, now consider any qualifiers written on an + anonymous structure or union as also applying to the field being referenced. + This fixes an issue where qualifier

[PATCH] D125167: [WIP] Fix member access of anonymous struct/union fields in C

2022-05-07 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I'm marking this as a WIP -- the content is ready to go, but I'm no longer convinced we want to implement this for GCC compatibility as GCC is the only C compiler I can find that cares about the qualifiers: https://godbolt.org/z/hTqY8zMb5 Repository: rG LLVM G