clang-tidy C++ Linter Tool
clang.llvm.org
2
Leaving SiteNav
External Link Disclaimer
You are about to visit clang.llvm.org. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
clang-tidy is a clang-based C and C++ linter tool that provides an extensible framework for diagnosing and fixing typical programming errors, style violations, and interface misuse. Part of the extra Clang tools, clang-tidy leverages the Clang compiler frontend for accurate syntax and semantic analysis of C, C++, Objective-C, and Objective-C++ code. Key features: over 700 built-in checks organized into categories including bugprone (likely bugs), cert (CERT secure coding guidelines), cppcoreguidelines (C++ Core Guidelines), google (Google style), llvm (LLVM style), modernize (C++11/14/17/20 modernization), performance (performance-related issues), readability (readability improvements), and misc (miscellaneous). Automatic fix-it hints providing suggested code changes that can be applied automatically via the --fix flag, enabling bulk code modernization and cleanup. Custom checks via a plugin system allowing teams to write organization-specific checks using the Clang AST and matching framework. Configuration via .clang-tidy YAML files for per-project check configuration, header filtering, and option tuning. Header filtering for limiting analysis to project headers and excluding system or third-party headers. Compilation database (compile_commands.json) integration for analyzing projects with accurate compiler flags and include paths. Runs as part of Clang compilation pipeline, enabling integration with build systems and IDEs. Preprocessor awareness for understanding conditional compilation and platform-specific code. Cross-module analysis for detecting interface misuse and contract violations. Integration with IDEs (VS Code, CLion, Visual Studio) for real-time linting. CI/CD integration via command-line and JSON output for automated code review. Refactoring capabilities including automated function renaming, loop modernization, and C++ standard upgrades. Used by Google, Mozilla, and the LLVM project itself.
Statistics
2
Views
0
Clicks
0
Like
0
Dislike