CLANG-APPLY-REPLACEMENTS(1)

πŸ“¦
version 20.1.8 Β· 4 versions
, in ubuntu stonking

πŸ’– NAME πŸ’–

clang-apply-replacements β€” bestie, it's the manual page for clang-apply-replacements 20, and yes we are reading the whole thing together, no skimming ✨


🌸 DESCRIPTION 🌸

okay so, here's the whole vibe:

USAGE: clang-apply-replacements [options] <Search Root Directory>

OPTIONS: are giving main character energy, so let's go πŸ‘‘

πŸŽ€ Formatting Options πŸŽ€

  • --format β€” turns on formatting for any code that got changed by applying replacements. and like, if you wanna pick how it formats, you use -style for that πŸ’…
  • --style=<string> β€” sets the coding style, and <string> can be any of these four things, no cap:
    1. a preset, and the presets are: LLVM, GNU, Google, Chromium, Microsoft, Mozilla, WebKit.
    2. 'file' β€” this loads the style config straight out of a .clang-format file sitting in one of the parent directories of the source file (and for stdin, check --assume-filename btw). if there's literally no .clang-format file to be found anywhere, it falls back to --fallback-style. also important: --style=file is the default, periodt.
    3. 'file:<format_file_path>' β€” this one lets you point at the config file explicitly, like you're naming names 🫢
    4. "{key: value, ...}" β€” set specific parameters yourself, for example:
--style="{BasedOnStyle: llvm, IndentWidth: 8}"
  • --style-config=<string> β€” a path to a directory that contains a .clang-format file, and that file describes the formatting style to use for formatting code when you're running with -style=file. iykyk πŸ’œ

✨ Generic Options ✨

  • --help β€” shows you the available options (and if you want even more, there's --help-hidden πŸ‘€)
  • --help-list β€” shows you the list of available options (and again, --help-list-hidden for more)
  • --version β€” displays the version of this program ⭐

πŸ¦‹ Replacement Options πŸ¦‹

  • --ignore-insert-conflict β€” ignores the insert conflict and just keeps running so it can fix stuff. literally refusing to let the drama stop her 😭
  • --remove-change-desc-files β€” removes the change description files regardless of whether the merging/replacing actually succeeded. yes, regardless. she does not check first πŸ’€
ngl bestie, that last one is doing the most β€” it deletes those files no matter what went down, so know that going in.

and that's the whole page, mwah πŸ’‹ this was clang-apply-replacements version 20, documented back in September 2026, from the CLANG-APPLY-REPLACEMENTS(1) era of the manual β€” stay iconic, go fix some code, and don't forget the <Search Root Directory> πŸŽ€βœ¨

πŸ“¦ where this page comes from