File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
src/checkers/inference/model Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -33,29 +33,46 @@ private ArithmeticOperationKind(String opSymbol) {
33
33
this .opSymbol = opSymbol ;
34
34
}
35
35
36
+ /**
37
+ * Get the {@link ArithmeticOperationKind} corresponding to a {@link Tree.Kind}. For a compound
38
+ * assignment tree, get the {@link ArithmeticOperationKind} for the arithmetic operation of the RHS.
39
+ * @param kind a {@link Tree.Kind} for an arithmetic operation
40
+ * @return the corresponding {@link ArithmeticOperationKind} for the given arithmetic operation
41
+ */
36
42
public static ArithmeticOperationKind fromTreeKind (Kind kind ) {
37
43
switch (kind ) {
38
44
case PLUS :
45
+ case PLUS_ASSIGNMENT :
39
46
return PLUS ;
40
47
case MINUS :
48
+ case MINUS_ASSIGNMENT :
41
49
return MINUS ;
42
50
case MULTIPLY :
51
+ case MULTIPLY_ASSIGNMENT :
43
52
return MULTIPLY ;
44
53
case DIVIDE :
54
+ case DIVIDE_ASSIGNMENT :
45
55
return DIVIDE ;
46
56
case REMAINDER :
57
+ case REMAINDER_ASSIGNMENT :
47
58
return REMAINDER ;
48
59
case LEFT_SHIFT :
60
+ case LEFT_SHIFT_ASSIGNMENT :
49
61
return LEFT_SHIFT ;
50
62
case RIGHT_SHIFT :
63
+ case RIGHT_SHIFT_ASSIGNMENT :
51
64
return RIGHT_SHIFT ;
52
65
case UNSIGNED_RIGHT_SHIFT :
66
+ case UNSIGNED_RIGHT_SHIFT_ASSIGNMENT :
53
67
return UNSIGNED_RIGHT_SHIFT ;
54
68
case AND :
69
+ case AND_ASSIGNMENT :
55
70
return AND ;
56
71
case OR :
72
+ case OR_ASSIGNMENT :
57
73
return OR ;
58
74
case XOR :
75
+ case XOR_ASSIGNMENT :
59
76
return XOR ;
60
77
default :
61
78
throw new BugInCF ("There are no defined ArithmeticOperationKinds "
You can’t perform that action at this time.
0 commit comments