PitchHut
Log in / Sign up
ClangQL
9 views
Query C/C++ Code with the Power of SQL.
Pitch

ClangQL bridges the gap between traditional database querying and C/C++ code analysis by enabling SQL-like queries on code structures. With an intuitive syntax and the robust capabilities of GitQL SDK, developers can effortlessly extract insights, explore functions, and analyze class hierarchies within their codebase. Transform the way you interact with your code.

Description

ClangQL is an innovative tool designed to empower developers with the ability to run SQL-like queries directly on C/C++ code, transforming the way code analysis and extraction are performed. By leveraging the GitQL SDK, ClangQL allows for intricate data querying similar to traditional database interactions but focused entirely on your codebase. This unique capability enables better insights and efficient code management without the need for extensive manual searching or parsing.

Key Features

  • SQL-like Syntax: ClangQL uses familiar SQL syntax, making it easy for developers to adopt.
  • Case-insensitive Keywords: Just like SQL, all keywords in ClangQL are case-insensitive.

Query Examples

Explore the simplicity of querying your code:

SELECT * FROM functions WHERE return_type = "int"
SELECT COUNT(name) FROM globals WHERE is_volatile
SELECT DISTINCT name AS function_name FROM functions

Table Structure

ClangQL provides structured access to various elements of your code:

  • Functions: Extract and analyze function details, including names, return types, and argument counts.
  • Classes: Gain insights into class definitions, methods, and fields.
  • Enums and Unions: Query enumerations and unions effectively to understand their structure and usage.
  • Globals: Access global variables and their attributes with ease.

Running ClangQL

Getting started is straightforward. Using ClangQL is as easy as:

ClangQL --files <file-path> --query <your-query>

Whether you're enhancing your understanding of a legacy codebase, performing static analysis, or simply need to perform repetitive queries, ClangQL combines familiarity with powerful capabilities, facilitating a deeper engagement with C/C++ code. Dive into the world of code querying with ClangQL and unlock new potential for code insights!