CLANG-INCLUDE-FIXER(1)

πŸ“¦
version 19.1.7 Β· 5 versions
, in debian bookworm, debian trixie

✨ 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-hidden has you covered, no cap) ✨
  • --help-list β€” prints the list of available options (again, --help-list-hidden if 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 by find-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 to stdout. 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 to stdout in 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 no clang-format config 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