Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added a paragraph to describe our usage of clang-format.

...

There are some key differences which are documented here.

Automatic formatting

Our .clang-format file can be found in the repository and is the source of truth for how to deal with whitespace, except when clang-format's output greatly diverges from the style of the surrounding code or common sense. In that case, we should update the .clang-format file.

We aim to gradually adapt the codebase to the output of clang-format. Therefore we only recommend using it on lines that have non-whitespace changes. This can be accomplished with the git-clang-format tool.

Header Files

  1. Separate inline headers: We allow putting inline functions in separate files, using the suffix .inline.h. This can speed up compile times by reducing the volume of code to be compiled and reducing dependencies between headers.

...