Setting up clang-format
-----------------------
-|Gromacs| formatting is enforced with clang-format 7.0.1.
+|Gromacs| formatting is enforced with clang-format 11.0.1.
:command:`clang-format` is one of the core *clang* tools.
It may be included in a *clang* or *llvm* package from your favorite packaging
system or you may find a standalone *clang-format* package,
-but you should confirm that the provided command is version 7.0.1 or
-7.1.0. Example::
+but you should confirm that the provided command is version 11.0.0 or 11.0.1.
+Example::
$ clang-format --version
- clang-format version 7.1.0 (tags/RELEASE_710/final)
+ clang-format version 11.0.0
If you use a different version of clang-format,
you will likely get different formatting results than
.. note::
- Refer to `LLVM <http://releases.llvm.org/download.html#7.1.0>`__ for
+ Refer to `LLVM <http://releases.llvm.org/download.html#11.0.0>`__ for
source and binary downloads.
If downloading sources, note that you will need to download both the
*LLVM source code* and the *Clang source code*.
As per the clang
- `INSTALL.txt <https://github.com/llvm/llvm-project/blob/release/7.x/clang/INSTALL.txt>`__,
+ `INSTALL.txt <https://github.com/llvm/llvm-project/blob/release/11.x/clang/INSTALL.txt>`__,
place the expanded clang source into a :file:`tools/clang` subdirectory within
the expanded llvm archive, then run CMake against the llvm source directory.
which will be automatically updated (if necessary) when you :command:`git pull`
from the |Gromacs| repository.
For more about the tool and the :file:`.clang-format` configuration file,
-visit https://releases.llvm.org/7.0.1/tools/clang/docs/ClangFormat.html
+visit https://releases.llvm.org/11.0.1/tools/clang/docs/ClangFormat.html
What is automatically formatted?
--------------------------------