Swift: db upgrade/downgrade script

This commit is contained in:
Nora Dimitrijević
2022-12-14 15:56:05 -05:00
parent 8a3ef31a2c
commit e16b23afc1
7 changed files with 5032 additions and 9 deletions

View File

@@ -0,0 +1,5 @@
class Callable extends @callable {
string toString() { result = "" }
}
query predicate abstract_function_decls(Callable id, string name) { callable_names(id, name) }

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,6 @@
description: Revert: Move getName() from AbstractFunctionDecl to Callable
compatibility: full
// Rename callable_names to abstract_function_decls
abstract_function_decls.rel: run abstract_function_decls.qlo
callable_names.rel: delete

View File

@@ -0,0 +1,7 @@
class AbstractFunctionDecl extends @abstract_function_decl {
string toString() { result = "" }
}
query predicate callable_names(AbstractFunctionDecl id, string name) {
abstract_function_decls(id, name)
}

View File

@@ -31,6 +31,12 @@ element_is_unknown(
| @abstract_function_decl
;
#keyset[id]
callable_names(
int id: @callable ref,
string name: string ref
);
#keyset[id]
callable_self_params(
int id: @callable ref,
@@ -315,12 +321,6 @@ value_decls( //dir=decl
| @func_decl
;
#keyset[id]
abstract_function_decls( //dir=decl
int id: @abstract_function_decl ref,
string name: string ref
);
@abstract_storage_decl =
@subscript_decl
| @var_decl
@@ -870,7 +870,8 @@ if_exprs( //dir=expr
);
@implicit_conversion_expr =
@any_hashable_erasure_expr
@abi_safe_conversion_expr
| @any_hashable_erasure_expr
| @archetype_to_super_expr
| @array_to_pointer_expr
| @bridge_from_obj_c_expr
@@ -1129,6 +1130,10 @@ vararg_expansion_exprs( //dir=expr
int sub_expr: @expr_or_none ref
);
abi_safe_conversion_exprs( //dir=expr
unique int id: @abi_safe_conversion_expr
);
any_hashable_erasure_exprs( //dir=expr
unique int id: @any_hashable_erasure_expr
);

View File

@@ -1,2 +1,6 @@
description: Add missing Accessor and AccessSemantics cases
compatibility: backwards
description: Move getName() from AbstractFunctionDecl to Callable
compatibility: full
// Rename abstract_function_decls to callable_names
callable_names.rel: run callable_names.qlo
abstract_function_decls.rel: delete