Analyze #includes in c and c++ source files
USAGE: include-what-you-use [-Xiwyu --iwyu_opt]... <clang opts> <source file> Here are the <iwyu_opts> you can specify (e.g. -Xiwyu --verbose=\,3\/): --check_also=<glob>: tells iwyu to print iwyu-violation info
for all files matching the given glob pattern (in addition to the default of reporting for the input .cc file and its associated .h files). This flag may be specified multiple times to specify multiple glob patterns. --cwd=<dir>: tells iwyu what the current working directory is. --help: prints this help and exits. --howtodebug[=<filename>]: with no arg, prints instructions on
how to run iwyu under gdb for the input file, and exits. With an arg, prints only when input file matches the arg. --mapping_file=<filename>: gives iwyu a mapping file. --no_default_mappings: do not add iwyu's default mappings. --transitive_includes_only: do not suggest that a file add
foo.h unless foo.h is already visible in the file's transitive includes. --prefix_header_includes=<value>: tells iwyu what to do with
in-source includes and forward declarations involving prefix headers. Prefix header is a file included via command-line option -include. If prefix header makes include or forward declaration obsolete, presence of such include can be controlled with the following values
add:
new lines are added
keep:
new lines aren't added, existing are kept intact
remove: new lines aren't added, existing are removed
Default value is 'add'. --verbose=<level>: the higher the level, the more output.