Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: