[PATCH] D63753: [Sema] Instead of rejecting C unions with non-trivial fields, detect attempts to destruct/initialize/copy them.
Akira Hatanaka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jun 27 23:34:06 PDT 2019
ahatanak added inline comments.
================
Comment at: include/clang/Basic/DiagnosticSemaKinds.td:633
+ "capture a variable of type %1}3 "
+ "since it %select{contains a union that |}2is non-trivial to "
+ "%select{default-initialize|destruct|copy}0">;
----------------
rjmccall wrote:
> Should this be "`%select{contains|is}2 a union that is non-trivial to..."? None of these situations bans non-trivial types, just unions containing them (and aggregates containing such unions).
Yes, that's correct. We only ban aggregates containing non-trivial unions (the former case) and non-trivial unions (the latter case).
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D63753/new/
https://reviews.llvm.org/D63753
More information about the cfe-commits
mailing list