CLANG-INCLUDE-FIXER(1)
π NAME π
okay bestie, gather round β this is the manual page for clang-include-fixer version 18. she's a User Command, she lives in section 1, and she is literally here to fix your includes for you. iconic behaviour, no cap. π«Ά
β¨ DESCRIPTION β¨
πΈ USAGE πΈ
like, here's how you call her:
clang-include-fixer [options] <source0> [... <sourceN>]
so you give her some <source0> β¦ <sourceN> files, plus whatever [options] you're feeling, and she goes to work. π
π OPTIONS π
β Generic Options β
the boring-but-necessary ones, bestie. everyone needs a little infrastructure:
--helpβ shows you all the available options. and if you're extra curious,--help-hiddenshows even more. π--help-listβ prints a list of the available options. and yes,--help-list-hiddenexists too for the deep lore. π--versionβ tells you which version of this program you're running. vibe check your install, periodt.
π¦ Tool options π¦
okay THIS is the main character section. the way these flags ate:
--db=<value>β sets the input format. she's giving choices, and here they are:=fixedβ a hard-coded mapping. set in stone, zero chill. π=yamlβ a YAML database, made byfind-all-symbols. the classic. β¨=fuzzyYamlβ a YAML database, but the names are fuzzy-matched. lowkey mysterious, highkey useful.
--extra-arg=<string>β one extra argument to append to the compiler command line. tack it on the end, bestie. π--extra-arg-before=<string>β one extra argument to prepend to the compiler command line. this one goes at the FRONT. very "me first" energy. π--input=<string>β a string to initialize the database with.--insert-header=<string>β insert one specific header. and listen: this one should run with STDIN mode. the result gets written tostdout. right now it's used for editor integration. it 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 include paths that get added. do less, slay more. π--output-headersβ prints the symbol you're querying and all its relevant headers, in JSON format, tostdout. it's giving:
{
"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 mode, for when you simply cannot with the noise. π€«--query-symbol=<string>β query a given symbol (like"a::b::foo") directly in the database, without parsing the file at all. skipping the line, straight to the answer. π₯--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, for when there's noclang-formatconfig file to be found. she's got a backup fit ready, always. π
okay real talk bestie: keep--insert-headerand--stdinin their intended editor-integration lanes, fr fr. that's literally what the page says they're for. π«Ά
and that's the whole page, no skips, no summaries, every flag accounted for. π this was clang-include-fixer 18, dated June 2025, from the User Commands section β mwah, go fix those includes, bestie. π
β¨
π¦ where this page comes from
- debian trixie: clang-tools-18 1:18.1.8-18+b1 Β· APACHE-2-LLVM-EXCEPTIONS
- ubuntu questing: clang-tools-18 1:18.1.8-18ubuntu2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms