brintos

brintos / llvm-project-archived public Read only

0
0
Text · 868 B · 2c08165 Raw
39 lines · plain
1.. title:: clang-tidy - readability-braces-around-statements2 3readability-braces-around-statements4====================================5 6`google-readability-braces-around-statements` redirects here as an alias for7this check.8 9Checks that bodies of ``if`` statements and loops (``for``, ``do while``, and10``while``) are inside braces.11 12Before:13 14.. code-block:: c++15 16  if (condition)17    statement;18 19After:20 21.. code-block:: c++22 23  if (condition) {24    statement;25  }26 27Options28-------29 30.. option:: ShortStatementLines31 32   Defines the minimal number of lines that the statement should have in order33   to trigger this check.34 35   The number of lines is counted from the end of condition or initial keyword36   (``do``/``else``) until the last line of the inner statement. Default value37   `0` means that braces will be added to all statements (not having them38   already).39