Skip to content

Conversation

@malsyned
Copy link
Contributor

@malsyned malsyned commented Aug 14, 2025

image

This changes visible behavior & documentation

The following changes are proposed:

  • Parse include-what-you-use output to generate warning and note diagnostics about missing or superfluous #includes and forward declarations.
  • Add iwyu item to the cmake.enabledOutputParsers option.

The purpose of this change

To add diagnostic messages from include-what-you-use to the Problems pane.

Other Notes/Information

include-what-you-use is a C/C++ code linting tool built with LLVM. CMake has built-in integration via the CMAKE_<LANG>_INCLUDE_WHAT_YOU_USE variable and <LANG>_INCLUDE_WHAT_YOU_USE property.

I didn't add iwyu to the default value of cmake.enabledOutputParsers but I don't think there is any harm in doing so. Its diagnostic messages are quite distinctive and unlike those of the already-supported compilers and linkers. I'd be very open to modifying this PR to make it a default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants