mod_full_paren_if_bool

Documentation says:

Whether to fully parenthesize Boolean expressions in 'while' and 'if' statement, as in 'if (a && b > c)' => 'if (a && (b > c))'.

Really in Uncrustify_d-0.70.1_f this option works with if only.

Possible values are true and false, default false.

Examples

true

Before:

if (isOdd(x) && x<y) {
  std::cout << "x is odd and less than " << y << '\n';
}

while(isOdd(x) && x>0) {
  x=x-3;
}

After:

if (isOdd(x) && (x<y)) {
  std::cout << "x is odd and less than " << y << '\n';
}

while(isOdd(x) && x>0) {
  x=x-3;
}

Note, while remains unchanged.

false

Example remains unchanged.

See also