[PATCH] D14274: Add alloc_size attribute to clang

George Burgess IV via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 13:25:51 PDT 2016


george.burgess.iv updated this revision to Diff 53611.
george.burgess.iv added a comment.

Now that `allocsize` is in LLVM (r266032), this isn't blocked. Yay!

Rebased, added a few tests, did a few tiny refactors, and fixed an overflow bug when the user tried to allocate `2**63 < N < 2**64` bytes (because `CharUnits` uses an `int64_t` as storage).


http://reviews.llvm.org/D14274

Files:
  include/clang/Basic/Attr.td
  include/clang/Basic/AttrDocs.td
  include/clang/Basic/DiagnosticSemaKinds.td
  lib/AST/ExprConstant.cpp
  lib/CodeGen/CGCall.cpp
  lib/Sema/SemaDeclAttr.cpp
  test/CodeGen/alloc-size.c
  test/CodeGenCXX/global-init.cpp
  test/Sema/alloc-size.c
  test/SemaCXX/constant-expression-cxx11.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14274.53611.patch
Type: text/x-patch
Size: 60259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160413/f55fd820/attachment-0001.bin>


More information about the cfe-commits mailing list