[cfe-dev] proposal: every warning should have a -W flag
Ted Kremenek
kremenek at apple.com
Tue Aug 9 17:04:21 PDT 2011
On Aug 9, 2011, at 4:11 PM, Aaron Ballman wrote:
> On Tue, Aug 9, 2011 at 5:49 PM, Douglas Gregor <dgregor at apple.com> wrote:
>
>>>> This, of course, is predicated on the thought that having individual
>>>> warning numbers is useful to the majority of people. From personal
>>>> experience, I like having a warning number because it makes it easier
>>>> to Google for others who've had the same issue. Most diagnostics
>>>> contain source-specific information, and so Google searches become a
>>>> guessing game of what keywords are important. YMMV
>>>
>>> But yes, this is the selling point for having numbered diagnostics.
>>
>> This is the selling point of having a unique searchable name. It doesn't have to be an otherwise-meaningless number.
>
> Definitely agreed. I think the hard part is the uniqueness of the
> names. You don't run into that with meaningless numbers. But as was
> pointed out, suppressing random numbers in code isn't exactly the best
> thing ever either. So in that regard, unique names are definitely
> preferred.
All of our diagnostics have unique tablegen entries, so getting unique names for -W flags might not be that hard. When one looks at the .td files, many of the diagnostic names directly correspond to the -W flag.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110809/35934655/attachment.html>
More information about the cfe-dev
mailing list