Skip to content

C++: Uncomment cases in dbscheme #11799

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2,208 changes: 2,208 additions & 0 deletions cpp/downgrades/ba86bebea4c7a8235c2fa0e220391fbd4446a087/old.dbscheme

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
description: Uncomment case splits in dbscheme
compatibility: full
234 changes: 126 additions & 108 deletions cpp/ql/lib/semmlecode.cpp.dbscheme
Original file line number Diff line number Diff line change
Expand Up @@ -303,12 +303,11 @@ affectedbymacroexpansion(
int inv: @macroinvocation ref
);

/*
case @macroinvocations.kind of
1 = macro expansion
| 2 = other macro reference
;
*/
case @macroinvocation.kind of
1 = @macro_expansion
| 2 = @other_macro_reference
;

macroinvocations(
unique int id: @macroinvocation,
int macro_id: @ppd_define ref,
Expand Down Expand Up @@ -345,28 +344,37 @@ macro_argument_expanded(
);

/*
case @function.kind of
1 = normal
| 2 = constructor
| 3 = destructor
| 4 = conversion
| 5 = operator
| 6 = builtin // GCC built-in functions, e.g. __builtin___memcpy_chk
;
case @function.kind of
1 = @normal_function
| 2 = @constructor
| 3 = @destructor
| 4 = @conversion_function
| 5 = @operator
| 6 = @builtin_function // GCC built-in functions, e.g. __builtin___memcpy_chk
;
*/

functions(
unique int id: @function,
string name: string ref,
int kind: int ref
);

function_entry_point(int id: @function ref, unique 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);
function_return_type(
int id: @function ref,
int return_type: @type ref
);

/** If `function` is a coroutine, then this gives the
std::experimental::resumable_traits instance associated with it,
and the variables representing the `handle` and `promise` for it. */
/**
* If `function` is a coroutine, then this gives the `std::experimental::resumable_traits`
* instance associated with it, and the variables representing the `handle` and `promise`
* for it.
*/
coroutine(
unique int function: @function ref,
int traits: @type ref,
Expand All @@ -392,7 +400,10 @@ function_deleted(unique int id: @function ref);

function_defaulted(unique int id: @function ref);

member_function_this_type(unique int id: @function ref, int this_type: @type ref);
member_function_this_type(
unique int id: @function ref,
int this_type: @type ref
);

#keyset[id, type_id]
fun_decls(
Expand Down Expand Up @@ -495,7 +506,10 @@ params(
int type_id: @type ref
);

overrides(int new: @function ref, int old: @function ref);
overrides(
int new: @function ref,
int old: @function ref
);

#keyset[id, type_id]
membervariables(
Expand Down Expand Up @@ -541,63 +555,63 @@ enumconstants(

@localscopevariable = @localvariable | @parameter;

/*
Built-in types are the fundamental types, e.g., integral, floating, and void.

case @builtintype.kind of
1 = error
| 2 = unknown
| 3 = void
| 4 = boolean
| 5 = char
| 6 = unsigned_char
| 7 = signed_char
| 8 = short
| 9 = unsigned_short
| 10 = signed_short
| 11 = int
| 12 = unsigned_int
| 13 = signed_int
| 14 = long
| 15 = unsigned_long
| 16 = signed_long
| 17 = long_long
| 18 = unsigned_long_long
| 19 = signed_long_long
| 20 = __int8 // Microsoft-specific
| 21 = __int16 // Microsoft-specific
| 22 = __int32 // Microsoft-specific
| 23 = __int64 // Microsoft-specific
| 24 = float
| 25 = double
| 26 = long_double
| 27 = _Complex_float // C99-specific
| 28 = _Complex_double // C99-specific
| 29 = _Complex_long double // C99-specific
| 30 = _Imaginary_float // C99-specific
| 31 = _Imaginary_double // C99-specific
| 32 = _Imaginary_long_double // C99-specific
| 33 = wchar_t // Microsoft-specific
| 34 = decltype_nullptr // C++11
| 35 = __int128
| 36 = unsigned___int128
| 37 = signed___int128
| 38 = __float128
| 39 = _Complex___float128
| 40 = _Decimal32
| 41 = _Decimal64
| 42 = _Decimal128
| 43 = char16_t
| 44 = char32_t
| 45 = _Float32
| 46 = _Float32x
| 47 = _Float64
| 48 = _Float64x
| 49 = _Float128
| 50 = _Float128x
| 51 = char8_t
;
*/
/**
* Built-in types are the fundamental types, e.g., integral, floating, and void.
*/
case @builtintype.kind of
1 = @errortype
| 2 = @unknowntype
| 3 = @void
| 4 = @boolean
| 5 = @char
| 6 = @unsigned_char
| 7 = @signed_char
| 8 = @short
| 9 = @unsigned_short
| 10 = @signed_short
| 11 = @int
| 12 = @unsigned_int
| 13 = @signed_int
| 14 = @long
| 15 = @unsigned_long
| 16 = @signed_long
| 17 = @long_long
| 18 = @unsigned_long_long
| 19 = @signed_long_long
// ... 20 Microsoft-specific __int8
// ... 21 Microsoft-specific __int16
// ... 22 Microsoft-specific __int32
// ... 23 Microsoft-specific __int64
| 24 = @float
| 25 = @double
| 26 = @long_double
| 27 = @complex_float // C99-specific _Complex float
| 28 = @complex_double // C99-specific _Complex double
| 29 = @complex_long_double // C99-specific _Complex long double
| 30 = @imaginary_float // C99-specific _Imaginary float
| 31 = @imaginary_double // C99-specific _Imaginary double
| 32 = @imaginary_long_double // C99-specific _Imaginary long double
| 33 = @wchar_t // Microsoft-specific
| 34 = @decltype_nullptr // C++11
| 35 = @int128 // __int128
| 36 = @unsigned_int128 // unsigned __int128
| 37 = @signed_int128 // signed __int128
| 38 = @float128 // __float128
| 39 = @complex_float128 // _Complex __float128
| 40 = @decimal32 // _Decimal32
| 41 = @decimal64 // _Decimal64
| 42 = @decimal128 // _Decimal128
| 43 = @char16_t
| 44 = @char32_t
| 45 = @std_float32 // _Float32
| 46 = @float32x // _Float32x
| 47 = @std_float64 // _Float64
| 48 = @float64x // _Float64x
| 49 = @std_float128 // _Float128
| 50 = @float128x // _Float128x
| 51 = @char8_t
;

builtintypes(
unique int id: @builtintype,
string name: string ref,
Expand All @@ -607,23 +621,23 @@ builtintypes(
int alignment: int ref
);

/*
Derived types are types that are directly derived from existing types and
point to, refer to, transform type data to return a new type.

case @derivedtype.kind of
1 = pointer
| 2 = reference
| 3 = type_with_specifiers
| 4 = array
| 5 = gnu_vector
| 6 = routineptr
| 7 = routinereference
| 8 = rvalue_reference // C++11
/**
* Derived types are types that are directly derived from existing types and
* point to, refer to, transform type data to return a new type.
*/
case @derivedtype.kind of
1 = @pointer
| 2 = @reference
| 3 = @type_with_specifiers
| 4 = @array
| 5 = @gnu_vector
| 6 = @routineptr
| 7 = @routinereference
| 8 = @rvalue_reference // C++11
// ... 9 type_conforming_to_protocols deprecated
| 10 = block
;
*/
| 10 = @block
;

derivedtypes(
unique int id: @derivedtype,
string name: string ref,
Expand Down Expand Up @@ -675,23 +689,24 @@ decltypes(
);

/*
case @usertype.kind of
1 = struct
| 2 = class
| 3 = union
| 4 = enum
| 5 = typedef // classic C: typedef typedef type name
| 6 = template
| 7 = template_parameter
| 8 = template_template_parameter
| 9 = proxy_class // a proxy class associated with a template parameter
case @usertype.kind of
1 = @struct
| 2 = @class
| 3 = @union
| 4 = @enum
| 5 = @typedef // classic C: typedef typedef type name
| 6 = @template
| 7 = @template_parameter
| 8 = @template_template_parameter
| 9 = @proxy_class // a proxy class associated with a template parameter
// ... 10 objc_class deprecated
// ... 11 objc_protocol deprecated
// ... 12 objc_category deprecated
| 13 = scoped_enum
| 14 = using_alias // a using name = type style typedef
;
| 13 = @scoped_enum
| 14 = @using_alias // a using name = type style typedef
;
*/

usertypes(
unique int id: @usertype,
string name: string ref,
Expand Down Expand Up @@ -1162,7 +1177,10 @@ case @funbindexpr.kind of
| 2 = @adl_call // a call whose target is only found by ADL
;
*/
iscall(unique int caller: @funbindexpr ref, int kind: int ref);
iscall(
unique int caller: @funbindexpr ref,
int kind: int ref
);

numtemplatearguments(
unique int expr_id: @expr ref,
Expand Down
Loading