Description:
Tool to analyze #includes in C and C++ source files
|
|
Type: Formula
|
Tracked Since: Dec 28, 2025
|
|
Links:
Homepage |
formulae.brew.sh
|
|
Category: Developer tools
|
|
Tags:
c++
c
static-analysis
build-tools
code-quality
headers
|
|
Install:
brew install include-what-you-use
|
About:
Include What You Use (IWYU) is a tool that analyzes C and C++ source files to determine which #include directives are necessary and which are redundant. It provides actionable suggestions to optimize header inclusions, reducing compilation times and improving code maintainability.
|
Key Features:
- Analyzes #include directives to identify missing and unnecessary headers
- Provides specific suggestions to fix include problems
- Integrates with build systems via compilation database
- Supports modern C++ standards
- Helps reduce compilation dependencies
|
Use Cases:
- Optimizing header inclusion in large C++ codebases to reduce build times
- Cleaning up legacy code with unnecessary or missing includes
- Identifying forward declaration opportunities to reduce coupling
|
Alternatives:
-
Clang-Tidy
– Broader linting tool that includes include optimization checks but is less specialized for this specific task
-
Include Guard Checker
– Simpler tools that only check for include guard issues, not inclusion necessity
|
| Detected |
Version |
Rev |
Change |
Commit |
| Aug 27, 2026 12:44am |
|
1 |
REVISION_ONLY |
61eee7d4 |
| Mar 22, 2026 10:26am |
|
0 |
REVISION_ONLY |
e4d866e9 |
| Feb 25, 2026 7:58pm |
|
2 |
REVISION_ONLY |
7b1dda40 |
| Sep 15, 2025 8:28am |
|
1 |
VERSION_BUMP |
49d7182f |
| Dec 3, 2024 7:52pm |
|
0 |
VERSION_BUMP |
3c788c54 |
| Nov 18, 2024 4:16pm |
|
0 |
VERSION_BUMP |
d710093f |
| Oct 27, 2024 3:46pm |
|
1 |
VERSION_BUMP |
d9729aea |
| Sep 14, 2024 8:53am |
|
0 |
VERSION_BUMP |
059bfc87 |
| Nov 9, 2023 5:08am |
|
0 |
VERSION_BUMP |
fbef2162 |
| Apr 2, 2023 6:55pm |
|
0 |
VERSION_BUMP |
56807237 |
| Mar 22, 2023 2:31am |
|
1 |
VERSION_BUMP |
5eeb1131 |
| Nov 21, 2022 2:48am |
|
0 |
VERSION_BUMP |
1c2ed0d6 |
|