include-what-you-use
« Back to VersTracker
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
Version History
Detected Version Rev Change Commit
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