[PATCH] D20561: Warn when taking address of packed member

Roger Ferrer Ibanez via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 14 04:35:01 PDT 2016


rogfer01 removed rL LLVM as the repository for this revision.
rogfer01 updated this revision to Diff 60664.
rogfer01 added a comment.

This new patch adds a whitelist for memcpy, memmove, memset and memcmp.

I'm not entirely happy with the strategy that I'm using, where Parser communicates to Sema which is the LHS of a direct function call being parsed. Better approaches are of course welcome.


http://reviews.llvm.org/D20561

Files:
  include/clang/Basic/DiagnosticSemaKinds.td
  include/clang/Sema/Sema.h
  lib/Parse/ParseExpr.cpp
  lib/Sema/SemaChecking.cpp
  lib/Sema/SemaExpr.cpp
  test/Sema/address-packed-member-whitelist.c
  test/Sema/address-packed.c
  test/SemaCXX/address-packed-member-whitelist.cpp
  test/SemaCXX/address-packed.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20561.60664.patch
Type: text/x-patch
Size: 15386 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160614/db4ad233/attachment.bin>


More information about the cfe-commits mailing list