[PATCH] D133574: [C2x] reject type definitions in offsetof

2023-01-26 Thread Alexey Neyman via Phabricator via cfe-commits
stilor added a comment. In D133574#4083742 , @aaron.ballman wrote: > In D133574#4083724 , @asbirlea > wrote: > >> Following this change, the following emits warnings: >> https://godbolt.org/z/cvGdMWqEa, https:/

[PATCH] D133574: [C2x] reject type definitions in offsetof

2023-01-27 Thread Alexey Neyman via Phabricator via cfe-commits
stilor added a comment. >> I posted https://reviews.llvm.org/D142723 to address this. > > and 63d6b8be6cf248a1a8800d85a11be469c6e2 > should > hopefully resolve it. Thank you for sorting this out so quickly! Repository:

[PATCH] D142723: [C2x] Stop diagnosing member and array access in offsetof as an extension

2023-01-27 Thread Alexey Neyman via Phabricator via cfe-commits
stilor added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2389 const int ext1 = __builtin_offsetof(struct U { int i; }, i); // C extension - const int ext2 = __builtin_offsetof(struct S, t.f[1]); // C & C++ extension + const int ext2 = __builtin_offsetof(st