clangql
« Back to VersTracker
Description:
Run a SQL like language to perform queries on C/C++ files
Type: Formula  |  Latest Version: 0.23.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: c++ c sql static-analysis clang developer-tools
Install: brew install clangql
About:
ClangQL is a command-line tool that enables developers to query C/C++ source code using a SQL-like syntax. It leverages the Clang compiler infrastructure to parse code into an Abstract Syntax Tree (AST), allowing for precise and complex code analysis. This tool simplifies finding code patterns, understanding codebases, and performing static analysis without writing complex scripts.
Key Features:
  • SQL-like query language for C/C++ code
  • Powered by Clang/LLVM for accurate AST-based parsing
  • Fast and efficient command-line interface
  • Supports complex pattern matching and code exploration
Use Cases:
  • Auditing large codebases for specific code patterns or anti-patterns
  • Performing static analysis to find potential bugs or security vulnerabilities
  • Navigating and understanding complex C/C++ projects
  • Automated code refactoring and quality checks
Alternatives:
  • clang-query – A tool from the LLVM project for matching AST nodes, but with a less intuitive query syntax compared to ClangQL's SQL-like approach.
  • cscope – An older tool for browsing C code, but it lacks the deep AST-based understanding and modern query capabilities of ClangQL.
License: MIT
Dependencies: llvm
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 10, 2025 7:52pm 0 VERSION_BUMP 8109fc7c
Sep 12, 2025 8:06pm 0 VERSION_BUMP d42be519
Jan 12, 2025 7:51pm 0 VERSION_BUMP 704592ed
Sep 29, 2024 1:46pm 1 VERSION_BUMP 10ebbe9f