55private import codeql.rust.elements.BinaryExpr
66private import codeql.rust.elements.PrefixExpr
77private import codeql.rust.elements.Operation
8+ private import codeql.rust.elements.AssignmentOperation
89
910/**
1011 * An arithmetic operation, such as `+`, `*=`, or `-`.
@@ -17,25 +18,21 @@ final class ArithmeticOperation = ArithmeticOperationImpl;
1718 * A binary arithmetic operation, such as `+` or `*`.
1819 */
1920final class BinaryArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl {
20- BinaryArithmeticOperation ( ) {
21- this .getOperatorName ( ) = [ "+" , "-" , "*" , "/" , "%" ]
22- }
21+ BinaryArithmeticOperation ( ) { this .getOperatorName ( ) = [ "+" , "-" , "*" , "/" , "%" ] }
2322}
2423
2524/**
2625 * An arithmetic assignment operation, such as `+=` or `*=`.
2726 */
28- final class AssignArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl {
29- AssignArithmeticOperation ( ) {
30- this . getOperatorName ( ) = [ "+=" , "-=" , "*=" , "/=" , "%=" ]
31- }
27+ final class AssignArithmeticOperation extends BinaryExpr , ArithmeticOperationImpl ,
28+ AssignmentOperation
29+ {
30+ AssignArithmeticOperation ( ) { this . getOperatorName ( ) = [ "+=" , "-=" , "*=" , "/=" , "%=" ] }
3231}
3332
3433/**
3534 * A prefix arithmetic operation, such as `-`.
3635 */
3736final class PrefixArithmeticOperation extends PrefixExpr , ArithmeticOperationImpl {
38- PrefixArithmeticOperation ( ) {
39- this .getOperatorName ( ) = "-"
40- }
37+ PrefixArithmeticOperation ( ) { this .getOperatorName ( ) = "-" }
4138}
0 commit comments