Re: Issue 947 in include-what-you-use: Not warning when headers are not used for anything

0 views
Skip to first unread message

notifi...@include-what-you-use.org

unread,
Nov 2, 2021, 12:51:04 AM11/2/21
to include-wh...@googlegroups.com
Comment #2 on issue 947 by sketch34: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

It would be really helpful to see some example input and expected output from `iwyu` somewhere in the docs. I'm having the same issue where I have integrated it with my cmake project but I am getting no output from it, but perhaps my expectations for what it can detect are incorrect. In my case I know I'm using boost "uber headers" a lot (e.g. `boost/beast.h`) where I know I'm only declarations from a few of the more specific headers.


notifi...@include-what-you-use.org

unread,
Nov 2, 2021, 12:52:22 AM11/2/21
to include-wh...@googlegroups.com
Comment #2 on issue 947 by sketch34: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

It would be really helpful to see some example input and expected output from `iwyu` somewhere in the docs. I'm having the same issue where I have integrated it with my cmake project but I am getting no output from it, but perhaps my expectations for what it can detect are incorrect.

In my case I know I'm using boost "uber headers" a lot (e.g. `boost/beast.h`) where I know I'm only using declarations from a few of the more specific headers. My expectation is that it will alert me to all the redundant boost headers transitively included via `boost/beast.h` and `boost/asio.h` etc.


notifi...@include-what-you-use.org

unread,
Nov 2, 2021, 12:52:46 AM11/2/21
to include-wh...@googlegroups.com
Comment #2 on issue 947 by sketch34: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

It would be really helpful to see some example input and expected output from `iwyu` somewhere in the docs. I'm having the same issue where I have integrated it with my cmake project but I am getting no output from it, but perhaps my expectations for what it can detect are incorrect.

In my case I know I'm using boost "uber headers" a lot (e.g. `boost/beast.h`) where I know I'm only using declarations from a few of the more specific headers within the uber header. My expectation is that it will alert me to all the redundant boost headers transitively included via `boost/beast.h` and `boost/asio.h` etc.


notifi...@include-what-you-use.org

unread,
Nov 10, 2021, 3:11:13 PM11/10/21
to include-wh...@googlegroups.com
Comment #2 on issue 947 by kimgr: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

s@sketch34 Yes, it should. If there's literally _no_ output, I would expect that the cmake integration is not working. It's a little verbose to describe an example in the docs, because we'd need to include both twp headers, a source file, an invocation and the expected output. The test suite has a bunch of examples like that.


notifi...@include-what-you-use.org

unread,
Nov 10, 2021, 3:11:30 PM11/10/21
to include-wh...@googlegroups.com
Comment #3 on issue 947 by kimgr: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

notifi...@include-what-you-use.org

unread,
Nov 10, 2021, 5:08:19 PM11/10/21
to include-wh...@googlegroups.com
Comment #4 on issue 947 by sketch34: Not warning when headers are not used for anything
https://github.com/include-what-you-use/include-what-you-use/issues/947

Okay thanks I'll give it another go.


Reply all
Reply to author
Forward
0 new messages