Is there a way to find unused header files in c++ code

I’m developing a project using espressif32 platform in vscode. I need a tool like include-what-you-use (IWYU) that works with this platform. That is, a tool that scans the source and header files and finds unused / redundant included header files.

I’ve never used IWYU. I understand that it requires that the project will be built using cmake and cmake is not used in espressif32 platform. Is there a way to workaround this?

IMO, this is the responsibility of Intellisense but I don’t think it detects it.

Would be nice to have platformio support as part of the static analysis.