File tree Expand file tree Collapse file tree
ql/lib/semmle/code/csharp/exprs Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -53,11 +53,11 @@ public static string GetName(this ISymbol symbol, bool useMetadataName = false)
5353 } ) ;
5454
5555 /// <summary>
56- /// The operatorname for user-defined increment and decrement operators are "op_IncrementAssignment" and
56+ /// The operatorname for user-defined instance increment- and decrement operators are "op_IncrementAssignment" and
5757 /// "op_DecrementAssignment" respectively.
5858 /// Thus we need to handle this explicitly to avoid postfixing them with an "=".
5959 /// </summary>
60- private static bool isIncrementOrDecrement ( string operatorName ) => operatorName == "++" || operatorName == "--" ;
60+ private static bool IsIncrementOrDecrement ( string operatorName ) => operatorName == "++" || operatorName == "--" ;
6161
6262 /// <summary>
6363 /// Convert an operator method name in to a symbolic name.
@@ -79,7 +79,7 @@ public static bool TryGetOperatorSymbol(this ISymbol symbol, out string operator
7979 if ( match . Success && methodToOperator . TryGetValue ( $ "op_{ match . Groups [ 2 ] } ", out var rawOperatorName ) )
8080 {
8181 var prefix = match . Groups [ 1 ] . Success ? "checked " : "" ;
82- var postfix = match . Groups [ 3 ] . Success && ! isIncrementOrDecrement ( rawOperatorName ) ? "=" : "" ;
82+ var postfix = match . Groups [ 3 ] . Success && ! IsIncrementOrDecrement ( rawOperatorName ) ? "=" : "" ;
8383 operatorName = $ "{ prefix } { rawOperatorName } { postfix } ";
8484 return true ;
8585 }
Original file line number Diff line number Diff line change @@ -576,7 +576,7 @@ class MutatorOperatorCall extends OperatorCall {
576576 *
577577 * ```csharp
578578 * class A {
579- * public void operator++() { ... }
579+ * public void operator ++() { ... }
580580 *
581581 * public static void Increment(A a) {
582582 * a++;
You can’t perform that action at this time.
0 commit comments