[clang] [Clang] Fix missing diagnostic for non-standard layout type in `offsetof` (PR #65246)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 29 05:21:30 PDT 2023
================
@@ -47,7 +47,13 @@ struct __libcpp_datasizeof {
};
#endif
+ // Disable warnings related to the use of `offsetof` on non-standard layout or non-POD types
+ // TODO : Find a way to replace `offsetof` ?
----------------
philnik777 wrote:
I don't think this TODO is actionable from the libc++ side of things currently, so I'd rather not add it. `offsetof` is the right tool for what we are trying to achieve - even if it's technically UB.
https://github.com/llvm/llvm-project/pull/65246
More information about the cfe-commits
mailing list