mirror of
https://github.com/github/codeql.git
synced 2026-05-05 13:45:19 +02:00
C#: Add unsigned right shift operator class.
This commit is contained in:
@@ -637,7 +637,8 @@ class TrueOperator extends UnaryOperator {
|
||||
* operator (`DivOperator`), a remainder operator (`RemOperator`), an and
|
||||
* operator (`AndOperator`), an or operator (`OrOperator`), an xor
|
||||
* operator (`XorOperator`), a left shift operator (`LeftShiftOperator`),
|
||||
* a right shift operator (`RightShiftOperator`), an equals operator (`EQOperator`),
|
||||
* a right shift operator (`RightShiftOperator`), an unsigned right shift
|
||||
* operator(`UnsignedRightShiftOperator`), an equals operator (`EQOperator`),
|
||||
* a not equals operator (`NEOperator`), a lesser than operator (`LTOperator`),
|
||||
* a greater than operator (`GTOperator`), a less than or equals operator
|
||||
* (`LEOperator`), or a greater than or equals operator (`GEOperator`).
|
||||
@@ -822,6 +823,23 @@ class RightShiftOperator extends BinaryOperator {
|
||||
/** DEPRECATED: Alias for RightShiftOperator. */
|
||||
deprecated class RShiftOperator = RightShiftOperator;
|
||||
|
||||
/**
|
||||
* A user-defined unsigned right shift operator (`>>>`), for example
|
||||
*
|
||||
* ```csharp
|
||||
* public static Widget operator >>>(Widget lhs, Widget rhs) {
|
||||
* ...
|
||||
* }
|
||||
* ```
|
||||
*/
|
||||
class UnsignedRightShiftOperator extends BinaryOperator {
|
||||
UnsignedRightShiftOperator() { this.getName() = ">>>" }
|
||||
|
||||
override string getFunctionName() { result = "op_UnsignedRightShift" }
|
||||
|
||||
override string getAPrimaryQlClass() { result = "UnsignedRightShiftOperator" }
|
||||
}
|
||||
|
||||
/**
|
||||
* A user-defined equals operator (`==`), for example
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user