Go to file
Roger Ferrer Ibanez 722a4db198 This patch implements PR#22821.
Taking the address of a packed member is dangerous since the reduced
alignment of the pointee is lost. This can lead to memory alignment
faults in some architectures if the pointer value is dereferenced.

This change adds a new warning to clang emitted when taking the address
of a packed member. A packed member is either a field/data member
declared as attribute((packed)) or belonging to a struct/class
declared as such. The associated flag is -Waddress-of-packed-member.
Conversions (either implicit or via a valid casting) to pointer types
with lower or equal alignment requirements (e.g. void* or char*)
will silence the warning.

Differential Revision: https://reviews.llvm.org/D20561

llvm-svn: 278483
2016-08-12 08:04:13 +00:00
clang This patch implements PR#22821. 2016-08-12 08:04:13 +00:00
clang-tools-extra [clang-tidy] fix readability-else-after-return test 2016-08-11 08:18:39 +00:00
compiler-rt [CMake] If the compiler supports _Atomic include atomic.c in builtins libraries 2016-08-12 01:29:26 +00:00
debuginfo-tests New round of fixes for "Always compile debuginfo-tests for the host triple" 2014-10-18 23:47:59 +00:00
libclc Make min follow the OCL 1.0 specs 2016-07-25 22:36:22 +00:00
libcxx Remove test for the sign of a NaN - doesn't work on MIPS, not strictly legal. Fixes bug 28936 2016-08-11 18:46:24 +00:00
libcxxabi Depend directly on unwind when not building standalone 2016-08-09 21:28:52 +00:00
libunwind Allow building both shared and static library 2016-08-08 22:55:48 +00:00
lld [ELF][MIPS] Support .MIPS.abiflags section 2016-08-12 06:28:49 +00:00
lldb Decoupled Options from CommandInterpreter. 2016-08-11 23:51:28 +00:00
llgo [llgo] add llgo source path to LLVM_GO_PACKAGES 2016-07-27 03:01:00 +00:00
llvm [Coroutines]: Part6b: Add coro.id intrinsic. 2016-08-12 05:45:49 +00:00
openmp Fixes for hierarchical barrier (possible hang if team size changed). 2016-08-11 13:04:00 +00:00
parallel-libs [StreamExecutor] Add DeviceMemory and kernel arg packing 2016-08-08 16:45:19 +00:00
polly [GPGPU] Ensure arrays where only parts are modified are copied to GPU 2016-08-10 10:58:19 +00:00