# Extra Clang Tools 22.1.2 documentation

## clang-tidy - readability-inconsistent-ifelse-braces

# readability-inconsistent-ifelse-braces

Detects `if`/`else` statements where one branch uses braces and the other does not.

Before:

    if (condition) {
      statement;
    } else
      statement;

    if (condition)
      statement;

    if (condition)
      statement;
    else
      statement;

After:

    if (condition) {
      statement;
    } else {
      statement;
    }

    if (condition)
      statement;

    if (condition)
      statement;
    else
      statement;