mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
C++: Support repeated initializers in dbscheme.
This commit is contained in:
@@ -192,7 +192,8 @@ class ClassAggregateLiteral extends AggregateLiteral {
|
|||||||
*/
|
*/
|
||||||
Expr getFieldExpr(Field field) {
|
Expr getFieldExpr(Field field) {
|
||||||
field = classType.getAField() and
|
field = classType.getAField() and
|
||||||
aggregate_field_init(underlyingElement(this), unresolveElement(result), unresolveElement(field))
|
aggregate_field_init(underlyingElement(this), unresolveElement(result), unresolveElement(field),
|
||||||
|
_)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -264,7 +265,7 @@ class ArrayOrVectorAggregateLiteral extends AggregateLiteral {
|
|||||||
* element `elementIndex`, if present.
|
* element `elementIndex`, if present.
|
||||||
*/
|
*/
|
||||||
Expr getElementExpr(int elementIndex) {
|
Expr getElementExpr(int elementIndex) {
|
||||||
aggregate_array_init(underlyingElement(this), unresolveElement(result), elementIndex)
|
aggregate_array_init(underlyingElement(this), unresolveElement(result), elementIndex, _)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -1820,24 +1820,26 @@ new_array_allocated_type(
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* The field being initialized by an initializer expression within an aggregate
|
* The field being initialized by an initializer expression within an aggregate
|
||||||
* initializer for a class/struct/union.
|
* initializer for a class/struct/union. Position is used to sort repeated initializers.
|
||||||
*/
|
*/
|
||||||
#keyset[aggregate, field]
|
#keyset[aggregate, position]
|
||||||
aggregate_field_init(
|
aggregate_field_init(
|
||||||
int aggregate: @aggregateliteral ref,
|
int aggregate: @aggregateliteral ref,
|
||||||
int initializer: @expr ref,
|
int initializer: @expr ref,
|
||||||
int field: @membervariable ref
|
int field: @membervariable ref,
|
||||||
|
int position: int ref
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The index of the element being initialized by an initializer expression
|
* The index of the element being initialized by an initializer expression
|
||||||
* within an aggregate initializer for an array.
|
* within an aggregate initializer for an array. Position is used to sort repeated initializers.
|
||||||
*/
|
*/
|
||||||
#keyset[aggregate, element_index]
|
#keyset[aggregate, position]
|
||||||
aggregate_array_init(
|
aggregate_array_init(
|
||||||
int aggregate: @aggregateliteral ref,
|
int aggregate: @aggregateliteral ref,
|
||||||
int initializer: @expr ref,
|
int initializer: @expr ref,
|
||||||
int element_index: int ref
|
int element_index: int ref,
|
||||||
|
int position: int ref
|
||||||
);
|
);
|
||||||
|
|
||||||
@ctorinit = @ctordirectinit
|
@ctorinit = @ctordirectinit
|
||||||
|
|||||||
Reference in New Issue
Block a user