Skip to content

Commit ebd193f

Browse files
committed
C#: Adress review comments.
1 parent 0e398fe commit ebd193f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class AssignExpr extends Assignment, @simple_assign_expr {
6060

6161
/**
6262
* An assignment operation. Either an arithmetic assignment operation
63-
* (`AssignArithmeticOperation`), a bitwise assignment operation or
63+
* (`AssignArithmeticOperation`), a bitwise assignment operation
6464
* (`AssignBitwiseOperation`), an event assignment (`AddOrRemoveEventExpr`), or
6565
* a null-coalescing assignment (`AssignCoalesceExpr`).
6666
*/
@@ -81,10 +81,14 @@ class AssignOperation extends Assignment, @assign_op_expr {
8181
}
8282

8383
/**
84-
* An assignment operation that corresponds to an operator call, for example `x += y` corresponds to `x = x + y`.
84+
* A compound assignment operation that implicitly invokes an operator.
85+
* For example, `x += y` assigns the result of `x + y` to `x`.
86+
*
87+
* Either an arithmetic assignment operation (`AssignArithmeticOperation`) or a bitwise
88+
* assignment operation (`AssignBitwiseOperation`).
8589
*/
8690
class AssignCallOperation extends AssignOperation, OperatorCall, @assign_op_call_expr {
87-
override string toString() { result = "... " + this.getOperator() + " ..." }
91+
override string toString() { result = AssignOperation.super.toString() }
8892
}
8993

9094
/**

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ class ConstructorInitializer extends Call, @constructor_init_expr {
478478
}
479479

480480
/**
481-
* A call to a user-defined operator, for example `this + other`
481+
* A call to an operator, for example `this + other`
482482
* on line 7 in
483483
*
484484
* ```csharp

0 commit comments

Comments
 (0)