CLANG-APPLY-REPLACEMENTS(1)
π NAME π
clang-apply-replacements β bestie, this is the manual page for clang-apply-replacements 15, and yes we are gonna get you through it π«Ά
β¨ DESCRIPTION β¨
Okay so boom, here's how you call it:
USAGE: clang-apply-replacements [options] <Search Root Directory>
That's the whole vibe. You hand it a Search Root Directory, sprinkle in some options, and it goes and does its little replacement thing. Slay. π
Fr fr though, <Search Root Directory> is doing a lot of heavy lifting here β it's literally where the tool goes looking. Don't skip it.
π OPTIONS π
Not me listing every single one for you because I love you and I want you to know all of them. No skipping, periodt. β¨
πΈ Formatting Options πΈ
These are the ones that make your code look cute after it gets messed with.
--formatβ turns on formatting for any code that got changed by applying replacements. And like, if you wanna pick which formatting style, that's what-styleis for. Obsessed with options having options. π--style=<string>β sets the coding style. And<string>can be one of these four things, so pay attention bestie:- A preset, and the presets are:
LLVM,GNU,Google,Chromium,Microsoft,Mozilla,WebKit. Pick your fighter. π 'file'β this one loads the style config out of a.clang-formatfile sitting in one of the parent directories of the source file. (And for stdin, see--assume-filename, okay?) If there is no.clang-formatfile anywhere, it falls back to--fallback-style. Also important:--style=fileis the default, so this is what you're getting unless you say otherwise. π'file:<format_file_path>'β the way you explicitly point at the exact configuration file you want. No guessing, no vibes, just the path. π―"{key: value, ...}"β inline parameters, for when you're feeling specific. Example, literally this:
- A preset, and the presets are:
--style="{BasedOnStyle: llvm, IndentWidth: 8}"
--style-config=<string>β a path to a directory that contains a.clang-formatfile, and that file describes the formatting style to use for formatting code when you're running-style=file. It's giving "here's the folder, the file's in there." π§
π Generic Options π
The classics. The icons. The ones every self-respecting command has.
--helpβ shows you the available options. (And--help-hiddenif you want more. Yes, there's more. There's always more. π)--help-listβ shows the list of available options. (And--help-list-hiddenfor more of those too.)--versionβ tells you which version of this program you're running. Main character energy, honestly.
π Replacement Options π
The actual replacement behavior. This is the good stuff.
--ignore-insert-conflictβ ignores an insert conflict and keeps running so it can fix things. Lowkey a "we move" flag. π--remove-change-desc-filesβ removes the change description files, and it does this regardless of whether the merging/replacing was successful. So yeah, heads up on that one. π₯
That's the whole page, bestie β nothing skipped, nothing hidden, every flag accounted for. Go forth and replace responsibly. πβ¨ππ¦πΈπ π«Ά
Signing off from clang-apply-replacements version 15, dated July 2023 β catch you in the next man page, ily. πβπ
π¦ where this page comes from
- ubuntu jammy: clang-tools-15 1:15.0.7-0ubuntu0.22.04.3 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms