Merge pull request #815 from geoffw0/keyset

CPP: dbscheme annotations
This commit is contained in:
Jonas Jensen
2019-03-05 14:53:46 +00:00
committed by GitHub

View File

@@ -39,6 +39,7 @@ compilations(
* 5 | f2.c
* 6 | f3.c
*/
#keyset[id, num]
compilation_args(
int id : @compilation ref,
int num : int ref,
@@ -62,6 +63,7 @@ compilation_args(
* Note that even if those files `#include` headers, those headers
* do not appear as rows.
*/
#keyset[id, num]
compilation_compiling_files(
int id : @compilation ref,
int num : int ref,
@@ -80,6 +82,7 @@ compilation_compiling_files(
* 3 | CPU seconds used by the extractor backend
* 4 | Elapsed seconds during the extractor backend
*/
#keyset[id, num, kind]
compilation_time(
int id : @compilation ref,
int num : int ref,
@@ -95,13 +98,14 @@ compilation_time(
/**
* An error or warning generated by the extractor.
* The diagnosstic message `diagnostic` was generated during compiler
* The diagnostic message `diagnostic` was generated during compiler
* invocation `compilation`, and is the `file_number_diagnostic_number`th
* message generated while extracting the `file_number`th file of that
* invocation.
*/
#keyset[compilation, file_number, file_number_diagnostic_number]
diagnostic_for(
int diagnostic : @diagnostic ref,
unique int diagnostic : @diagnostic ref,
int compilation : @compilation ref,
int file_number : int ref,
int file_number_diagnostic_number : int ref
@@ -110,7 +114,7 @@ diagnostic_for(
/**
* If extraction was successful, then `cpu_seconds` and
* `elapsed_seconds` are the CPU time and elapsed time (respectively)
* that extractino took for compiler invocation `id`.
* that extraction took for compiler invocation `id`.
*/
compilation_finished(
unique int id : @compilation ref,
@@ -167,6 +171,7 @@ similarCode(
/**
* Data used by the 'duplicate code' and 'similar code' detection.
*/
#keyset[id, offset]
tokens(
int id : @duplication_or_similarity ref,
int offset : int ref,
@@ -197,7 +202,7 @@ header_to_external_package(
*/
svnentries(
int id : @svnentry,
unique int id : @svnentry,
string revision : string ref,
string author : string ref,
date revisionDate : date ref,
@@ -211,7 +216,7 @@ svnaffectedfiles(
)
svnentrymsg(
int id : @svnentry ref,
unique int id : @svnentry ref,
string message : string ref
)
@@ -233,7 +238,7 @@ svnchurn(
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [LGTM locations](https://lgtm.com/docs/ql/locations).
* [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
*/
locations_default(
/** The location of an element that is not an expression or a statement. */
@@ -250,7 +255,7 @@ locations_default(
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [LGTM locations](https://lgtm.com/docs/ql/locations).
* [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
*/
locations_stmt(
/** The location of a statement. */
@@ -267,7 +272,7 @@ locations_stmt(
* The location spans column `startcolumn` of line `startline` to
* column `endcolumn` of line `endline` in file `file`.
* For more information, see
* [LGTM locations](https://lgtm.com/docs/ql/locations).
* [Locations](https://help.semmle.com/QL/learn-ql/ql/locations.html).
*/
locations_expr(
/** The location of an expression. */
@@ -398,7 +403,7 @@ functions(
int kind: int ref
);
function_entry_point(int id: @function ref, int entry_point: @stmt ref);
function_entry_point(int id: @function ref, unique int entry_point: @stmt ref);
function_return_type(int id: @function ref, int return_type: @type ref);
@@ -424,6 +429,7 @@ fun_decl_specifiers(
int id: @fun_decl ref,
string name: string ref
)
#keyset[fun_decl, index]
fun_decl_throws(
int fun_decl: @fun_decl ref,
int index: int ref,
@@ -497,6 +503,8 @@ static_asserts(
);
// each function has an ordered list of parameters
#keyset[id, type_id]
#keyset[function, index, type_id]
params(
int id: @parameter,
int function: @functionorblock ref,
@@ -1488,8 +1496,9 @@ new_array_allocated_type(
* The field being initialized by an initializer expression within an aggregate
* initializer for a class/struct/union.
*/
#keyset[aggregate, field]
aggregate_field_init(
unique int aggregate: @aggregateliteral ref,
int aggregate: @aggregateliteral ref,
int initializer: @expr ref,
int field: @membervariable ref
);
@@ -1498,8 +1507,9 @@ aggregate_field_init(
* The index of the element being initialized by an initializer expression
* within an aggregate initializer for an array.
*/
#keyset[aggregate, element_index]
aggregate_array_init(
unique int aggregate: @aggregateliteral ref,
int aggregate: @aggregateliteral ref,
int initializer: @expr ref,
int element_index: int ref
);
@@ -1635,6 +1645,7 @@ do_body(
int body_id: @stmt ref
);
#keyset[switch_stmt, index]
switch_case(
int switch_stmt: @stmt_switch ref,
int index: int ref,
@@ -1642,27 +1653,27 @@ switch_case(
);
switch_body(
int switch_stmt: @stmt_switch ref,
unique int switch_stmt: @stmt_switch ref,
int body_id: @stmt ref
);
for_initialization(
int for_stmt: @stmt_for ref,
unique int for_stmt: @stmt_for ref,
int init_id: @stmt ref
);
for_condition(
int for_stmt: @stmt_for ref,
unique int for_stmt: @stmt_for ref,
int condition_id: @expr ref
);
for_update(
int for_stmt: @stmt_for ref,
unique int for_stmt: @stmt_for ref,
int update_id: @expr ref
);
for_body(
int for_stmt: @stmt_for ref,
unique int for_stmt: @stmt_for ref,
int body_id: @stmt ref
);
@@ -1706,7 +1717,7 @@ stmt_decl_entry_bind(
@functionorblock = @function | @stmt_block;
blockscope(
int block: @stmt_block ref,
unique int block: @stmt_block ref,
int enclosing: @functionorblock ref
);