Skip to content

Commit 53bd236

Browse files
authored
Merge pull request github#19329 from github/idrissrio/designated-initializer
C++: add predicate to distinguish designator-based initializations
2 parents 48f9e5a + 0bcee84 commit 53bd236

File tree

14 files changed

+10701
-454
lines changed

14 files changed

+10701
-454
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Expr extends @expr {
2+
string toString() { none() }
3+
}
4+
5+
class AggregateLiteral extends Expr, @aggregateliteral {
6+
override string toString() { none() }
7+
}
8+
9+
from AggregateLiteral aggregate, Expr initializer, int element_index, int position
10+
where aggregate_array_init(aggregate, initializer, element_index, position, _)
11+
select aggregate, initializer, element_index, position
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
class Expr extends @expr {
2+
string toString() { none() }
3+
}
4+
5+
class AggregateLiteral extends Expr, @aggregateliteral {
6+
override string toString() { none() }
7+
}
8+
9+
class MemberVariable extends @membervariable {
10+
string toString() { none() }
11+
}
12+
13+
from AggregateLiteral aggregate, Expr initializer, MemberVariable field, int position
14+
where aggregate_field_init(aggregate, initializer, field, position, _)
15+
select aggregate, initializer, field, position

0 commit comments

Comments
 (0)