[cfe-dev] Ignoring compiler warnings without ignoring the group

Richard Smith via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 13 20:23:20 PDT 2018


On Sat, 13 Oct 2018, 18:39 David Blaikie via cfe-dev <cfe-dev at lists.llvm.org
wrote:

> I don't believe there's a way to do that (disable diagnostics from a
> group, but keep any subgroups enabled (or the opposite, I guess, etc)) -
> but it does seem like a nice feature request/thing to think about.
>

That would lose the important property that we can spilt a warning up into
subgroups in a backwards-compatible way.

Perhaps instead we should aim to add sufficient subgroups so that there are
no warning flags that contain both warnings and subgroups?

On Sat, Oct 13, 2018 at 9:51 AM JVApen via cfe-dev <cfe-dev at lists.llvm.org>
> wrote:
>
>> Hello all,
>>
>> Clang has wonderful diagnostics! Unfortunately when you enable them on a
>> code-base of several years old, a lot get triggered. In order to phase the
>> path to a better world, we have all warnings enabled (as error).
>> With this, we disable (and document) the warnings we don't want and keep
>> track of those not yet investigated.
>>
>> For example:
>>
>> *#pragma clang diagnostic ignored
>> "-Wparentheses"                          // using the result of an
>> assignment as a condition without parentheses*
>> However, when removing this line, I get the following warning:
>> *error: '&&' within '||' [-Werror,-Wlogical-op-parentheses]*
>>
>> I'm aware of the 'diagnostic groups', which is causing this.
>> However, I do am wondering if their is a way to disable these groups and
>> indicate that we only want the warning ignored without the elements in that
>> group.
>>
>> Any suggestions?
>>
>>
>> JVApen
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181013/d148f811/attachment.html>


More information about the cfe-dev mailing list