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
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
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
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
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