Scroll to navigation

IWYU_TOOL(1) User Commands IWYU_TOOL(1)

NAME

iwyu_tool - Include-what-you-use compilation database driver

SYNOPSIS

iwyu_tool [-h] [-v] [-o FORMAT] [-j JOBS] -p build-path [source ...] -- [IWYU-args]

DESCRIPTION

Driver to consume a compilation database and invoke

OPTIONS

positional arguments:

Zero or more source files to run IWYU on. Defaults to all in compilation database.

optional arguments:

Show help message and exit.
Print IWYU commands.
Select output format, which may be one of:
Native output format of (default)
Format similar to the output of where issues are reported as errors.
Similar to clang, but issues are reported as warnings.
Number of concurrent subprocesses.
Compilation database path. Either a path to a directory containing a file named compile_commands.json or to the file itself.
All further arguments after the separator -- are passed on to each invocation of

FILES

Compilation database file.

NOTES

Assumes is available on the PATH.

EXAMPLE

Example usage with on Unix systems:

$ mkdir build && cd build
$ CC="clang" CXX="clang++" cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON ...
$ iwyu_tool -p .

SEE ALSO

May 2026 iwyu_tool 8.23