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

Gabor Kozar kozargabor at gmail.com
Thu Jan 8 08:38:29 PST 2015


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


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150108/608fdce5/attachment.html>


More information about the cfe-dev mailing list