summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-08-12 08:04:13 +0000
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-08-12 08:04:13 +0000
commit722a4db1985ca9a8b982074d658dfee9c4624d53 (patch)
tree6e1feae76b0cb2244b98abbc4f2e33457fe32a74 /lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp
parent85c6b44817227d838a3f3385f707ecf42dc79713 (diff)
downloadbcm5719-llvm-722a4db1985ca9a8b982074d658dfee9c4624d53.tar.gz
bcm5719-llvm-722a4db1985ca9a8b982074d658dfee9c4624d53.zip
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
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/thread/main2.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud