Skip to content

Commit 8eaa86e

Browse files
committed
Unify incdec-rhs into the compound-rhs node kind
1 parent 6bb4aef commit 8eaa86e

7 files changed

Lines changed: 70 additions & 97 deletions

File tree

go/ql/lib/semmle/go/controlflow/ControlFlowGraphShared.qll

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -485,8 +485,6 @@ module GoCfg {
485485
or
486486
n instanceof Go::SendStmt
487487
or
488-
n instanceof Go::IncDecStmt
489-
or
490488
n instanceof Go::FuncDecl
491489
}
492490

@@ -543,8 +541,10 @@ module GoCfg {
543541
tag = "zero-init:" + i.toString()
544542
)
545543
or
546-
// Increment/decrement implicit right-hand side (the `operand + 1` value)
547-
n instanceof Go::IncDecStmt and tag = "incdec-rhs"
544+
// Increment/decrement: a single node computes `operand + 1` (or `- 1`)
545+
// and writes it back, modelled the same as a compound assignment's
546+
// `compound-rhs` node (see `IR::EvalCompoundAssignRhsInstruction`).
547+
n instanceof Go::IncDecStmt and tag = "compound-rhs"
548548
or
549549
// Result write nodes in return statements
550550
exists(int i, Go::ReturnStmt ret |
@@ -1154,26 +1154,23 @@ module GoCfg {
11541154
}
11551155

11561156
/**
1157-
* Increment/decrement: operand → incdec-rhs → In(stmt)
1158-
* (IncDecStmt is in postOrInOrder, so In(stmt) is its evaluation point)
1157+
* Increment/decrement: operand → compound-rhs → After(stmt).
11591158
*
1160-
* The implicit constant `1` operand of the `operand + 1` computation is
1161-
* modelled directly on the `incdec-rhs` instruction rather than as its own
1162-
* control-flow node.
1159+
* `x++` is modelled just like the compound assignment `x += 1`: a single
1160+
* `compound-rhs` node computes the updated value and writes it back to the
1161+
* operand (see `IR::EvalCompoundAssignRhsInstruction`). The implicit constant
1162+
* `1` is modelled directly on that node rather than as its own node.
11631163
*/
11641164
private predicate incDecStep(PreControlFlowNode n1, PreControlFlowNode n2) {
11651165
exists(Go::IncDecStmt s |
11661166
// Before → Before operand
11671167
n1.isBefore(s) and n2.isBefore(s.getOperand())
11681168
or
1169-
// After operand → incdec-rhs
1170-
n1.isAfter(s.getOperand()) and n2.isAdditional(s, "incdec-rhs")
1171-
or
1172-
// incdec-rhs → In(stmt) (the assignment itself)
1173-
n1.isAdditional(s, "incdec-rhs") and n2.isIn(s)
1169+
// After operand → compound-rhs (the update value + write)
1170+
n1.isAfter(s.getOperand()) and n2.isAdditional(s, "compound-rhs")
11741171
or
1175-
// In(stmt) → After(stmt)
1176-
n1.isIn(s) and n2.isAfter(s)
1172+
// compound-rhs → After(stmt)
1173+
n1.isAdditional(s, "compound-rhs") and n2.isAfter(s)
11771174
)
11781175
}
11791176

go/ql/lib/semmle/go/controlflow/IR.qll

Lines changed: 26 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,6 @@ module IR {
176176
or
177177
this instanceof ConditionGuardInstruction and result = "condition guard"
178178
or
179-
this instanceof IncDecInstruction and result = "increment/decrement"
180-
or
181-
this instanceof EvalIncDecRhsInstruction and
182-
result = "right-hand side of increment/decrement"
183-
or
184179
this instanceof ReturnInstruction and result = "return"
185180
or
186181
this instanceof WriteResultInstruction and result = "result write"
@@ -665,23 +660,36 @@ module IR {
665660
}
666661

667662
/**
668-
* An instruction that computes the (implicit) right-hand side of a compound assignment,
669-
* such as the `x + y` in `x += y`, and writes the resulting value to the assignment's
670-
* left-hand side.
663+
* An instruction that computes the (implicit) right-hand side of a compound
664+
* assignment (the `x + y` in `x += y`) or an increment/decrement (the
665+
* `x + 1` in `x++`), and writes the resulting value to the left-hand side.
671666
*/
672667
class EvalCompoundAssignRhsInstruction extends WriteInstruction {
673-
CompoundAssignStmt assgn;
668+
AstNode s;
669+
670+
EvalCompoundAssignRhsInstruction() {
671+
this.isAdditional(s, "compound-rhs") and
672+
(s instanceof CompoundAssignStmt or s instanceof IncDecStmt)
673+
}
674674

675-
EvalCompoundAssignRhsInstruction() { this.isAdditional(assgn, "compound-rhs") }
675+
/** Gets the corresponding compound assignment statement, if it is one. */
676+
CompoundAssignStmt getAssignment() { result = s }
676677

677-
/** Gets the corresponding compound assignment statement. */
678-
CompoundAssignStmt getAssignment() { result = assgn }
678+
/**
679+
* Gets the corresponding compound assignment (`x += y`) or increment/decrement
680+
* (`x++`, `x--`) statement.
681+
*/
682+
AstNode getStmt() { result = s }
679683

680684
override Instruction getRhs() { result = this }
681685

682-
override Type getResultType() { result = assgn.getRhs().getType() }
686+
override Type getResultType() {
687+
result = s.(CompoundAssignStmt).getRhs().getType()
688+
or
689+
result = s.(IncDecStmt).getOperand().getType()
690+
}
683691

684-
override ControlFlow::Root getRoot() { result.isRootOf(assgn) }
692+
override ControlFlow::Root getRoot() { result.isRootOf(s) }
685693
}
686694

687695
/** An instruction extracting a component of a tuple value. */
@@ -871,36 +879,6 @@ module IR {
871879
override ControlFlow::Root getRoot() { result.isRootOf(go) }
872880
}
873881

874-
/** An instruction that corresponds to an increment or decrement statement. */
875-
class IncDecInstruction extends WriteInstruction {
876-
IncDecStmt ids;
877-
878-
IncDecInstruction() { this.isIn(ids) }
879-
880-
override Instruction getRhs() {
881-
result.(EvalIncDecRhsInstruction).isAdditional(ids, "incdec-rhs")
882-
}
883-
884-
override ControlFlow::Root getRoot() { result.isRootOf(ids) }
885-
}
886-
887-
/**
888-
* An instruction that computes the (implicit) right-hand side of an increment or
889-
* decrement statement.
890-
*/
891-
class EvalIncDecRhsInstruction extends Instruction {
892-
IncDecStmt ids;
893-
894-
EvalIncDecRhsInstruction() { this.isAdditional(ids, "incdec-rhs") }
895-
896-
/** Gets the corresponding increment or decrement statement. */
897-
IncDecStmt getStmt() { result = ids }
898-
899-
override Type getResultType() { result = ids.getOperand().getType() }
900-
901-
override ControlFlow::Root getRoot() { result.isRootOf(ids) }
902-
}
903-
904882
/** An instruction corresponding to a return from a function. */
905883
class ReturnInstruction extends Instruction {
906884
ReturnStmt ret;
@@ -1104,12 +1082,14 @@ module IR {
11041082
)
11051083
)
11061084
or
1107-
exists(IncDecStmt ids | write.isIn(ids) | lhs = ids.getOperand().stripParens())
1108-
or
11091085
exists(CompoundAssignStmt ca | write.isAdditional(ca, "compound-rhs") |
11101086
lhs = ca.getLhs().stripParens()
11111087
)
11121088
or
1089+
exists(IncDecStmt ids | write.isAdditional(ids, "compound-rhs") |
1090+
lhs = ids.getOperand().stripParens()
1091+
)
1092+
or
11131093
exists(FuncDef fd, int idx |
11141094
write.isAdditional(fd.getBody(), "param-init:" + idx.toString()) and
11151095
lhs = fd.getParameter(idx).getDeclaration()

go/ql/src/experimental/IntegerOverflow/RangeAnalysis.qll

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -389,12 +389,13 @@ float getAnSsaUpperBound(SsaDefinition def) {
389389
)
390390
else
391391
//SSA definition corresponding to an `IncDecStmt`
392-
if explicitDef.getInstruction() instanceof IR::IncDecInstruction
392+
if
393+
explicitDef.getInstruction().(IR::EvalCompoundAssignRhsInstruction).getStmt() instanceof
394+
IncDecStmt
393395
then
394-
exists(IncDecStmt incOrDec, IR::IncDecInstruction instr, float exprLB |
395-
instr = explicitDef.getInstruction() and
396+
exists(IncDecStmt incOrDec, float exprLB |
397+
explicitDef.getInstruction().(IR::EvalCompoundAssignRhsInstruction).getStmt() = incOrDec and
396398
exprLB = getAnUpperBound(incOrDec.getOperand()) and
397-
instr.getRhs().(IR::EvalIncDecRhsInstruction).getStmt() = incOrDec and
398399
(
399400
//IncStmt(x++)
400401
exists(IncStmt inc |
@@ -475,12 +476,13 @@ float getAnSsaLowerBound(SsaDefinition def) {
475476
)
476477
else
477478
//IncDecStmt
478-
if explicitDef.getInstruction() instanceof IR::IncDecInstruction
479+
if
480+
explicitDef.getInstruction().(IR::EvalCompoundAssignRhsInstruction).getStmt() instanceof
481+
IncDecStmt
479482
then
480-
exists(IncDecStmt incOrDec, IR::IncDecInstruction instr, float exprLB |
481-
instr = explicitDef.getInstruction() and
483+
exists(IncDecStmt incOrDec, float exprLB |
484+
explicitDef.getInstruction().(IR::EvalCompoundAssignRhsInstruction).getStmt() = incOrDec and
482485
exprLB = getALowerBound(incOrDec.getOperand()) and
483-
instr.getRhs().(IR::EvalIncDecRhsInstruction).getStmt() = incOrDec and
484486
(
485487
//IncStmt(x++)
486488
exists(IncStmt inc |
@@ -550,9 +552,7 @@ predicate ssaDependsOnSsa(SsaDefinition nextDef, SsaDefinition prevDef) {
550552
nextDef
551553
.(SsaExplicitDefinition)
552554
.getInstruction()
553-
.(IR::IncDecInstruction)
554-
.getRhs()
555-
.(IR::EvalIncDecRhsInstruction)
555+
.(IR::EvalCompoundAssignRhsInstruction)
556556
.getStmt() = incDec and
557557
ssaDependsOnExpr(prevDef, incDec.getOperand())
558558
)

go/ql/test/library-tests/semmle/go/controlflow/ControlFlowGraph/ControlFlowNode_getASuccessor.expected

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,7 +1279,7 @@
12791279
| exprs.go:49:30:54:1 | result-read:0 block statement | exprs.go:49:1:54:1 | Normal Exit |
12801280
| exprs.go:49:30:54:1 | zero-init:0 block statement | exprs.go:50:2:52:2 | for statement |
12811281
| exprs.go:50:2:52:2 | After for statement | exprs.go:53:2:53:7 | Before return statement |
1282-
| exprs.go:50:2:52:2 | [LoopHeader] for statement | exprs.go:50:27:50:29 | Before increment statement |
1282+
| exprs.go:50:2:52:2 | [LoopHeader] for statement | exprs.go:50:27:50:29 | increment statement |
12831283
| exprs.go:50:2:52:2 | for statement | exprs.go:50:6:50:11 | ... := ... |
12841284
| exprs.go:50:6:50:11 | ... := ... | exprs.go:50:11:50:11 | Before 0 |
12851285
| exprs.go:50:6:50:11 | After ... := ... | exprs.go:50:14:50:24 | Before ...<... |
@@ -1304,13 +1304,12 @@
13041304
| exprs.go:50:22:50:23 | After xs | exprs.go:50:18:50:24 | call to len |
13051305
| exprs.go:50:22:50:23 | Before xs | exprs.go:50:22:50:23 | xs |
13061306
| exprs.go:50:22:50:23 | xs | exprs.go:50:22:50:23 | After xs |
1307-
| exprs.go:50:27:50:27 | After i | exprs.go:50:27:50:29 | incdec-rhs increment statement |
1307+
| exprs.go:50:27:50:27 | After i | exprs.go:50:27:50:29 | compound-rhs increment statement |
13081308
| exprs.go:50:27:50:27 | Before i | exprs.go:50:27:50:27 | i |
13091309
| exprs.go:50:27:50:27 | i | exprs.go:50:27:50:27 | After i |
13101310
| exprs.go:50:27:50:29 | After increment statement | exprs.go:50:14:50:24 | Before ...<... |
1311-
| exprs.go:50:27:50:29 | Before increment statement | exprs.go:50:27:50:27 | Before i |
1312-
| exprs.go:50:27:50:29 | incdec-rhs increment statement | exprs.go:50:27:50:29 | increment statement |
1313-
| exprs.go:50:27:50:29 | increment statement | exprs.go:50:27:50:29 | After increment statement |
1311+
| exprs.go:50:27:50:29 | compound-rhs increment statement | exprs.go:50:27:50:29 | After increment statement |
1312+
| exprs.go:50:27:50:29 | increment statement | exprs.go:50:27:50:27 | Before i |
13141313
| exprs.go:50:31:52:2 | After block statement | exprs.go:50:2:52:2 | [LoopHeader] for statement |
13151314
| exprs.go:50:31:52:2 | block statement | exprs.go:51:3:51:14 | ... += ... |
13161315
| exprs.go:51:3:51:5 | After res | exprs.go:51:10:51:14 | Before index expression |
@@ -2235,21 +2234,20 @@
22352234
| main.go:73:7:73:7 | After 1 | main.go:73:2:73:7 | assign:0 ... := ... |
22362235
| main.go:73:7:73:7 | Before 1 | main.go:73:7:73:7 | 1 |
22372236
| main.go:74:2:79:2 | After for statement | main.go:80:2:80:13 | expression statement |
2238-
| main.go:74:2:79:2 | [LoopHeader] for statement | main.go:74:16:74:18 | Before increment statement |
2237+
| main.go:74:2:79:2 | [LoopHeader] for statement | main.go:74:16:74:18 | increment statement |
22392238
| main.go:74:2:79:2 | for statement | main.go:74:6:74:11 | ... := ... |
22402239
| main.go:74:6:74:11 | ... := ... | main.go:74:11:74:11 | Before 0 |
22412240
| main.go:74:6:74:11 | After ... := ... | main.go:74:20:79:2 | block statement |
22422241
| main.go:74:6:74:11 | assign:0 ... := ... | main.go:74:6:74:11 | After ... := ... |
22432242
| main.go:74:11:74:11 | 0 | main.go:74:11:74:11 | After 0 |
22442243
| main.go:74:11:74:11 | After 0 | main.go:74:6:74:11 | assign:0 ... := ... |
22452244
| main.go:74:11:74:11 | Before 0 | main.go:74:11:74:11 | 0 |
2246-
| main.go:74:16:74:16 | After i | main.go:74:16:74:18 | incdec-rhs increment statement |
2245+
| main.go:74:16:74:16 | After i | main.go:74:16:74:18 | compound-rhs increment statement |
22472246
| main.go:74:16:74:16 | Before i | main.go:74:16:74:16 | i |
22482247
| main.go:74:16:74:16 | i | main.go:74:16:74:16 | After i |
22492248
| main.go:74:16:74:18 | After increment statement | main.go:74:20:79:2 | block statement |
2250-
| main.go:74:16:74:18 | Before increment statement | main.go:74:16:74:16 | Before i |
2251-
| main.go:74:16:74:18 | incdec-rhs increment statement | main.go:74:16:74:18 | increment statement |
2252-
| main.go:74:16:74:18 | increment statement | main.go:74:16:74:18 | After increment statement |
2249+
| main.go:74:16:74:18 | compound-rhs increment statement | main.go:74:16:74:18 | After increment statement |
2250+
| main.go:74:16:74:18 | increment statement | main.go:74:16:74:16 | Before i |
22532251
| main.go:74:20:79:2 | After block statement | main.go:74:2:79:2 | [LoopHeader] for statement |
22542252
| main.go:74:20:79:2 | block statement | main.go:75:3:77:3 | if statement |
22552253
| main.go:75:3:77:3 | After if statement | main.go:78:3:78:7 | ... = ... |
@@ -2291,21 +2289,20 @@
22912289
| main.go:82:7:82:7 | After 1 | main.go:82:2:82:7 | assign:0 ... := ... |
22922290
| main.go:82:7:82:7 | Before 1 | main.go:82:7:82:7 | 1 |
22932291
| main.go:83:2:88:2 | After for statement | main.go:89:2:89:13 | expression statement |
2294-
| main.go:83:2:88:2 | [LoopHeader] for statement | main.go:83:16:83:18 | Before increment statement |
2292+
| main.go:83:2:88:2 | [LoopHeader] for statement | main.go:83:16:83:18 | increment statement |
22952293
| main.go:83:2:88:2 | for statement | main.go:83:6:83:11 | ... := ... |
22962294
| main.go:83:6:83:11 | ... := ... | main.go:83:11:83:11 | Before 0 |
22972295
| main.go:83:6:83:11 | After ... := ... | main.go:83:20:88:2 | block statement |
22982296
| main.go:83:6:83:11 | assign:0 ... := ... | main.go:83:6:83:11 | After ... := ... |
22992297
| main.go:83:11:83:11 | 0 | main.go:83:11:83:11 | After 0 |
23002298
| main.go:83:11:83:11 | After 0 | main.go:83:6:83:11 | assign:0 ... := ... |
23012299
| main.go:83:11:83:11 | Before 0 | main.go:83:11:83:11 | 0 |
2302-
| main.go:83:16:83:16 | After i | main.go:83:16:83:18 | incdec-rhs increment statement |
2300+
| main.go:83:16:83:16 | After i | main.go:83:16:83:18 | compound-rhs increment statement |
23032301
| main.go:83:16:83:16 | Before i | main.go:83:16:83:16 | i |
23042302
| main.go:83:16:83:16 | i | main.go:83:16:83:16 | After i |
23052303
| main.go:83:16:83:18 | After increment statement | main.go:83:20:88:2 | block statement |
2306-
| main.go:83:16:83:18 | Before increment statement | main.go:83:16:83:16 | Before i |
2307-
| main.go:83:16:83:18 | incdec-rhs increment statement | main.go:83:16:83:18 | increment statement |
2308-
| main.go:83:16:83:18 | increment statement | main.go:83:16:83:18 | After increment statement |
2304+
| main.go:83:16:83:18 | compound-rhs increment statement | main.go:83:16:83:18 | After increment statement |
2305+
| main.go:83:16:83:18 | increment statement | main.go:83:16:83:16 | Before i |
23092306
| main.go:83:20:88:2 | After block statement | main.go:83:2:88:2 | [LoopHeader] for statement |
23102307
| main.go:83:20:88:2 | block statement | main.go:84:3:84:7 | ... = ... |
23112308
| main.go:84:3:84:7 | ... = ... | main.go:84:7:84:7 | Before 2 |
@@ -3160,7 +3157,7 @@
31603157
| stmts.go:23:11:37:2 | After block statement | stmts.go:23:2:37:2 | [LoopHeader] for statement |
31613158
| stmts.go:23:11:37:2 | block statement | stmts.go:24:3:36:3 | for statement |
31623159
| stmts.go:24:3:36:3 | After for statement | stmts.go:23:11:37:2 | After block statement |
3163-
| stmts.go:24:3:36:3 | [LoopHeader] for statement | stmts.go:24:23:24:25 | Before increment statement |
3160+
| stmts.go:24:3:36:3 | [LoopHeader] for statement | stmts.go:24:23:24:25 | increment statement |
31643161
| stmts.go:24:3:36:3 | for statement | stmts.go:24:7:24:12 | ... := ... |
31653162
| stmts.go:24:7:24:12 | ... := ... | stmts.go:24:12:24:12 | Before 0 |
31663163
| stmts.go:24:7:24:12 | After ... := ... | stmts.go:24:15:24:20 | Before ...<... |
@@ -3179,13 +3176,12 @@
31793176
| stmts.go:24:19:24:20 | 10 | stmts.go:24:19:24:20 | After 10 |
31803177
| stmts.go:24:19:24:20 | After 10 | stmts.go:24:15:24:20 | ...<... |
31813178
| stmts.go:24:19:24:20 | Before 10 | stmts.go:24:19:24:20 | 10 |
3182-
| stmts.go:24:23:24:23 | After i | stmts.go:24:23:24:25 | incdec-rhs increment statement |
3179+
| stmts.go:24:23:24:23 | After i | stmts.go:24:23:24:25 | compound-rhs increment statement |
31833180
| stmts.go:24:23:24:23 | Before i | stmts.go:24:23:24:23 | i |
31843181
| stmts.go:24:23:24:23 | i | stmts.go:24:23:24:23 | After i |
31853182
| stmts.go:24:23:24:25 | After increment statement | stmts.go:24:15:24:20 | Before ...<... |
3186-
| stmts.go:24:23:24:25 | Before increment statement | stmts.go:24:23:24:23 | Before i |
3187-
| stmts.go:24:23:24:25 | incdec-rhs increment statement | stmts.go:24:23:24:25 | increment statement |
3188-
| stmts.go:24:23:24:25 | increment statement | stmts.go:24:23:24:25 | After increment statement |
3183+
| stmts.go:24:23:24:25 | compound-rhs increment statement | stmts.go:24:23:24:25 | After increment statement |
3184+
| stmts.go:24:23:24:25 | increment statement | stmts.go:24:23:24:23 | Before i |
31893185
| stmts.go:24:27:36:3 | block statement | stmts.go:25:4:35:4 | if statement |
31903186
| stmts.go:25:4:35:4 | if statement | stmts.go:25:7:25:16 | ... := ... |
31913187
| stmts.go:25:7:25:16 | ... := ... | stmts.go:25:12:25:16 | Before ...-... |

go/ql/test/library-tests/semmle/go/dataflow/FlowSteps/LocalFlowStep.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
| main.go:15:9:15:9 | 0 | main.go:15:2:15:9 | SSA def(acc) |
2121
| main.go:16:9:19:2 | SSA def(acc) | main.go:17:3:17:5 | acc |
2222
| main.go:17:3:17:7 | SSA def(acc) | main.go:18:10:18:12 | acc |
23-
| main.go:17:3:17:7 | incdec-rhs increment statement | main.go:17:3:17:7 | SSA def(acc) |
23+
| main.go:17:3:17:7 | compound-rhs increment statement | main.go:17:3:17:7 | SSA def(acc) |
2424
| main.go:22:42:31:1 | SSA def(b) | main.go:23:5:23:5 | b |
2525
| main.go:22:42:31:1 | SSA def(x) | main.go:24:10:24:10 | x |
2626
| main.go:22:42:31:1 | SSA def(x) | main.go:26:11:26:11 | x |

go/ql/test/library-tests/semmle/go/dataflow/FunctionInputsAndOutputs/FunctionOutput_getEntryNode.expected

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
| result 1 | main.go:35:1:38:1 | function declaration | main.go:35:29:38:1 | zero-init:1 block statement |
1717
| result 1 | main.go:35:1:38:1 | function declaration | main.go:36:9:36:10 | 42 |
1818
| result 1 | main.go:40:1:48:1 | function declaration | main.go:40:33:48:1 | zero-init:1 block statement |
19-
| result 1 | main.go:40:1:48:1 | function declaration | main.go:42:3:42:5 | incdec-rhs increment statement |
19+
| result 1 | main.go:40:1:48:1 | function declaration | main.go:42:3:42:5 | compound-rhs increment statement |
2020
| result 1 | main.go:40:1:48:1 | function declaration | main.go:45:13:45:13 | 1 |
2121
| result 1 | main.go:40:1:48:1 | function declaration | main.go:47:12:47:12 | 4 |
2222
| result 1 | tst2.go:8:1:12:1 | function declaration | tst2.go:11:12:11:14 | err |

go/ql/test/library-tests/semmle/go/dataflow/SSA/VarDefs.expected

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@
1717
| main.go:59:3:59:7 | assign:0 ... = ... | main.go:57:6:57:6 | x | main.go:59:7:59:7 | 2 |
1818
| main.go:63:2:63:7 | assign:0 ... := ... | main.go:63:2:63:2 | y | main.go:63:7:63:7 | 1 |
1919
| main.go:64:6:64:11 | assign:0 ... := ... | main.go:64:6:64:6 | i | main.go:64:11:64:11 | 0 |
20-
| main.go:64:16:64:18 | increment statement | main.go:64:6:64:6 | i | main.go:64:16:64:18 | incdec-rhs increment statement |
20+
| main.go:64:16:64:18 | compound-rhs increment statement | main.go:64:6:64:6 | i | main.go:64:16:64:18 | compound-rhs increment statement |
2121
| main.go:68:3:68:7 | assign:0 ... = ... | main.go:63:2:63:2 | y | main.go:68:7:68:7 | 2 |
2222
| main.go:72:2:72:7 | assign:0 ... := ... | main.go:72:2:72:2 | z | main.go:72:7:72:7 | 1 |
2323
| main.go:73:6:73:11 | assign:0 ... := ... | main.go:73:6:73:6 | i | main.go:73:11:73:11 | 0 |
24-
| main.go:73:16:73:18 | increment statement | main.go:73:6:73:6 | i | main.go:73:16:73:18 | incdec-rhs increment statement |
24+
| main.go:73:16:73:18 | compound-rhs increment statement | main.go:73:6:73:6 | i | main.go:73:16:73:18 | compound-rhs increment statement |
2525
| main.go:74:3:74:7 | assign:0 ... = ... | main.go:72:2:72:2 | z | main.go:74:7:74:7 | 2 |
2626
| main.go:82:36:86:1 | zero-init:0 block statement | main.go:82:18:82:18 | a | main.go:82:36:86:1 | zero-init:0 block statement |
2727
| main.go:82:36:86:1 | zero-init:1 block statement | main.go:82:25:82:25 | b | main.go:82:36:86:1 | zero-init:1 block statement |

0 commit comments

Comments
 (0)