[PATCH] D14274: Add alloc_size attribute to clang

2016-12-19 Thread George Burgess IV via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL290149: Add the alloc_size attribute to clang. (authored by gbiv). Changed prior to commit: https://reviews.llvm.org/D14274?vs=77222=82046#toc Repository: rL LLVM https://reviews.llvm.org/D14274

[PATCH] D14274: Add alloc_size attribute to clang

2016-12-19 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Thanks, everyone! :) Repository: rL LLVM https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D14274: Add alloc_size attribute to clang

2016-12-16 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. I still think that this looks good, so if @rsmith doesn't comment over the weekend, you can go ahead and commit on Monday -- we can handle any feedback in post-commit review. Comment at: include/clang/Basic/AttrDocs.td:240 + Specifically,

[PATCH] D14274: Add alloc_size attribute to clang

2016-12-05 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Ping :) https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-30 Thread George Burgess IV via Phabricator via cfe-commits
george.burgess.iv added a comment. Ping https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-08 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 77222. george.burgess.iv added a comment. Rebased and made the `__builtin_object_size` code a tiny bit cleaner. The blocks bugfix I mentioned will be up as a separate review in a few minutes. :) https://reviews.llvm.org/D14274 Files:

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-02 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. With any luck, this'll be on the top of my to-do list next week. :) https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D14274: Add alloc_size attribute to clang

2016-11-02 Thread Hal Finkel via cfe-commits
hfinkel added a comment. What's the status of this? https://reviews.llvm.org/D14274 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: test/CodeGenCXX/alloc-size.cpp:66 @@ +65,3 @@ + // CHECK: ret i32 122 + return __builtin_object_size(my_malloc(), 0) + + __builtin_object_size(my_calloc(5), 0) + ahatanak wrote: > george.burgess.iv

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added inline comments. Comment at: test/CodeGenCXX/alloc-size.cpp:66 @@ +65,3 @@ + // CHECK: ret i32 122 + return __builtin_object_size(my_malloc(), 0) + + __builtin_object_size(my_calloc(5), 0) + george.burgess.iv wrote: > ahatanak wrote: > >

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. > I'm wondering what the status of this patch is since someone has asked us to > add support for this attribute in clang. Are you still waiting for review? Waiting for an LGTM from Richard, though this patch currently doesn't pass all tests. One of the

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-08-03 Thread Akira Hatanaka via cfe-commits
ahatanak added a subscriber: ahatanak. ahatanak added a comment. I'm wondering what the status of this patch is since someone has asked us to add support for this attribute in clang. Are you still waiting for review? Comment at: test/CodeGenCXX/alloc-size.cpp:66 @@ +65,3 @@ +

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-05-02 Thread Aaron Ballman via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. Thank you for working on this! LGTM, but please wait for @rsmith to okay as well. Comment at: test/SemaCXX/constant-expression-cxx11.cpp:1171 @@ -1170,3

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-28 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/Basic/Attr.td:753 @@ +752,3 @@ + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>]; + let TemplateDependent = 1; + let Documentation = [AllocSizeDocs]; aaron.ballman

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-28 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 55478. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed all feedback http://reviews.llvm.org/D14274 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-28 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:753 @@ +752,3 @@ + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>]; + let TemplateDependent = 1; + let Documentation = [AllocSizeDocs]; I don't see any C++

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-04-13 Thread George Burgess IV via cfe-commits
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

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-02-02 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaDeclAttr.cpp:737 @@ +736,3 @@ +unsigned FuncParamNo, unsigned AttrArgNo) { + assert(Attr.getArg(AttrArgNo).is()); + // FuncParamNo is base-1 aaron.ballman

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-02-02 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 46693. george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Addressed all feedback. http://reviews.llvm.org/D14274 Files: include/clang/Basic/Attr.td include/clang/Basic/AttrDocs.td

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-02-02 Thread Aaron Ballman via cfe-commits
aaron.ballman added a comment. The attribute part looks mostly good (a few small nits), but the rest should be reviewed by @rsmith. Comment at: lib/Sema/SemaDeclAttr.cpp:737 @@ +736,3 @@ +unsigned FuncParamNo, unsigned AttrArgNo) { +

Re: [PATCH] D14274: Add alloc_size attribute to clang

2016-01-21 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 45622. george.burgess.iv added a comment. - Rebased - Removed bits that were already upstreamed as part of http://reviews.llvm.org/D14877 - Added support for LLVM's `allocsize` attribute (under review at http://reviews.llvm.org/D14933 )

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-11 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: include/clang/Basic/AttrDocs.td:214 @@ +213,3 @@ + that we can lower to in the near future. This should cover a large number of + nonconst cases. + }]; nonconst -> non-const? http://reviews.llvm.org/D14274

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-11 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42547. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. - Fixed wording in AttrDocs - Realized I forgot to press 'submit' on comment responses after the last update. Will correct this in ~5 seconds :)

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-11 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: include/clang/Basic/Attr.td:714 @@ +713,3 @@ + let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[Function]>; + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>];

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-10 Thread Aaron Ballman via cfe-commits
aaron.ballman added inline comments. Comment at: include/clang/Basic/Attr.td:714 @@ +713,3 @@ + let Spellings = [GCC<"alloc_size">]; + let Subjects = SubjectList<[Function]>; + let Args = [IntArgument<"ElemSizeParam">, IntArgument<"NumElemsParam", 1>]; Should

Re: [PATCH] D14274: Add alloc_size attribute to clang

2015-12-09 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Also, due to allowing the evaluation of const expressions as constexpr expressions, this patch needs http://reviews.llvm.org/D14877 to go in so we don't break tests. :) http://reviews.llvm.org/D14274 ___

[PATCH] D14274: Add alloc_size attribute to clang

2015-11-02 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added a subscriber: cfe-commits. This is the first in a two patch series aimed at adding the alloc_size attribute to clang. This patch adds the alloc_size attribute, docs, and all of the logic