CLANG-INCLUDE-FIXER(1)
β¨ NAME β¨
clang-include-fixer β bestie, this is the manual page for clang-include-fixer 11, section 1, User Commands. It fixes your includes. It's giving "I will find the header you forgot" energy. π
π¦ DESCRIPTION π¦
Okay so here's how you actually run this thing:
USAGE: clang-include-fixer [options] <source0> [... <sourceN>]
That's it. You hand it your source files and it does its little magic. Periodt. π
π OPTIONS π
β¨ Generic Options β¨
The universal ones, the classics, the ones every LLVM tool shows up with:
--helpβ Display available options. And if you want the secret menu, pass--help-hiddenfor more. π--help-listβ Display list of available options (--help-list-hiddenfor more).--versionβ Display the version of this program.
π Tool options π
This is the main character section. Pull up a chair.
--db=<value>β Specify input format. Pick your flavor, bestie:=fixedβ Hard-coded mapping. Zero thoughts, just vibes.=yamlβ Yaml database created byfind-all-symbols.=fuzzyYamlβ Yaml database, with fuzzy-matched names. (Fuzzy! Like a little peach π that doesn't need exact names.)
--extra-arg=<string>β Additional argument to append to the compiler command line.--extra-arg-before=<string>β Additional argument to prepend to the compiler command line. (Yes, before. Not the same as above, don't @ me.)--input=<string>β String to initialize the database.--insert-header=<string>β Insert a specific header. This should run with STDIN mode. The result is written tostdout. It is currently used for editor integration. Support YAML/JSON format:
-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 added include paths.--output-headersβ Print the symbol being queried and all its relevant headers in JSON format tostdout:
{
"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. (Shy queen behavior, honestly. π€«)--query-symbol=<string>β Query a given symbol (e.g."a::b::foo") in database directly without parsing the file. So efficient of it.--stdinβ Override source file's content (in the overlaying virtual file system) with input from<stdin>and run the tool on the new content with the compilation options of the source file. This mode is currently used for editor integration.--style=<string>β Fallback style for reformatting after inserting new headers if there is noclang-formatconfig file found.
Heads up bestie π«Ά β--insert-headeris meant to run with STDIN mode, and both--insert-headerand--output-headerswrite tostdout, so plan your redirections accordingly. No cap.
Okay that's the whole page, go slay some includes, this was clang-include-fixer 11 from January 2022, mwah πβ¨π¦
π¦ where this page comes from
- ubuntu jammy: clang-tools-11 1:11.1.0-6 Β· APACHE-2-LLVM-EXCEPTIONS
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms