---
name: "clang-format-diff-4.0"
section: "1"
platform: "linux"
package: "clang-format-4.0"
version: "1:4.0.1-10~deb9u2"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/clang-format-diff-4.0"
---

# clang-format-diff-4.0(1)

manual page for clang-format-diff.py 4.0

## NAME

clang-format-diff.py - manual page for clang-format-diff.py 4.0

## DESCRIPTION

usage: clang-format-diff.py \[-h\] \[-i\] \[-p NUM\] \[-regex PATTERN\]

- \[-iregex PATTERN\] \[-sort-includes\] \[-v\]

  \[-style STYLE\] \[-binary BINARY\]

Reformat changed lines in diff. Without **-i** option just output the diff that would be introduced.

### optional arguments:

- **-h**, **--help**

  show this help message and exit

- **-i**

  apply edits to files instead of displaying a diff

- **-p** NUM

  strip the smallest prefix containing P slashes

- **-regex** PATTERN

  custom pattern selecting file paths to reformat (case sensitive, overrides **-iregex**)

- **-iregex** PATTERN

  custom pattern selecting file paths to reformat (case insensitive, overridden by **-regex**)

- **-sort-includes**

  let clang-format sort include blocks

- **-v**, **--verbose**

  be more verbose, ineffective without **-i**

- **-style** STYLE

  formatting style to apply (LLVM, Google, Chromium, Mozilla, WebKit)

- **-binary** BINARY

  location of binary to use for clang-format

## SEE ALSO

The full documentation for **clang-format-diff.py** is maintained as a Texinfo manual.  If the **info** and **clang-format-diff.py** programs are properly installed at your site, the command

-

  **info clang-format-diff.py**

should give you access to the complete manual.
