A tool for use with clang to analyze #includes in C and C++ source files
"Include what you use" means this: for every symbol (type, function variable, or macro) that you use in foo.cc, either foo.cc or foo.h should #include a .h file that exports the declaration of that symbol. The include-what-you-use tool is a program that can be built with the clang libraries in order to analyze #includes of source files to find include-what-you-use violations, and suggest fixes for them.
The main goal of include-what-you-use is to remove superfluous #includes. It does this both by figuring out what #includes are not actually needed for this file (for both .cc and .h files), and replacing #includes with forward-declares when possible.
iwyu 0.6 compatible with llvm+clang 3.8 is released. In this version we
--no_commentsswitch to suppress why-comments.
fix_includes.pygenerating invalid diff output.
For the full list of closed issues see https://github.com/include-what-you-use/include-what-you-use/issues?q=milestone%3A%22iwyu+0.6%22+is%3Aclosed
Thanks for all your contributions and help JVApen, Kim Gräsman, Philip Pfaffe, pseyfert, realazthat, Sylvestre Ledru, ThosRTanner. Sorry if I've missed anyone.
The source code can be downloaded from include-what-you-use-0.6.src.tar.gz. It is equivalent to
iwyu 0.5 compatible with llvm+clang 3.7 is released. In this version we
size_tfrom multiple headers.
For the full list of closed issues see https://github.com/include-what-you-use/include-what-you-use/issues?q=milestone%3A%22iwyu+0.5%22+is%3Aclosed
Thanks for all your contributions Scott Howard, bungeman, tpltnt, Chris Glover, Kim Gräsman. And thank you for all you help Jérémie Delaitre, Richard Thomson, dpunset, Earnestly, Dave Johansen, ThosRTanner. Sorry if I've missed anyone.
The source code can be downloaded from include-what-you-use-0.5.src.tar.gz. It is equivalent to
iwyu 0.4 compatible with llvm+clang 3.6 is released. It contains the following changes:
For the full list of closed issues see https://code.google.com/p/include-what-you-use/issues/list?can=1&q=closed-after%3A2014%2F10%2F23+closed-before%3A2015%2F6%2F2
This release received many contributions and I want to thank SmSpillaz, Paul Redmond, Chris Glover, Ryan Pavlik, showard314, Fabian Gruber, Kim Gräsman for your help. And thanks to Dave Johansen, MMendez534, Sylvestre Ledru for packaging include-what-you-use. Sorry if I've missed anyone.
The source code can be downloaded from include-what-you-use-0.4.src.tar.gz. It is equivalent to
iwyu 0.3 compatible with llvm+clang 3.5 is released. In this version we have
For the full list of closed issues see https://code.google.com/p/include-what-you-use/issues/list?q=closed-after%3A2014%2F02%2F23&can=1
The source code can be downloaded from include-what-you-use-3.5.src.tar.gz. It is equivalent to
iwyu version compatible with llvm+clang 3.4 is released. The source code can be downloaded from include-what-you-use-3.4.src.tar.gz. It is equivalent to
We are moving downloads to Google Drive. iwyu version compatible with llvm+clang 3.3 can be found at include-what-you-use-3.3.tar.gz. It is equivalent to
Now that clang 3.0 is out, I released a version of iwyu that works against clang 3.0. It is equivalent to r330. It is available in the 'downloads' section on the side pane. To use, just
llvm/tools/clang/tools in your llvm/clang tree, and untar
include-what-you-use-3.0-1.tar.gz from that location. Then cd to
include-what-you-use and type
make. (A cmakefile is also available.) You can run
make check-iwyu to run the iwyu test suite.
It was just pointed out to me the tarball I built against llvm+clang 2.9 doesn't actually compile with llvm+clang 2.9. I must have made a mistake packaging it. I've tried again; according to my tests, anyway, the new version works as it's supposed to.
I finally got around to releasing a tarball that builds against llvm+clang 2.9. See the 'downloads' section on the side pane. This is a rather old version of iwyu at this point, so you'll do much better to download a current clang+llvm and the svn-root version of include-what-you-use, and build from that. See README.txt for more details.
Work has been continuing at a furious pace on include-what-you-use. It's definitely beta quality by now. :-) Well, early beta. I've not been making regular releases, but the SVN repository is being frequently updated, so don't take the lack of news here to mean a lack of activity.
I'm very pleased to announce the very-alpha, version 0.1 release of include-what-you-use. See the wiki links on the right for instructions on how to download, install, and run include-what-you-use.
I'm releasing the code as it is now under a "release early and often" approach. It's still very early in iwyu, and the program will probably have mistakes on any non-trivial piece of code. Furthermore, it still has google-specific bits that may not make much sense in an opensource release. This will all get fixed over time. Feel free to dig in and suggest patches to help the fixing along!
If you want to follow the discussion on include-what-you-use, and/or keep up to date with changes, subscribe to the Google Group.