Hi,
Im looking at an old minor bug for “Missing -Wparentheses warning” where clang do not warning for a missing parentheses in the case of “assert(x && val == 4 || (!x && val == 5));” whereas GCC would complain about missing parentheses for x && val == 4.
https://bugs.llvm.org/show_bug.cgi?id=18971
The following comments are found in the code so it seems like a conscious decision.
// Warn about arg1 || arg2 && arg3, as GCC 4.3+ does.
// We don’t warn for ‘assert(a || b && “bad”)’ since this is safe.
And since we never warn on macros
if (Opc == BO_LOr && !OpLoc.isMacroID()/* Don't warn in macros. */)