llvm-project/clang/lib/Serialization
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
..
ASTCommon.cpp Add SVE opaque built-in types 2019-08-09 08:52:54 +00:00
ASTCommon.h [OPENMP 5.0]Add initial support for 'allocate' directive. 2019-03-07 17:54:44 +00:00
ASTReader.cpp ASTReader: Bypass overridden files when reading PCHs 2019-08-30 22:59:25 +00:00
ASTReaderDecl.cpp [Sema] Diagnose default-initialization, destruction, and copying of 2019-09-07 00:34:43 +00:00
ASTReaderInternals.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ASTReaderStmt.cpp [OPENMP]Support for non-rectangular loops. 2019-08-14 19:30:06 +00:00
ASTWriter.cpp ContentCache: Drop getBuffer's dependency on SourceManager 2019-08-26 20:32:05 +00:00
ASTWriterDecl.cpp [Sema] Diagnose default-initialization, destruction, and copying of 2019-09-07 00:34:43 +00:00
ASTWriterStmt.cpp [OPENMP]Support for non-rectangular loops. 2019-08-14 19:30:06 +00:00
CMakeLists.txt [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
GeneratePCH.cpp [Bitcode] Move Bitstream to a separate library 2019-07-03 22:40:07 +00:00
GlobalModuleIndex.cpp [clang] Adopt new FileManager error-returning APIs 2019-08-01 21:31:56 +00:00
InMemoryModuleCache.cpp Modules: Invalidate out-of-date PCMs as they're discovered 2019-03-09 17:44:01 +00:00
Module.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleFileExtension.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ModuleManager.cpp FileManager: Remove ShouldCloseOpenFile argument from getBufferForFile, NFC 2019-08-30 16:56:26 +00:00
MultiOnDiskHashTable.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PCHContainerOperations.cpp [Clang] Migrate llvm::make_unique to std::make_unique 2019-08-14 23:04:18 +00:00