mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: Add missing assignment class relations.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
private import codeql.rust.elements.BinaryExpr
|
||||
private import codeql.rust.elements.PrefixExpr
|
||||
private import codeql.rust.elements.Operation
|
||||
private import codeql.rust.elements.AssignmentOperation
|
||||
|
||||
/**
|
||||
* An arithmetic operation, such as `+`, `*=`, or `-`.
|
||||
@@ -17,25 +18,21 @@ final class ArithmeticOperation = ArithmeticOperationImpl;
|
||||
* A binary arithmetic operation, such as `+` or `*`.
|
||||
*/
|
||||
final class BinaryArithmeticOperation extends BinaryExpr, ArithmeticOperationImpl {
|
||||
BinaryArithmeticOperation() {
|
||||
this.getOperatorName() = ["+", "-", "*", "/", "%"]
|
||||
}
|
||||
BinaryArithmeticOperation() { this.getOperatorName() = ["+", "-", "*", "/", "%"] }
|
||||
}
|
||||
|
||||
/**
|
||||
* An arithmetic assignment operation, such as `+=` or `*=`.
|
||||
*/
|
||||
final class AssignArithmeticOperation extends BinaryExpr, ArithmeticOperationImpl {
|
||||
AssignArithmeticOperation() {
|
||||
this.getOperatorName() = ["+=", "-=", "*=", "/=", "%="]
|
||||
}
|
||||
final class AssignArithmeticOperation extends BinaryExpr, ArithmeticOperationImpl,
|
||||
AssignmentOperation
|
||||
{
|
||||
AssignArithmeticOperation() { this.getOperatorName() = ["+=", "-=", "*=", "/=", "%="] }
|
||||
}
|
||||
|
||||
/**
|
||||
* A prefix arithmetic operation, such as `-`.
|
||||
*/
|
||||
final class PrefixArithmeticOperation extends PrefixExpr, ArithmeticOperationImpl {
|
||||
PrefixArithmeticOperation() {
|
||||
this.getOperatorName() = "-"
|
||||
}
|
||||
PrefixArithmeticOperation() { this.getOperatorName() = "-" }
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
private import codeql.rust.elements.BinaryExpr
|
||||
private import codeql.rust.elements.Operation
|
||||
private import codeql.rust.elements.AssignmentOperation
|
||||
|
||||
/**
|
||||
* A bitwise operation, such as `&`, `<<`, or `|=`.
|
||||
@@ -22,6 +23,6 @@ final class BinaryBitwiseOperation extends BinaryExpr, BitwiseOperationImpl {
|
||||
/**
|
||||
* A bitwise assignment operation, such as `|=` or `<<=`.
|
||||
*/
|
||||
final class AssignBitwiseOperation extends BinaryExpr, BitwiseOperationImpl {
|
||||
final class AssignBitwiseOperation extends BinaryExpr, BitwiseOperationImpl, AssignmentOperation {
|
||||
AssignBitwiseOperation() { this.getOperatorName() = ["&=", "|=", "^=", "<<=", ">>="] }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user