CLANG-INCLUDE-FIXER(1)
β¨ NAME β¨
clang-include-fixer β hiii okay so this is literally the manual page for clang-include-fixer 19, and she is a User Command, and she is here to fix your includes bestie π«Ά
πΈ DESCRIPTION πΈ
π« USAGE
clang-include-fixer [options] <source0> [... <sourceN>]
βοΈ OPTIONS
π Generic Options
--helpβ shows you all the available options (and if you want even more,--help-hiddenhas you covered, no cap) β¨--help-listβ prints the list of available options (again,--help-list-hiddenif you're feeling nosy) π--versionβ tells you what version of this program you're running, iconic behaviour honestly π
π§ Tool options
--db=<value>β specify the input format, bestie. She takes one of these:=fixedβ hard-coded mapping=yamlβ a Yaml database created byfind-all-symbols=fuzzyYamlβ a Yaml database, but with fuzzy-matched names π
--extra-arg=<string>β an extra argument to append to the compiler command line--extra-arg-before=<string>β an extra argument to prepend to the compiler command line (yes the order matters, that's the whole point, iykyk)--input=<string>β a string used to initialize the database--insert-header=<string>β insert one specific header. This one is supposed to run with STDIN mode π«Ά. The result gets written tostdout. It's currently used for editor integration. She supports YAML/JSON format, like so:
-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--output-headersβ prints the symbol being queried and all its relevant headers tostdoutin JSON format, like this:
{
"FilePath": "/path/to/foo.cc",
"QuerySymbolInfos": [
{"RawIdentifier": "foo",
"Range": {"Offset": 0, "Length": 3}}
],
"HeaderInfos": [
{"Header": "\"foo_a.h\"",
"QualifiedName": "a::foo"}
]
}
-p <string>β build path-qβ reduce terminal output (quiet queen energy π€«)--query-symbol=<string>β query a given symbol (like"a::b::foo") directly in the database, without even parsing the file. So efficient, we love her π--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 new headers get inserted, in case there's noclang-formatconfig file to be found π
okay that's the whole page bestie, every flag accounted for, nothing skipped, periodt π
This was the manual for clang-include-fixer 19, dated June 2025 β mwah, go fix those includes, you absolute main character πβ¨
π¦ where this page comes from
- debian bookworm: clang-tools-19 1:19.1.7-3~deb12u1 Β· APACHE-2-LLVM-EXCEPTIONS
- debian trixie: clang-tools-19 1:19.1.7-3+b1 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms