Linux repositories inspector

include-what-you-use - A tool 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 (or foo.cpp), either foo.cc or foo.h should include a .h file that exports the declaration of that symbol. The include-what-you-use program is a tool 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 declarations when possible.
0.13
OpenSUSE iconOpenSUSE Tumbleweed
0.11
OpenSUSE iconOpenSUSE Leap 15.2
0.9
OpenSUSE iconOpenSUSE Leap 15.0
OpenSUSE iconOpenSUSE Leap 15.1
DistributionVersionSincePackageInstalledPackager
OpenSUSE iconOpenSUSE Leap 15.0 ossrpm0.9-lp150.2.12019-01-17343 kiB2.55 MiBhttps://bugs.opensuse.org
OpenSUSE iconOpenSUSE Leap 15.1 ossrpm0.9-lp151.3.42019-03-20343 kiB2.55 MiBhttps://bugs.opensuse.org
OpenSUSE iconOpenSUSE Leap 15.2 ossrpm0.11-lp152.1.22020-03-23403 kiB4.33 MiBhttps://bugs.opensuse.org
OpenSUSE iconOpenSUSE Tumbleweed ossrpm0.13-2.12019-11-25467 kiB4.95 MiBhttps://bugs.opensuse.org

Manual pages

include-what-you-use(1)

include-what-you-use - Analyze #includes in C and C++ source files

Latest updates

OpenSUSE icon

OpenSUSE Leap 15.2 oss: Updated from 0.11-lp152.1.1 to 0.11-lp152.1.2

2020-03-23
  • Update to version 0.11, update LLVM/Clang to version 7.
    • Improved recognition of template and specialization uses.
    • Improved CMake build system, see docs for build instructions.
    • Improved mappings for Boost, Intel intrinsics and libstdc++.
    • Several bug fixes and improvements.
    • Add --basedir argument to interpret IWYU output from another source tree.
    • Handle namespaces better.
    • Add --only_re switch to filter affected files.
    • Add --reorder/--noreorder switch to toggle reordering of includes.
  • Drop obsolete llvm-link.patch.
  • Rebase iwyu_include_picker.patch.
  • Update man page, sort options alphabetically.
  • Remove runtime dependency on clang - the builtin headers are now included in libclang.
OpenSUSE icon

OpenSUSE Leap 15.2 oss: Version 0.11-lp152.1.1 introduced

2020-01-07
  • Update to version 0.11, update LLVM/Clang to version 7.
    • Improved recognition of template and specialization uses.
    • Improved CMake build system, see docs for build instructions.
    • Improved mappings for Boost, Intel intrinsics and libstdc++.
    • Several bug fixes and improvements.
    • Add --basedir argument to interpret IWYU output from another source tree.
    • Handle namespaces better.
    • Add --only_re switch to filter affected files.
    • Add --reorder/--noreorder switch to toggle reordering of includes.
  • Drop obsolete llvm-link.patch.
  • Rebase iwyu_include_picker.patch.
  • Update man page, sort options alphabetically.
  • Remove runtime dependency on clang - the builtin headers are now included in libclang.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.13-1.1 to 0.13-2.1

2019-11-25
  • Deactivate ThinLTO on ARM: there are internal linker errors.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.12-2.1 to 0.13-1.1

2019-11-06
  • Update to version 0.13, update LLVM/Clang to version 9.
    • Improved handling of relative includes in mappings and pragmas
    • Path normalization now collapses ..
    • Improve --no_fwd_decls not to remove required forward declarations
    • Improved handling of builtin templates
    • Don't mark forward declarations final
    • Tolerate using declarations in precompiled header
    • Add script to generate Qt mappings, and new mappings for Qt 5.11
    • Use directory from compilation database if available
    • Numerous documentation and build improvements
  • Add section about pragma comments to man page.
  • Add link-llvm9.patch to adapt to packaging changes in LLVM.
  • Enable ThinLTO where possible.
  • Drop support for SLE12.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.12-1.1 to 0.12-2.1

2019-07-16
  • Disable LTO, because -flto=<number> doesn't work with Clang.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.11-1.3 to 0.12-1.1

2019-06-28
  • Update to version 0.12, update LLVM/Clang to version 8.
    • New command-line option: --keep to mirror IWYU pragma: keep
    • New command-line option: --cxx17ns to suggest compact C++17 nested namespaces
    • Improve --no_fwd_decls to optimize for minimal number of redeclarations
    • Improved mappings for POSIX types and let mappings apply to builtins as well
    • More principled handling of explicit template instantiations
    • Breaking change in iwyu_tool: extra args are no longer automatically prefixed with -Xiwyu (so you can use them for Clang args too)
    • Better handling of template forward-decls in fix_includes.
  • Run test suite in %check.
  • Package license file and documentation.
  • Remove unnecessary %defattr.
  • Update man page.
  • Rebase fix-shebang.patch.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.11-1.1 to 0.11-1.3

2019-06-17
  • Update to version 0.11, update LLVM/Clang to version 7.
    • Improved recognition of template and specialization uses.
    • Improved CMake build system, see docs for build instructions.
    • Improved mappings for Boost, Intel intrinsics and libstdc++.
    • Several bug fixes and improvements.
    • Add --basedir argument to interpret IWYU output from another source tree.
    • Handle namespaces better.
    • Add --only_re switch to filter affected files.
    • Add --reorder/--noreorder switch to toggle reordering of includes.
  • Drop obsolete llvm-link.patch.
  • Rebase iwyu_include_picker.patch.
  • Update man page, sort options alphabetically.
  • Remove runtime dependency on clang - the builtin headers are now included in libclang.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.10-1.3 to 0.11-1.1

2019-04-03
  • Update to version 0.11, update LLVM/Clang to version 7.
    • Improved recognition of template and specialization uses.
    • Improved CMake build system, see docs for build instructions.
    • Improved mappings for Boost, Intel intrinsics and libstdc++.
    • Several bug fixes and improvements.
    • Add --basedir argument to interpret IWYU output from another source tree.
    • Handle namespaces better.
    • Add --only_re switch to filter affected files.
    • Add --reorder/--noreorder switch to toggle reordering of includes.
  • Drop obsolete llvm-link.patch.
  • Rebase iwyu_include_picker.patch.
  • Update man page, sort options alphabetically.
  • Remove runtime dependency on clang - the builtin headers are now included in libclang.
OpenSUSE icon

OpenSUSE Leap 15.1 oss: Updated from 0.9-lp151.3.3 to 0.9-lp151.3.4

2019-03-20
  • Make tools package "noarch", since it contains only scripts.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Updated from 0.10-1.2 to 0.10-1.3

2019-02-03
  • Update to version 0.10, update LLVM/Clang to version 6.
    • Add --no_fwd_decls option to avoid replacing includes with forward-declarations.
    • Treat definitions of free functions as uses of the corresponding prototypes.
    • Support C++11 range-for loops.
    • Several template misattribution bugs fixed.
    • Better support for non-ASCII encodings in fix_includes.py.
    • Remove support for VCS commands from fix_includes.py.
OpenSUSE icon

OpenSUSE Leap 15.1 oss: Version 0.9-lp151.3.3 introduced

2019-01-23
  • Make tools package "noarch", since it contains only scripts.
OpenSUSE icon

OpenSUSE Leap 15.0 oss: Version 0.9-lp150.2.1 introduced

2019-01-17
  • Make tools package "noarch", since it contains only scripts.
OpenSUSE icon

OpenSUSE Tumbleweed oss: Version 0.10-1.2 introduced

2019-01-17
  • Update to version 0.10, update LLVM/Clang to version 6.
    • Add --no_fwd_decls option to avoid replacing includes with forward-declarations.
    • Treat definitions of free functions as uses of the corresponding prototypes.
    • Support C++11 range-for loops.
    • Several template misattribution bugs fixed.
    • Better support for non-ASCII encodings in fix_includes.py.
    • Remove support for VCS commands from fix_includes.py.

Related packages

include-what-you-use-debuginfo - Debug information for package include-what-you-use
include-what-you-use-debugsource - Debug sources for package include-what-you-use
include-what-you-use-tools - Additional tools to use include-what-you-use effectively
⇧ Top