CLANG-INCLUDE-FIXER(1)
π CLANG-INCLUDE-FIXER π
okay so bestie, meet clang-include-fixer β it's the User Commands girlie from the CLANG-INCLUDE-FIXER(1) man page, and she's here to fix your includes. periodt.
β¨ DESCRIPTION β¨
The vibe check first, the whole usage in one glorious line:
USAGE: clang-include-fixer [options] <source0> [... <sourceN>]
Then it says, very iconically:
OPTIONS:
π Generic Options π
These are the standard-issue ones every cool tool gets, no cap:
--helpβ shows you all the available options. and if you want the secret menu, add--help-hiddenfor more π--help-listβ prints the list of available options. same deal:--help-list-hiddengives you more π--versionβ tells you which version of this program you're running. slay.
π Tool options π
the main character section, fr fr:
--db=<value>β picks your input format. the options are:=fixedβ a hard-coded mapping π₯=yamlβ a YAML database, as created byfind-all-symbols=fuzzyYamlβ a YAML database, but with fuzzy-matched names β¨
--extra-arg=<string>β one more argument to append to the compiler command line π«Ά--extra-arg-before=<string>β one more argument to prepend to the compiler command line (yes, before. order matters bestie)--input=<string>β a string used to initialize the database--insert-header=<string>β inserts a specific header. π¨ this one has to run in STDIN mode. the result goes to stdout, and it's currently used for editor integration. it supports YAML/JSON format, like this:
-insert-header="{
FilePath: "/path/to/foo.cc", QuerySymbolInfos: [
{RawIdentifier: foo,
Range: {Offset: 0, Length: 3}}
], HeaderInfos: [ {Headers: "\"foo_a.h\"",
QualifiedName: "a::foo"} ]}"
--minimize-pathsβ whether to minimize the added include paths. lowkey tidy β¨--output-headersβ prints the symbol being queried and all its relevant headers as JSON to stdout. it's giving very readable:
{
"FilePath": "/path/to/foo.cc", "QuerySymbolInfos": [
{"RawIdentifier": "foo",
"Range": {"Offset": 0, "Length": 3}}
], "HeaderInfos": [ {"Header": "\"foo_a.h\"",
"QualifiedName": "a::foo"} ]
}
-p <string>β the build path π οΈ-qβ reduces terminal output. quiet queen energy π--query-symbol=<string>β queries a given symbol (like"a::b::foo") in the database directly, without parsing the file. so efficient π--stdinβ overrides the source file's content (in the overlaying virtual file system) with input from<stdin>, then runs the tool on that new content using the compilation options of the source file. this mode is currently used for editor integration π--style=<string>β the fallback style used for reformatting after inserting new headers, in case there's noclang-formatconfig file found πΈ
π reminder bestie: the STDIN modes (--insert-header especially) are the ones your editor is probably calling behind your back. that's not a bug, that's a feature.
and that's the whole page, literally. this was clang-include-fixer 20, dated September 2026 π go fix those includes, you absolute icon π¦β¨π
π¦ where this page comes from
- ubuntu stonking: clang-tools-20 1:20.1.8-2ubuntu13 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms