Skip to content

Latest commit

 

History

History
32 lines (23 loc) · 905 Bytes

README.md

File metadata and controls

32 lines (23 loc) · 905 Bytes

Include What You Use

iwyu is a tool for deciding which #includes are needed, or not. Including the right files, and no more, can speed up builds. It also helps to show the dependencies of a file.

iwyu uses clang to create an AST for the code.

Usage

Configure + build NeoMutt with a compilation database.

./configure --compile-commands && make

Then run the main script with the source you wish to check:

iwyu.sh mutt/*.[ch]

Or with all files in the compilation database:

tac compile_commands.json | sed '2 s/.$//' | tac | jq -r '.[] | .file' | xargs ../iwyu/bin/iwyu.sh

Known Limitations

Out of nearly 300 header files, most are correctly handled. The exceptions are the curses and ssl headers.