mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
C++: Add db upgrade and downgrade scripts for repeated initializers.
This commit is contained in:
2212
cpp/downgrades/19887dbd33327fb07d54251786e0cb2578539775/old.dbscheme
Normal file
2212
cpp/downgrades/19887dbd33327fb07d54251786e0cb2578539775/old.dbscheme
Normal file
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
@@ -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
|
||||
@@ -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
File diff suppressed because it is too large
Load Diff
@@ -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
|
||||
Reference in New Issue
Block a user