Including the right header files with IWYU

During my recent discussions about upstreaming a new Linux kernel driver, a tool was mentioned that I had not used before: Include What You Use (IWYU). The idea behind the tool is simple: analyze C/C++ source files and check which headers are actually needed. It can suggest missing includes and point out includes that are not being used. It is not a mature solution that can blindly modify your…