@@ -340,13 +340,13 @@ To avoid waiting until you've made a PR to find formatting issues, you can
340
340
install clang-format locally and run it against your code as you are working.
341
341
342
342
Different versions of clang-format have slightly different behaviors. CBMC uses
343
- clang-format-7 as it is available the repositories for Ubuntu 18.04 and
343
+ clang-format-10 as it is available the repositories for Ubuntu 18.04 and
344
344
Homebrew.
345
345
To install on a Unix-like system, try installing using the system package
346
346
manager:
347
347
```
348
- apt-get install clang-format-7 # Run this on Ubuntu, Debian etc.
349
- brew install clang-format@7 # Run this on a Mac with Homebrew installed
348
+ apt-get install clang-format-10 # Run this on Ubuntu, Debian etc.
349
+ brew install clang-format@10 # Run this on a Mac with Homebrew installed
350
350
```
351
351
352
352
If your platform doesn't have a package for clang-format, you can download a
@@ -358,12 +358,12 @@ the [LLVM Snapshot Builds page](http://llvm.org/builds/).
358
358
359
359
### FORMATTING A RANGE OF COMMITS
360
360
361
- Clang-format is distributed with a driver script called git-clang-format-7 .
361
+ Clang-format is distributed with a driver script called git-clang-format.
362
362
This script can be used to format git diffs (rather than entire files).
363
363
364
364
After committing some code, it is recommended to run:
365
365
```
366
- git-clang-format-7 upstream/develop
366
+ git-clang-format upstream/develop
367
367
```
368
368
* Important:* If your branch is based on a branch other than ` upstream/develop ` ,
369
369
use the name or checksum of that branch instead. It is strongly recommended to
@@ -373,7 +373,7 @@ rebase your work onto the tip of the branch it's based on before running
373
373
Note: By default, git-clang-format uses the git config variable
374
374
` clangformat.binary ` . If you have multiple versions of clang-format installed,
375
375
you might need to update this, or explicitly specify the binary to use via
376
- ` --binary clang-format-7 ` .
376
+ ` --binary clang-format-10 ` .
377
377
378
378
### RETROACTIVELY FORMATTING INDIVIDUAL COMMITS
379
379
@@ -385,7 +385,7 @@ The following command will stop at each commit in the range and run
385
385
clang-format on the diff at that point. This rewrites git history, so it's
386
386
* unsafe* , and you should back up your branch before running this command:
387
387
```
388
- git filter-branch --tree-filter 'git-clang-format-7 upstream/develop' \
388
+ git filter-branch --tree-filter 'git-clang-format upstream/develop' \
389
389
-- upstream/develop..HEAD
390
390
```
391
391
* Important* : ` upstream/develop ` should be changed in * both* places in the
0 commit comments