Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-11 Thread Bruno Cardoso Lopes via cfe-commits
On Thu, Aug 11, 2016 at 5:43 AM, Joerg Sonnenberger via cfe-commits wrote: > > On Wed, Aug 10, 2016 at 02:36:01PM -0700, Bruno Cardoso Lopes wrote: > > Hi Joerg, > > > > > Given that bzero is pretty much non-standard at this point, I strongly > > > dislike the approach of checking only the functio

Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-11 Thread Joerg Sonnenberger via cfe-commits
On Wed, Aug 10, 2016 at 02:36:01PM -0700, Bruno Cardoso Lopes wrote: > Hi Joerg, > > > Given that bzero is pretty much non-standard at this point, I strongly > > dislike the approach of checking only the function name. > > Thanks for the feedback. bzero it's widely used though, I think it's a > u

Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
Hi Joerg, > Given that bzero is pretty much non-standard at this point, I strongly > dislike the approach of checking only the function name. Thanks for the feedback. bzero it's widely used though, I think it's a usability win to perform a diagnostic here, despite bzero being non-standard. Is th

Re: r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Joerg Sonnenberger via cfe-commits
On Wed, Aug 10, 2016 at 06:34:47PM -, Bruno Cardoso Lopes via cfe-commits wrote: > Author: bruno > Date: Wed Aug 10 13:34:47 2016 > New Revision: 278264 > > URL: http://llvm.org/viewvc/llvm-project?rev=278264&view=rev > Log: > Reapply [Sema] Add sizeof diagnostics for bzero Given that bzero

r278264 - Reapply [Sema] Add sizeof diagnostics for bzero

2016-08-10 Thread Bruno Cardoso Lopes via cfe-commits
Author: bruno Date: Wed Aug 10 13:34:47 2016 New Revision: 278264 URL: http://llvm.org/viewvc/llvm-project?rev=278264&view=rev Log: Reapply [Sema] Add sizeof diagnostics for bzero Reapply r277787. For memset (and others) we can get diagnostics like: struct stat { int x; }; void foo(struct st