Skip to content

Commit

Permalink
Update readme, logo and demo
Browse files Browse the repository at this point in the history
  • Loading branch information
AmrDeveloper committed Jan 11, 2025
1 parent 86a6e5c commit b5a230a
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 83 deletions.
99 changes: 40 additions & 59 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ SELECT "Clang Query Language" LIKE "%Query%"
SELECT * FROM functions
SELECT COUNT(name) from functions WHERE return_type = "int"
SELECT DISTINCT name AS function_name FROM functions
SELECT name, source_loc FROM functions WHERE m_function(ast_function, m_constructor());
SELECT name, source_loc FROM functions WHERE m_function(ast_function, m_copy_constructor());
SELECT name, source_loc FROM functions WHERE m_function(ast_function, m_move_constructor());
SELECT name, source_loc FROM functions WHERE m_function(ast_function, m_pure_virtual());

SELECT * FROM globals
SELECT COUNT(name) from globals WHERE type = "int"
Expand All @@ -47,19 +51,15 @@ SELECT * FROM globals WHERE is_volatile

<summary>Classes table</summary>

| Name | Type | Description |
| ------------- | ------- | ------------------------------- |
| name | Text | Class variable name |
| is_struct | Boolean | True if it a struct declaration |
| bases_count | Integer | Number of bases for this class |
| methods_count | Integer | Number of methods declarations |
| fields_count | Integer | Number of fields declarations |
| size | Integer | The size of class in bits |
| align | Integer | The align of class in bits |
| file | Text | File path |
| line | Integer | Line at the file path |
| column | Integer | Column at the file path |
| offset | Integer | Offset at the file path |
| Name | Type | Description |
| ------------- | --------- | ------------------------------- |
| name | Text | Class variable name |
| is_struct | Boolean | True if it a struct declaration |
| bases_count | Integer | Number of bases for this class |
| methods_count | Integer | Number of methods declarations |
| fields_count | Integer | Number of fields declarations |
| source_loc | SourceLoc | Source location of AST node |


</details>

Expand All @@ -69,15 +69,13 @@ SELECT * FROM globals WHERE is_volatile

<summary>Enums table</summary>

| Name | Type | Description |
| --------------- | ------- | -------------------------------- |
| name | Text | Enumeration name |
| constants_count | Integer | Number of constants in this enum |
| type_literal | Text | Type literal for enum constants |
| file | Text | File path |
| line | Integer | Line at the file path |
| column | Integer | Column at the file path |
| offset | Integer | Offset at the file path |
| Name | Type | Description |
| --------------- | --------- | -------------------------------- |
| name | Text | Enumeration name |
| constants_count | Integer | Number of constants in this enum |
| type_literal | Text | Type literal for enum constants |
| source_loc | SourceLoc | Source location of AST node |


</details>

Expand All @@ -87,15 +85,13 @@ SELECT * FROM globals WHERE is_volatile

<summary>Unions table</summary>

| Name | Type | Description |
| ------------ | ------- | ----------------------------- |
| name | Text | Union name |
| size | Integer | The size of union in bits |
| fields_count | Integer | Number of fields declarations |
| file | Text | File path |
| line | Integer | Line at the file path |
| column | Integer | Column at the file path |
| offset | Integer | Offset at the file path |
| Name | Type | Description |
| ------------ | --------- | ----------------------------- |
| name | Text | Union name |
| size | Integer | The size of union in bits |
| fields_count | Integer | Number of fields declarations |
| source_loc | SourceLoc | Source location of AST node |


</details>

Expand All @@ -105,25 +101,13 @@ SELECT * FROM globals WHERE is_volatile

<summary>Functions table</summary>

| Name | Type | Description |
| --------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| name | Text | Function or Method name |
| signature | Text | Parameters and return type literal |
| args_count | Integer | Number of arguments |
| class_name | Text | Return class name for method |
| return_type | Text | Return type literal |
| is_method | Boolean | True if it's a method |
| is_virtual | Boolean | Return true if a C++ member function or member function template is explicitly declared 'virtual' or if it overrides a virtual method from one of the base classes |
| is_pure_virtual | Boolean | Return ture if a C++ member function or member function template is pure virtual |
| is_static | Boolean | Return ture if a C++ member function is static |
| is_const | Boolean | Return ture if a C++ member function is const |
| has_template | Boolean | True if it's has template |
| access_modifier | Integer | Returns the access control level for method, 1 for public, 2 protected, 3 provide, 0 for invalid |
| is_variadic | Boolean | True if function type is variadic |
| file | Text | File path |
| line | Integer | Line at the file path |
| column | Integer | Column at the file path |
| offset | Integer | Offset at the file path |
| Name | Type | Description |
| ------------ | ------------ | ---------------------------------- |
| name | Text | Function or Method name |
| signature | Text | Parameters and return type literal |
| return_type | Text | Return type |
| ast_function | FunctionNode | AST node of the function |
| source_loc | SourceLoc | Source location of AST node |

</details>

Expand All @@ -133,15 +117,12 @@ SELECT * FROM globals WHERE is_volatile

<summary>Globals table</summary>

| Name | Type | Description |
| ----------- | ------- | --------------------------------- |
| name | Text | Global variable name |
| type | Text | Global variable type literal |
| is_volatile | Boolean | True if variable type is volatile |
| file | Text | File path |
| line | Integer | Line at the file path |
| column | Integer | Column at the file path |
| offset | Integer | Offset at the file path |
| Name | Type | Description |
| ----------- | --------- | --------------------------------- |
| name | Text | Global variable name |
| type | Text | Global variable type literal |
| is_volatile | Boolean | True if variable type is volatile |
| source_loc | SourceLoc | Source location of AST node |

</details>

Expand Down
Binary file modified media/clangql_demo.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 6 additions & 24 deletions media/clangql_logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit b5a230a

Please sign in to comment.