Skip to content

Commit 8479063

Browse files
committed
C#: Move bitwise operation classes from Operation.qll to BitwiseOperation.qll.
1 parent 56feef8 commit 8479063

2 files changed

Lines changed: 30 additions & 30 deletions

File tree

csharp/ql/lib/semmle/code/csharp/exprs/BitwiseOperation.qll

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,36 @@ class BinaryBitwiseOperation extends BitwiseOperation, BinaryOperation, @bin_bit
3535
override string getOperator() { none() }
3636
}
3737

38+
/**
39+
* A bitwise-and operation, either `x & y` or `x &= y`.
40+
*/
41+
class BitwiseAndOperation extends BinaryBitwiseOperation, @and_operation { }
42+
43+
/**
44+
* A bitwise-or operation, either `x | y` or `x |= y`.
45+
*/
46+
class BitwiseOrOperation extends BinaryBitwiseOperation, @or_operation { }
47+
48+
/**
49+
* A bitwise exclusive-or operation, either `x ^ y` or `x ^= y`.
50+
*/
51+
class BitwiseXorOperation extends BinaryBitwiseOperation, @xor_operation { }
52+
53+
/**
54+
* A left-shift operation, either `x << y` or `x <<= y`.
55+
*/
56+
class LeftShiftOperation extends BinaryBitwiseOperation, @lshift_operation { }
57+
58+
/**
59+
* A right-shift operation, either `x >> y` or `x >>= y`.
60+
*/
61+
class RightShiftOperation extends BinaryBitwiseOperation, @rshift_operation { }
62+
63+
/**
64+
* An unsigned right-shift operation, either `x >>> y` or `x >>>= y`.
65+
*/
66+
class UnsignedRightShiftOperation extends BinaryBitwiseOperation, @urshift_operation { }
67+
3868
/**
3969
* A binary bitwise expression. Either a bitwise-and expression
4070
* (`BitwiseAndExpr`), a bitwise-or expression (`BitwiseOrExpr`),

csharp/ql/lib/semmle/code/csharp/exprs/Operation.qll

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,36 +4,6 @@
44

55
import Expr
66

7-
/**
8-
* A bitwise-and operation, either `x & y` or `x &= y`.
9-
*/
10-
class BitwiseAndOperation extends BinaryBitwiseOperation, @and_operation { }
11-
12-
/**
13-
* A bitwise-or operation, either `x | y` or `x |= y`.
14-
*/
15-
class BitwiseOrOperation extends BinaryBitwiseOperation, @or_operation { }
16-
17-
/**
18-
* A bitwise exclusive-or operation, either `x ^ y` or `x ^= y`.
19-
*/
20-
class BitwiseXorOperation extends BinaryBitwiseOperation, @xor_operation { }
21-
22-
/**
23-
* A left-shift operation, either `x << y` or `x <<= y`.
24-
*/
25-
class LeftShiftOperation extends BinaryBitwiseOperation, @lshift_operation { }
26-
27-
/**
28-
* A right-shift operation, either `x >> y` or `x >>= y`.
29-
*/
30-
class RightShiftOperation extends BinaryBitwiseOperation, @rshift_operation { }
31-
32-
/**
33-
* An unsigned right-shift operation, either `x >>> y` or `x >>>= y`.
34-
*/
35-
class UnsignedRightShiftOperation extends BinaryBitwiseOperation, @urshift_operation { }
36-
377
/**
388
* A null-coalescing operation, either `x ?? y` or `x ??= y`.
399
*/

0 commit comments

Comments
 (0)