Skip to content

Commit 148dc6d

Browse files
committed
C#: Rename shift operator classes.
1 parent f48eda8 commit 148dc6d

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

csharp/ql/lib/semmle/code/csharp/Callable.qll

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -636,8 +636,8 @@ class TrueOperator extends UnaryOperator {
636636
* (`SubOperator`), a multiplication operator (`MulOperator`), a division
637637
* operator (`DivOperator`), a remainder operator (`RemOperator`), an and
638638
* operator (`AndOperator`), an or operator (`OrOperator`), an xor
639-
* operator (`XorOperator`), a left shift operator (`LShiftOperator`),
640-
* a right shift operator (`RShiftOperator`), an equals operator (`EQOperator`),
639+
* operator (`XorOperator`), a left shift operator (`LeftShiftOperator`),
640+
* a right shift operator (`RightShiftOperator`), an equals operator (`EQOperator`),
641641
* a not equals operator (`NEOperator`), a lesser than operator (`LTOperator`),
642642
* a greater than operator (`GTOperator`), a less than or equals operator
643643
* (`LEOperator`), or a greater than or equals operator (`GEOperator`).
@@ -791,14 +791,17 @@ class XorOperator extends BinaryOperator {
791791
* }
792792
* ```
793793
*/
794-
class LShiftOperator extends BinaryOperator {
795-
LShiftOperator() { this.getName() = "<<" }
794+
class LeftShiftOperator extends BinaryOperator {
795+
LeftShiftOperator() { this.getName() = "<<" }
796796

797797
override string getFunctionName() { result = "op_LeftShift" }
798798

799-
override string getAPrimaryQlClass() { result = "LShiftOperator" }
799+
override string getAPrimaryQlClass() { result = "LeftShiftOperator" }
800800
}
801801

802+
/** DEPRECATED: Alias for LeftShiftOperator. */
803+
deprecated class LShiftOperator = LeftShiftOperator;
804+
802805
/**
803806
* A user-defined right shift operator (`>>`), for example
804807
*
@@ -808,14 +811,17 @@ class LShiftOperator extends BinaryOperator {
808811
* }
809812
* ```
810813
*/
811-
class RShiftOperator extends BinaryOperator {
812-
RShiftOperator() { this.getName() = ">>" }
814+
class RightShiftOperator extends BinaryOperator {
815+
RightShiftOperator() { this.getName() = ">>" }
813816

814817
override string getFunctionName() { result = "op_RightShift" }
815818

816-
override string getAPrimaryQlClass() { result = "RShiftOperator" }
819+
override string getAPrimaryQlClass() { result = "RightShiftOperator" }
817820
}
818821

822+
/** DEPRECATED: Alias for RightShiftOperator. */
823+
deprecated class RShiftOperator = RightShiftOperator;
824+
819825
/**
820826
* A user-defined equals operator (`==`), for example
821827
*

0 commit comments

Comments
 (0)