Akira Hatanaka
090510608d
[Sema] Diagnose default-initialization, destruction, and copying of
...
non-trivial C union types
This recommits r365985, which was reverted because it broke a few
projects using unions containing non-trivial ObjC pointer fields in
system headers. We now have a patch to fix the problem (see
https://reviews.llvm.org/D65256 ).
Original commit message:
This patch diagnoses uses of non-trivial C unions and structs/unions
containing non-trivial C unions in the following contexts, which require
default-initialization, destruction, or copying of the union objects,
instead of disallowing fields of non-trivial types in C unions, which is
what we currently do:
- function parameters.
- function returns.
- assignments.
- compound literals.
- block captures except capturing of `__block` variables by non-escaping blocks.
- local and global variable definitions.
- lvalue-to-rvalue conversions of volatile types.
See the discussion in https://reviews.llvm.org/D62988 for more background.
rdar://problem/50679094
Differential Revision: https://reviews.llvm.org/D63753
llvm-svn: 371275
2019-09-07 00:34:43 +00:00
..
2019-09-07 00:34:43 +00:00
2019-08-09 08:52:54 +00:00
2018-12-18 20:33:00 +00:00
2019-02-27 18:17:16 +00:00
2019-08-03 14:28:34 +00:00
2018-12-18 20:33:00 +00:00
2018-08-17 15:46:07 +00:00
2018-12-18 20:33:00 +00:00
2019-03-21 19:59:49 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2019-03-21 19:59:49 +00:00
2018-12-18 20:33:00 +00:00
2018-10-01 21:51:28 +00:00
2018-12-18 20:33:00 +00:00
2019-03-21 19:59:49 +00:00
2019-03-21 19:59:49 +00:00
2019-03-21 19:59:49 +00:00
2019-03-21 19:59:49 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2019-04-10 06:20:23 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2019-03-21 19:59:49 +00:00
2018-12-18 20:33:00 +00:00
2019-05-09 17:43:52 +00:00
2017-11-17 19:46:47 +00:00
2019-06-14 22:06:28 +00:00
2019-01-18 17:20:46 +00:00
2018-12-18 20:33:00 +00:00
2018-02-08 01:17:26 +00:00
2018-09-10 16:14:28 +00:00
2019-03-31 11:22:26 +00:00
2018-10-01 21:51:28 +00:00
2018-07-26 16:51:21 +00:00
2019-05-09 17:43:52 +00:00
2019-02-08 23:02:13 +00:00
2018-01-19 17:12:54 +00:00
2019-05-30 04:09:01 +00:00
2019-01-17 18:18:53 +00:00
2018-05-22 10:13:06 +00:00
2019-06-04 16:29:58 +00:00
2018-08-10 15:09:24 +00:00
2018-12-18 20:33:00 +00:00
2019-08-03 14:28:34 +00:00
2018-11-28 21:18:07 +00:00
2018-11-28 21:18:07 +00:00
2018-11-28 21:18:07 +00:00
2018-11-28 21:18:07 +00:00
2018-03-02 01:53:15 +00:00
2019-02-25 13:41:59 +00:00
2018-12-18 20:33:00 +00:00
2019-05-29 21:23:30 +00:00
2019-05-29 21:23:30 +00:00
2019-05-09 17:43:52 +00:00
2019-06-17 07:47:28 +00:00
2018-10-12 17:22:10 +00:00
2019-05-09 18:32:16 +00:00
2019-07-12 02:16:56 +00:00
2018-08-17 22:18:08 +00:00
2019-05-09 18:32:16 +00:00
2018-12-18 20:33:00 +00:00
2019-02-05 16:05:50 +00:00
2018-08-14 10:05:25 +00:00
2018-05-22 10:13:06 +00:00
2019-04-29 23:05:47 +00:00
2019-02-25 13:41:59 +00:00
2018-05-22 10:13:06 +00:00
2018-07-04 11:26:09 +00:00
2019-02-03 15:05:52 +00:00
2018-08-10 12:53:13 +00:00
2019-03-14 15:17:37 +00:00
2019-05-06 03:30:09 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2017-10-27 00:56:23 +00:00
2018-05-22 10:13:06 +00:00
2018-08-17 22:18:08 +00:00
2019-06-05 21:11:06 +00:00
2017-09-22 21:32:06 +00:00
2018-01-19 17:12:54 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2017-12-08 02:47:58 +00:00
2018-12-18 20:33:00 +00:00
2019-05-09 17:43:52 +00:00
2018-03-19 17:38:40 +00:00
2018-02-28 07:15:55 +00:00
2019-03-28 17:01:20 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2018-12-18 20:33:00 +00:00
2019-06-04 16:29:58 +00:00
2019-03-21 19:59:49 +00:00
2018-03-20 01:47:58 +00:00
2019-06-20 17:15:21 +00:00
2018-04-03 22:50:16 +00:00
2019-01-17 18:18:53 +00:00
2019-06-21 16:03:06 +00:00
2018-12-18 20:33:00 +00:00
2018-06-08 00:41:01 +00:00
2019-05-09 17:43:52 +00:00
2019-02-08 15:34:12 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2019-03-14 15:17:37 +00:00
2018-08-17 22:18:08 +00:00
2019-05-09 17:43:52 +00:00
2019-01-17 18:18:53 +00:00
2018-05-18 21:59:29 +00:00
2019-05-09 17:43:52 +00:00
2019-05-09 17:43:52 +00:00
2018-01-19 17:12:54 +00:00
2018-12-18 20:33:00 +00:00
2019-09-07 00:34:43 +00:00
2018-11-28 21:44:06 +00:00
2018-06-26 02:50:04 +00:00
2019-03-14 15:17:37 +00:00
2019-08-03 14:28:34 +00:00