[cfe-dev] Adding a flag for a new warning?

Gabor Kozar kozargabor at gmail.com
Fri Jan 9 03:38:01 PST 2015


Hi Richard,

It turns out it'd be useful to rebuild the "diagtool" binary so that it
can pick up the changes... :) Sorry about the noise and thank you for
your help!

---
Best regards,

Gábor 'ShdNx' Kozár http://gaborkozar.me



On Thu, Jan 8, 2015, at 18:31, Richard Trieu wrote:
> Hi Gabor,
>
> You method looks correct for adding a new warning with a warning flag.
> It doesn't look like it would affect the warning flags test. Could you
> attach a diff so I can take a closer look?
>
> Richard
>
> On Thu, Jan 8, 2015 at 8:38 AM, Gabor Kozar
> <kozargabor at gmail.com> wrote:
>> __
>> Hi,
>>
>> So I've implemented a new warning in clang, but now the test
>> Misc/warning-flags.c is failing: I need to introduce a flag
>> corresponding to this warning.
>>
>> This is about how my warning looks like in DiagnosticSemaKinds.td:
>>
>>> def warn_my_first_warning: Warning< "something is wrong here">,
>>> InGroup<MyFirstWarning>;
>>
>> And I've created a corresponding group in DiagnosticGroups.td:
>>
>>> def MyFirstWarning: DiagGroup<"my-first-warning">;
>>>
>>> def MyWarnings : DiagGroup<"my", [MyFirstWarning]>;
>>
>> But this does not seem to have fixed the issue, I still see my
>> warning in the output of diagtool in the "Warnings without
>> flags" list.
>>
>> I couldn't find any relating information in the clang documentation.
>> Any help would be appreciated.
>>
>> ---
>> Best regards,
>>
>> Gábor 'ShdNx' Kozár http://gaborkozar.me
>>
>>
>>
>> _______________________________________________
>>
cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150109/115f213a/attachment.html>


More information about the cfe-dev mailing list