On Mon, Jun 13, 2011 at 12:49 AM, Hans Wennborg <[email protected]> wrote: > Hi Nico, > > On Mon, Jun 13, 2011 at 6:23 AM, Nico Weber <[email protected]> wrote: >> Hi, >> >> the attached patch produces this diagnostic >> >> test.cpp:16:17: warning: The sizeof expression in 'memset' has type >> 'S *', the same type that the first argument has. The sizeof >> expression should probably have type 'S' instead. > > Would it be possible to issue a fixit to insert a '*' in the right > place? I suppose it might not work very well with arrays though?
I decided against a fixit because it is not always correct. In fact, in chrome 2 of 3 instances of this warning were about pointers to arrays and the fix was different from just inserting a *. Maybe even the diagnostic wording is a bit strong, but I couldn't think of anything better. Nico _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
