C++: Add db upgrade and downgrade scripts for repeated initializers.

This commit is contained in:
Alexandre Boulgakov
2023-03-30 16:11:02 +01:00
parent d0a77a8433
commit b5932debc0
8 changed files with 8878 additions and 0 deletions

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,4 @@
description: Revert support for repeated initializers, which are allowed in C with designated initializers.
compatibility: backwards
aggregate_field_init.rel: reorder aggregate_field_init.rel (int aggregate, int initializer, int field, int position) aggregate initializer field
aggregate_array_init.rel: reorder aggregate_array_init.rel (int aggregate, int initializer, int element_index, int position) aggregate initializer element_index

View File

@@ -0,0 +1,11 @@
class AggregateLiteral extends @aggregateliteral {
string toString() { none() }
}
class Expr extends @expr {
string toString() { none() }
}
from AggregateLiteral al, Expr init, int index, int position
where exprparents(init, position, al) and aggregate_array_init(al, init, index)
select al, init, index, position

View File

@@ -0,0 +1,15 @@
class AggregateLiteral extends @aggregateliteral {
string toString() { none() }
}
class Expr extends @expr {
string toString() { none() }
}
class Field extends @membervariable {
string toString() { none() }
}
from AggregateLiteral al, Expr init, Field field, int position
where exprparents(init, position, al) and aggregate_field_init(al, init, field)
select al, init, field, position

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,4 @@
description: Support repeated initializers, which are allowed in C with designated initializers.
compatibility: full
aggregate_field_init.rel: run aggregate_field_init.qlo
aggregate_array_init.rel: run aggregate_array_init.qlo