[PATCH] D23657: Remove some false positives when taking the address of packed members

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 4 06:00:23 PDT 2016


rogfer01 updated this revision to Diff 73466.
rogfer01 added a comment.

Change algorithm following @rsmith suggestions by computing the offset of the whole access and compare it against the expected alignment, so reduced aligned structs inside overaligned structs does not yield a warning.

Also ignore parentheses where necessary, which was effectively preventing silencing some false positives.

Includes testcases suggested by @rsmith and @joerg.


https://reviews.llvm.org/D23657

Files:
  include/clang/Sema/Sema.h
  lib/Sema/SemaChecking.cpp
  test/Sema/address-packed.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23657.73466.patch
Type: text/x-patch
Size: 9252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161004/1fa41251/attachment.bin>


More information about the cfe-commits mailing list