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

Richard Trieu rtrieu at google.com
Thu Jan 8 10:31:09 PST 2015


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/20150108/ac2f42a6/attachment.html>


More information about the cfe-dev mailing list