Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-29 Thread Chandler Carruth
I don't really disagree with either your or Evan's meta points. =] I agree something in this form *should* go into the tree. On Fri, May 25, 2012 at 6:14 PM, Chris Lattner clatt...@apple.com wrote: I definitely want this designed and implemented in the right way. This is the key. I never saw

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-29 Thread Evan Cheng
On May 29, 2012, at 10:09 AM, Chandler Carruth wrote: I don't really disagree with either your or Evan's meta points. =] I agree something in this form *should* go into the tree. On Fri, May 25, 2012 at 6:14 PM, Chris Lattner clatt...@apple.com wrote: I definitely want this designed and

[cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Nuno Lopes
Author: nlopes Date: Fri May 25 12:04:42 2012 New Revision: 157483 URL: http://llvm.org/viewvc/llvm-project?rev=157483view=rev Log: add CodeGen support for the alloc_size attribute Added: cfe/trunk/test/CodeGen/alloc_size.c Modified: cfe/trunk/lib/CodeGen/CGCall.cpp Modified:

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Jordy Rose
Suggestion: use the stack-based SmallVector instead of std::vector. Also, a CXXMethodDecl might be a static method, so you'll need to check isInstance() as well. Jordy On May 25, 2012, at 13:04, Nuno Lopes wrote: Author: nlopes Date: Fri May 25 12:04:42 2012 New Revision: 157483 URL:

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Chandler Carruth
Nuno, this patch didn't get reviewed before commit. The LLVM review is ongoing, and seems to indicate the solution is not yet ready. Folks have also raised serious concerns about the implementation strategy here. While supporting the alloc_size attribute at least enough to parse it and reject

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Nuno Lopes
Fixed in r157500. Thanks for the review, Nuno Citando Jordy Rose jedik...@belkadan.com: Suggestion: use the stack-based SmallVector instead of std::vector. Also, a CXXMethodDecl might be a static method, so you'll need to check isInstance() as well. Jordy On May 25, 2012, at 13:04,

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Nuno Lopes
There has been some discussion on both the bounds checking and the alloc_size proposals on the various mailing lists (dev commits) for the past month. Yes, the design is not finished. But I've been making changes to the implementation to accommodate the feedback. Nuno Citando Chandler

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Douglas Gregor
On May 25, 2012, at 3:23 PM, Nuno Lopes nunoplo...@sapo.pt wrote: There has been some discussion on both the bounds checking and the alloc_size proposals on the various mailing lists (dev commits) for the past month. Yes, the design is not finished. But I've been making changes to the

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Evan Cheng
The primary concerns I have seen so far are it doesn't serve the needs for all memory safety techniques. Did I miss some other specific concern about alloc_size attribute? I think I should address the recent discussions the LLVM side wrt to the bounds checking pass. I've been following the

Re: [cfe-commits] r157483 - in /cfe/trunk: lib/CodeGen/CGCall.cpp test/CodeGen/alloc_size.c

2012-05-25 Thread Chris Lattner
On May 25, 2012, at 3:43 PM, Evan Cheng wrote: The primary concerns I have seen so far are it doesn't serve the needs for all memory safety techniques. Did I miss some other specific concern about alloc_size attribute? On another note, one part of Nuno's goal for the summer is to implement