mirror of
https://github.com/github/codeql.git
synced 2026-05-14 11:19:27 +02:00
C#: Update condition for UnaryOperators to also handle user-defined instance increment and decrement operators.
This commit is contained in:
@@ -613,6 +613,9 @@ class UnaryOperator extends Operator {
|
||||
this.getNumberOfParameters() = 1 and
|
||||
not this instanceof ConversionOperator and
|
||||
not this instanceof CompoundAssignmentOperator
|
||||
or
|
||||
// Instance increment and decrement operators don't have a parameter (only a qualifier).
|
||||
this.getNumberOfParameters() = 0 and not this.isStatic()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user