Skip to content

Commit 9d8bd63

Browse files
committed
Separate recursing for the destination and recursing for a subobject
1 parent c487f9d commit 9d8bd63

File tree

4 files changed

+16
-13
lines changed

4 files changed

+16
-13
lines changed

cpp23/aggregate_init.dot.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ subgraph cluster_aggregate_initialization {
7777

7878
INSTRUCTION_NODE(aggregate_initialization_explicit_union_defn_d, "Let D be the designated-initializer-clause naming a member of the anonymous union member.", "[dcl.init.aggr]/4.1")
7979
-> INSTRUCTION_NODE(aggregate_initialize_explicit_union_init, "Initialize the element with the braced-init-list { D }.")
80-
-> NEW_RECURSE()
80+
-> NEW_RECURSE_SUBOBJECT()
8181
-> aggregate_initialize_explicit_repeat_next
8282
}
8383

@@ -88,11 +88,11 @@ subgraph cluster_aggregate_initialization {
8888
aggregate_initialize_explicit_copy_kind -> aggregate_initialize_explicit_copy_designated [label="designated-initializer-list"]
8989

9090
INSTRUCTION_NODE(aggregate_initialize_explicit_copy_init_list, "Copy-initialize the element from the corresponding initializer-clause.", "[dcl.init.aggr]/4.2")
91-
-> NEW_RECURSE()
91+
-> NEW_RECURSE_SUBOBJECT()
9292
-> aggregate_initialize_explicit_is_narrowing_checked
9393

9494
INSTRUCTION_NODE(aggregate_initialize_explicit_copy_designated, "Initialize the element with the brace-or-equal-initializer of the corresponding designated-initializer-clause.", "[dcl.init.aggr]/4.2")
95-
-> NEW_RECURSE()
95+
-> NEW_RECURSE_SUBOBJECT()
9696
-> aggregate_initialize_explicit_is_narrowing_checked
9797

9898
YN_QUESTION_NODE(aggregate_initialize_explicit_is_narrowing_checked, "Is the initializer of the form \"assignment-expression\" or \"= assignment-expression\"?", "[dcl.init.aggr]/4.2", aggregate_initialize_explicit_is_narrowing, aggregate_initialize_explicit_repeat_next)
@@ -117,7 +117,7 @@ subgraph cluster_aggregate_initialization {
117117
YN_QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_has_dflt_mem_init, "Does the element have a default member initializer?", "[dcl.init.aggr]/5.1", aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, aggregate_initialize_nonexplicit_nonunion_is_reference)
118118

119119
INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_dflt_mem_init, "The element is initialized from that initializer.", "[dcl.init.aggr]/5.1")
120-
-> NEW_RECURSE()
120+
-> NEW_RECURSE_SUBOBJECT()
121121
-> aggregate_initialize_nonexplicit_nonunion_repeat_next
122122
}
123123

@@ -126,7 +126,7 @@ subgraph cluster_aggregate_initialization {
126126
YN_QUESTION_NODE(aggregate_initialize_nonexplicit_nonunion_is_reference, "Is the element a reference?", "[dcl.init.aggr]/5.2", NEW_ILL_FORMED(), aggregate_initialize_nonexplicit_nonunion_copy_init)
127127

128128
INSTRUCTION_NODE(aggregate_initialize_nonexplicit_nonunion_copy_init, "The element is copy-initialized from an empty initializer list.", "[dcl.init.aggr]/5.2")
129-
-> NEW_RECURSE()
129+
-> NEW_RECURSE_SUBOBJECT()
130130
-> aggregate_initialize_nonexplicit_nonunion_repeat_next
131131
}
132132

@@ -144,14 +144,14 @@ subgraph cluster_aggregate_initialization {
144144
YN_QUESTION_NODE(aggregate_initialize_nonexplicit_union_empty_has_dflt, "Does any variant member of the union have a default member initializer?", "[dcl.init.aggr]/5.4", aggregate_initialize_nonexplicit_union_dflt_mem, aggregate_initialize_nonexplicit_union_first_mem)
145145

146146
INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_dflt_mem, "That member is initialized from its default member initializer.", "[dcl.init.aggr]/5.4")
147-
-> NEW_RECURSE()
147+
-> NEW_RECURSE_SUBOBJECT()
148148
-> NEW_DONE()
149149
}
150150

151151
// 5.4
152152
{
153153
INSTRUCTION_NODE(aggregate_initialize_nonexplicit_union_first_mem, "The first member of the union (if any) is copy-initialized from an empty initializer list.", "[dcl.init.aggr]/5.5")
154-
-> NEW_RECURSE()
154+
-> NEW_RECURSE_SUBOBJECT()
155155
-> NEW_DONE()
156156
}
157157
}

cpp23/common.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@
33

44
#define DONE_NODE(id) { id [label="Done.", style=filled, fillcolor=green, shape=box, color=green, fontcolor=white]; }
55
#define ILL_FORMED_NODE(id) { id [label="The program is ill-formed.", shape=box, style=filled, color=red, fontcolor=white]; }
6-
#define RECURSE_NODE(id) { id [label="Recurse with the new initialization.", shape=box, style=filled, color=blue, fontcolor=white]}
6+
#define RECURSE_SUBOBJECT_NODE(id) { id [label="Partially recurse.", shape=box, style=filled, color=lightblue, fontcolor=black]}
7+
#define RECURSE_NODE(id) { id [label="Recurse.", shape=box, style=filled, color=blue, fontcolor=white]}
78

89
#define NEW_DONE() { DONE_NODE(TOKEN_CAT(__local_done_, __COUNTER__)); }
910
#define NEW_ILL_FORMED() { ILL_FORMED_NODE(TOKEN_CAT(__local_ill_formed_, __COUNTER__)); }
1011
#define NEW_RECURSE() { RECURSE_NODE(TOKEN_CAT(__local_recurse, __COUNTER__)); }
11-
#define INTERNALLY_RECURSES(id) { id -> { RECURSE_NODE(TOKEN_CAT(id, __recurse)); } [style="dotted"]; }
12+
#define NEW_RECURSE_SUBOBJECT() { RECURSE_SUBOBJECT_NODE(TOKEN_CAT(__local_recurse_subobject, __COUNTER__)); }
13+
14+
#define INTERNALLY_RECURSES_SUBOBJECT(id) { id -> { RECURSE_SUBOBJECT_NODE(TOKEN_CAT(id, __recurse)); } [style="dotted"]; }
1215

1316
// Arguments: name of source node, optional edge attrs.
1417
#define LINK_TO_DONE(id, ...) { id -> { DONE_NODE(TOKEN_CAT(id, __generated_done)); } __VA_ARGS__; }

cpp23/flowchart.dot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ digraph initialization {
5252
-> INSTRUCTION_NODE(array_value_init_n, "For each k < i <= n, value-initialize the i-th array element.")
5353
-> NEW_DONE()
5454

55-
INTERNALLY_RECURSES(array_copy_init_k)
55+
INTERNALLY_RECURSES_SUBOBJECT(array_copy_init_k)
5656
INTERNALLY_VALUE_INITS(array_value_init_n)
5757
}
5858

@@ -113,7 +113,7 @@ digraph initialization {
113113
-> INSTRUCTION_NODE(class_aggregate_paren_initialize_rest, "The remaining elements are initialized with their default member initializers, if any, and are otherwise value-initialized.")
114114
-> NEW_DONE()
115115

116-
INTERNALLY_RECURSES(class_aggregate_paren_initialize_first_k)
116+
INTERNALLY_RECURSES_SUBOBJECT(class_aggregate_paren_initialize_first_k)
117117
INTERNALLY_VALUE_INITS(class_aggregate_paren_initialize_rest)
118118
}
119119

cpp23/list_init.dot.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ subgraph list_initialization {
8484
-> INSTRUCTION_NODE(list_initializer_list_init_array, "Copy-initialize each element of the array with the corresponding element of the initializer list.")
8585
-> list_initializer_list_is_narrowing
8686

87-
INTERNALLY_RECURSES(list_initializer_list_init_array)
87+
INTERNALLY_RECURSES_SUBOBJECT(list_initializer_list_init_array)
8888

8989
YN_QUESTION_NODE_NO_CITE(list_initializer_list_is_narrowing, "Is a narrowing conversion required to initialize any of the elements?", NEW_ILL_FORMED(), list_initializer_list_init_object)
9090

@@ -168,7 +168,7 @@ subgraph list_initialization {
168168
-> list_ref_prvalue_init_prvalue
169169

170170
INSTRUCTION_NODE(list_ref_prvalue_init_prvalue, "The prvalue initializes its result object by copy-list-initialization.", "[dcl.init.list]/3.10")
171-
-> NEW_RECURSE()
171+
-> NEW_RECURSE_SUBOBJECT()
172172
-> INSTRUCTION_NODE(list_ref_prvalue_init_ref, "The reference is direct-initialized by the prvalue.", "[dcl.init.list]/3.10")
173173
-> NEW_RECURSE()
174174
}

0 commit comments

Comments
 (0)