[cfe-commits] Null init suggestion
Douglas Gregor
dgregor at apple.com
Wed Sep 7 15:41:14 PDT 2011
On Sep 4, 2011, at 3:59 PM, David Blaikie wrote:
> Hmm - apologies. Realized I'd not actually sent the relevant patch, but just a copy of the previous one that Doug had already applied.
>
> Here's the right one.
>
> On Tue, Aug 30, 2011 at 12:18 PM, David Blaikie <dblaikie at gmail.com> wrote:
>
>
> On Fri, Aug 26, 2011 at 6:39 PM, David Blaikie <dblaikie at gmail.com> wrote:
>> Side note: Do we really need that first note if we're providing the second note? I realize in some cases the first note is all we'll get, because there's no initialization we can guess to provide. But in the cases where there is an init suggestion, could we just provide that instead of the "variable '%s' is declared here"?
>
> Good point. It seems that we don't need to provide the first note if we know we're providing the second. Looping in Ted to get his opinion.
>
> Well - here's a patch you can use if you decide it's the right way to go. (I'm only seeing one clang test failure in something unrelated: Modules/lookup.cpp)
>
> Ted - any thoughts on this?
>
> - David
>
> [should I reinclude a patch when I bump a CR? generally I just assume people will see the original email with the patch attached & I don't want to fill up people's mailboxes more than necessary]
I like the direction of this patch, but I think that the note text used here
note: add initialization to silence this warning
isn't very helpful. If we're only going to print one note, I'd rather it say something like
note: initialize the variable 'x' to silence this warning
- Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20110907/561c25da/attachment.html>
More information about the cfe-commits
mailing list