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

> developers have a hope of being able to determine which #includes can be removed and which can't

Can’t a modern compiler do that already? Didn’t google but seems an obvious compiler feature at the very least behind a warning flag.



Clang-tidy (linter) can do that. IMO it's a good idea to integrate this tool to any C project. I'm using gcc for embedded projects and clang-tidy works just fine as a separate tool.

https://clang.llvm.org/extra/clang-tidy/checks/misc/include-...


I'm using https://github.com/include-what-you-use/include-what-you-use in preference over clang-tidy.




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

Search: