summaryrefslogtreecommitdiffstats
path: root/compiler-rt/lib/esan/working_set.cpp
diff options
context:
space:
mode:
authorRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-06-13 15:41:40 +0000
committerRoger Ferrer Ibanez <roger.ferreribanez@arm.com>2016-06-13 15:41:40 +0000
commitac6617b288eda8958d060328163ae05050a59b25 (patch)
tree7d03bd146c59467fd363c2b6e6c3c5ee9c824c63 /compiler-rt/lib/esan/working_set.cpp
parentaf0bbd92a2ea14a42a7ca83da5d40bf18a0a7aba (diff)
downloadbcm5719-llvm-ac6617b288eda8958d060328163ae05050a59b25.tar.gz
bcm5719-llvm-ac6617b288eda8958d060328163ae05050a59b25.zip
Warn when taking address of a packed member
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 Differential Revision: http://reviews.llvm.org/D20561 llvm-svn: 272552
Diffstat (limited to 'compiler-rt/lib/esan/working_set.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud