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

JVApen via cfe-dev cfe-dev at lists.llvm.org
Sat Oct 13 09:51:47 PDT 2018

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

Any suggestions?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181013/6ef9cb2f/attachment.html>

More information about the cfe-dev mailing list