Skip to main content

clang-include-cleaner

PyPI part of cpp-linter

A Python wheel of clang-include-cleaner, the LLVM-based tool that finds unused and missing #include directives in C++ source files.

Website · Get started · Discussions

Quick start

pip install clang-include-cleaner

The wheel bundles the clang-include-cleaner binary and the clang builtin headers; no LLVM installation is required on the host machine.

Verify:

clang-include-cleaner --version

Usage

clang-include-cleaner reads the compile commands from a compile_commands.json. Point -p at the directory that holds it, for example build/ after cmake -B build -DCMAKE_EXPORT_COMPILE_COMMANDS=ON:

clang-include-cleaner -p build --print=changes src/main.cpp
- <vector> @Line:2
  • - lines are includes the file does not use. + lines are headers the file uses but only includes indirectly.
  • --edit applies the changes to the file. Without --print, --edit or --html, the tool prints nothing. --print and --html take a single source file.
  • On macOS, set SDKROOT=$(xcrun --show-sdk-path) if the compile commands have no -isysroot and standard headers such as <string> are not found.

Run clang-include-cleaner --help to see all available options. The clang-tidy check misc-include-cleaner runs the same analysis.

Supported versions

  • PyPI has wheels for LLVM 22. pip install clang-include-cleaner installs the newest.
  • Wheels exist for Linux (x86-64, x86, ARM64 and ARMv7 with glibc; x86-64, x86 and ARMv7 with musl), macOS (x86-64 and ARM64) and Windows (x86-64 and x86). On other platforms pip builds the source distribution, which downloads and compiles LLVM.
  • For other LLVM versions, the static binaries include clang-include-cleaner for LLVM 18 to 23.

Contributing

See CONTRIBUTING.md for development setup, build instructions, and the release process, and use GitHub issues for bug reports and feature requests.

License

This project is licensed under the Apache License 2.0 - see LICENSE.md for details. The clang-include-cleaner binary bundled in the wheels is part of the LLVM Project and is licensed under the Apache License 2.0 with LLVM Exceptions.

Metadata

Release files for clang-include-cleaner 23.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clang-include-cleaner 23.1.5
File Size Uploaded Provenance Actions
clang_include_cleaner-23.1.5.tar.gz 12.6 kB With provenance Details for clang_include_cleaner-23.1.5.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for clang-include-cleaner 23.1.5
File Actions
clang_include_cleaner-23.1.5-py2.py3-none-win_amd64.whl Python 2, Python 3 none Windows x86-64 Details for clang_include_cleaner-23.1.5-py2.py3-none-win_amd64.whl
clang_include_cleaner-23.1.5-py2.py3-none-win32.whl Python 2, Python 3 none Windows x86-32 Details for clang_include_cleaner-23.1.5-py2.py3-none-win32.whl
clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_x86_64.whl Python 3, Python 2 none Linux musl 1.2+ x86-64 Details for clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_x86_64.whl
clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_i686.whl Python 2, Python 3 none Linux musl 1.2+ x86-32 Details for clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_i686.whl
clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_armv7l.whl Python 2, Python 3 none Linux musl 1.2+ ARMv7l Details for clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_armv7l.whl
clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_31_armv7l.whl Python 3, Python 2 none Linux glibc 2.31+ ARMv7l Details for clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_31_armv7l.whl
clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_28_i686.whl Python 2, Python 3 none Linux glibc 2.28+ x86-32 Details for clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_28_i686.whl
clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3, Python 2 none Linux glibc 2.28+ x86-64, Linux glibc 2.27+ x86-64 Details for clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl Python 3, Python 2 none Linux glibc 2.26+ ARM64, Linux glibc 2.28+ ARM64 Details for clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
clang_include_cleaner-23.1.5-py2.py3-none-macosx_11_0_arm64.whl Python 3, Python 2 none macOS 11.0+ ARM64 Details for clang_include_cleaner-23.1.5-py2.py3-none-macosx_11_0_arm64.whl
clang_include_cleaner-23.1.5-py2.py3-none-macosx_10_9_x86_64.whl Python 3, Python 2 none macOS 10.9+ x86-64 Details for clang_include_cleaner-23.1.5-py2.py3-none-macosx_10_9_x86_64.whl

Total release size: 194.6 MB

Release files / clang_include_cleaner-23.1.5.tar.gz

Download URL clang_include_cleaner-23.1.5.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
e8d0605b9ea700ac7e20ed5df82746d1e578836a8b60fc93a99c5f7daf40f2f4
BLAKE2b-256 checksum
How to use checksums
2058dd9a78a589cf59841fb888e6260f35e5b7c09f6252e2b974463f708ac183
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-win_amd64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-win_amd64.whl
Size 14.5 MB
Tags Python 2 Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
2efe8dd4281c88b299565042db1348b64bc2829adf6c6eec39676feee511392b
BLAKE2b-256 checksum
How to use checksums
c0a3c5e7e30d4ad113aac4fe592f83c10a11d5863132e855950d551b5714e42e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-win32.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-win32.whl
Size 12.4 MB
Tags Python 2 Python 3 Windows x86-32
SHA-256 checksum
How to use checksums
7bdbdd9eed8853bb1e700e8d4a31f324270eb33fce86c10d85913ddc678232ce
BLAKE2b-256 checksum
How to use checksums
b00c895aa809d3a372fd6dcd23e74ca1bdabf935aaa39be1d4df475691f2e362
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_x86_64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_x86_64.whl
Size 21.1 MB
Tags Linux musl 1.2+ x86-64 Python 2 Python 3
SHA-256 checksum
How to use checksums
af0889ec996749f5274edbcfa633bc21bee1d1f46db970a9134a794d764e9f0e
BLAKE2b-256 checksum
How to use checksums
35dc0136d6b11e070984cc4b1a9879be756b468828b157bf1b0542d29fe088d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_i686.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_i686.whl
Size 23.6 MB
Tags Linux musl 1.2+ x86-32 Python 2 Python 3
SHA-256 checksum
How to use checksums
db5e712e1cd6743b1285f82c9db71562e2cf497c10b18b2dd020de4262fd6c49
BLAKE2b-256 checksum
How to use checksums
5a99b2f5d069c31bea5040c2d2f513da266ada98da34baaa0ef427e722fc3c64
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_armv7l.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-musllinux_1_2_armv7l.whl
Size 18.2 MB
Tags Linux musl 1.2+ ARMv7l Python 2 Python 3
SHA-256 checksum
How to use checksums
8e9e60f6e86819b5468d05803c4dfe4d2d35e6aa5b2a220add351da966137788
BLAKE2b-256 checksum
How to use checksums
affe6b19ec00fb61909529a643ccec0e328ed67b067f60985d3f76d33a82fd6d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_31_armv7l.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_31_armv7l.whl
Size 17.0 MB
Tags Linux glibc 2.31+ ARMv7l Python 2 Python 3
SHA-256 checksum
How to use checksums
0a19d10829e0fd208b9e8933d3a9697c4bb2c53d3873272a24f2727c34698b5b
BLAKE2b-256 checksum
How to use checksums
573fdc05d35057526a1c503882ff5dc585606bd6d0983ab6bacd6ebf4f615b13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_28_i686.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_28_i686.whl
Size 21.9 MB
Tags Linux glibc 2.28+ x86-32 Python 2 Python 3
SHA-256 checksum
How to use checksums
9adba64021eec917484f9ff79eb70edb8d3acc42cfb29110f88d7006132c37df
BLAKE2b-256 checksum
How to use checksums
7ea9d46588c5cfb77574d526dad695edfd71cdc5991e70b75eb3b4bfd10dfe4f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 19.1 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 2 Python 3
SHA-256 checksum
How to use checksums
b66be2b1a306e0c61518d2ad05de345d818af46bebf83c2c15815057efc1d32a
BLAKE2b-256 checksum
How to use checksums
090b019f4d79b4b1bc3b7d9dae6ca86bae2e6b697a4bc6f965e6246888ed360c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-manylinux_2_26_aarch64.manylinux_2_28_aarch64.whl
Size 18.1 MB
Tags Linux glibc 2.26+ ARM64 Linux glibc 2.28+ ARM64 Python 2 Python 3
SHA-256 checksum
How to use checksums
42dfdbb7e8dabf6f998542de16fd95a41d77c3655d8b60ec3cfbd26162460774
BLAKE2b-256 checksum
How to use checksums
93a7424964b33e64cbe62ab4fde8aa01c8308ba8263390c3f9cb2093311eb0de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-macosx_11_0_arm64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-macosx_11_0_arm64.whl
Size 14.0 MB
Tags Python 2 Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
de8a0d6dc0d01f7f54715eec94d3153eb0fb1aa19e59a9f420ca14d63f0f14e2
BLAKE2b-256 checksum
How to use checksums
1f268f9431c4a1257d0a025a0726a2839dc606cdb22d91502a886733933c3664
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Release files / clang_include_cleaner-23.1.5-py2.py3-none-macosx_10_9_x86_64.whl

Download URL clang_include_cleaner-23.1.5-py2.py3-none-macosx_10_9_x86_64.whl
Size 14.6 MB
Tags Python 2 Python 3 macOS 10.9+ x86-64
SHA-256 checksum
How to use checksums
60f9b255368db107081cf2eab0edf96c13a5e3a8386b2e45a051b5027693f381
BLAKE2b-256 checksum
How to use checksums
0644680e1a08fc9243bcb92a48de8296c3965186093b6e8a57a4a20de8041126
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

Security for clang-include-cleaner 23.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 12 files in this release have been uploaded with provenance metadata.

Select from 12 files

Attestation for clang_include_cleaner-23.1.5.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page