Comment

Comment by anand-bala

I've found that using IWYU Pragmas [1] for codebases you own and IWYU Mappings [2] for third-party libraries __almost__ entirely eliminates weird IWYU suggestions (there are a few annoyingly stupid suggestions from the tool I just ignore).

I've also recently been making libraries I write compatible with users that run IWYU by annotating all public headers with IWYU pragma comments that export symbols/transitive includes correctly, etc.

[1]: https://github.com/include-what-you-use/include-what-you-use...

[2]: https://github.com/include-what-you-use/include-what-you-use...

parent anand-bala 5 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton