Generated by GPT-5-mini| Clang-Tidy | |
|---|---|
| Name | Clang-Tidy |
| Programming language | C++ |
| Operating system | Cross-platform |
| License | LLVM License |
Clang-Tidy Clang-Tidy is a modular C++ software linting and static analysis tool that builds on the LLVM and Clang (compiler) infrastructure. It combines automated refactoring capabilities with a large collection of diagnostic checks drawn from projects such as Google, Mozilla, Chromium, and Facebook. Designed for integration with build systems like CMake and editors such as Visual Studio Code, the tool supports continuous integration workflows used by organizations including Microsoft, Apple Inc., Google LLC, and Intel.
Clang-Tidy offers a suite of source-aware transformations and style checks influenced by coding guidelines from Google, Mozilla, Chromium, and Facebook while leveraging the frontend of Clang (compiler) and the libraries of LLVM. It reports issues using diagnostics compatible with IDEs like Visual Studio, Xcode, and Qt Creator, and can be invoked in systems managed by CMake, Bazel, Ninja, or Make (software). Major adopters and contributors include engineering teams at Google LLC, Apple Inc., Microsoft, Intel, and projects such as LibreOffice and KDE.
The tool implements numerous checks ranging from style enforcements to bug-finding analyses drawn from academic and industrial research communities associated with Google, Facebook, and Chromium. Examples include automated fixes for C++11 and C++14 migration, diagnostics for UBSan-relevant patterns, and checks for ThreadSanitizer-sensitive constructs; these are useful in codebases maintained by Apple Inc., Microsoft, Intel, and NVIDIA. Clang-Tidy includes checks inspired by projects such as Google C++ Style Guide and rulesets used in Chromium and Mozilla codebases, and supports modernizations like replacing deprecated auto_ptr usage promoted by the standards committees behind ISO/IEC JTC1/SC22/WG21.
Built atop the Clang (compiler) AST and the LLVM libraries, Clang-Tidy uses matchers from the AST Matchers and leverages components common to Clang Static Analyzer and LLVM tooling. Its modular architecture separates check registration, diagnostic reporting, and fixit generation, enabling contributions from parties such as Google LLC, Nokia-affiliated developers, and independent maintainers involved with The LLVM Foundation. The implementation interacts with build metadata provided by tools like CMake, Bazel, and Bear to obtain compile flags, include paths, and system headers used by vendors like Red Hat, SUSE, and Canonical (company).
Clang-Tidy is invoked in developer workflows ranging from single-file checks in editors like Visual Studio Code, CLion, and Xcode to automated scans in CI systems such as Jenkins, GitHub Actions, GitLab CI, and Travis CI. Integration patterns include running as a pre-commit hook in repositories hosted on GitHub, GitLab, or Bitbucket, and embedding into release pipelines used by organizations like Mozilla and Chromium. Tooling integrations commonly rely on compile command databases generated by CMake or Bazel, and IDE integrations use language servers comparable to clangd and services in Microsoft Visual Studio.
Configuration is handled through YAML-style files and command-line flags allowing rule selection, severity overrides, and target-specific suppression similar to mechanisms used in Cppcheck and Coverity. Projects customize checks to align with style guides from Google, Mozilla, Chromium, or corporate policies at Apple Inc. and Microsoft; advanced users implement custom checks by extending the Clang-Tidy API using the same Clang AST Matchers employed by core contributors from Google LLC and The LLVM Foundation. Integration with code formatting tools like clang-format and linters such as Cppcheck enables consistent enforcement across teams at Intel and NVIDIA.
Clang-Tidy originated within the ecosystem of LLVM and Clang (compiler), with early design and maintenance contributions from engineers affiliated with Google LLC, The LLVM Foundation, Apple Inc., and Nokia. Over time, contributions have come from large technology companies such as Microsoft, Intel, Facebook, and open-source projects including KDE, LibreOffice, and Chromium. The project’s evolution reflects collaborations seen in other LLVM subprojects and follows governance patterns practiced by The LLVM Foundation and contributors active in conferences like CppCon and LLVM Developers' Meeting.
Category:Software