diff --git a/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs b/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs index 50604e2404e..8106cfbf233 100644 --- a/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs +++ b/csharp/extractor/Semmle.Extraction.CSharp.Util/SymbolExtensions.cs @@ -53,11 +53,11 @@ namespace Semmle.Extraction.CSharp.Util }); /// - /// The operatorname for user-defined increment and decrement operators are "op_IncrementAssignment" and + /// The operatorname for user-defined instance increment- and decrement operators are "op_IncrementAssignment" and /// "op_DecrementAssignment" respectively. /// Thus we need to handle this explicitly to avoid postfixing them with an "=". /// - private static bool isIncrementOrDecrement(string operatorName) => operatorName == "++" || operatorName == "--"; + private static bool IsIncrementOrDecrement(string operatorName) => operatorName == "++" || operatorName == "--"; /// /// Convert an operator method name in to a symbolic name. @@ -79,7 +79,7 @@ namespace Semmle.Extraction.CSharp.Util if (match.Success && methodToOperator.TryGetValue($"op_{match.Groups[2]}", out var rawOperatorName)) { var prefix = match.Groups[1].Success ? "checked " : ""; - var postfix = match.Groups[3].Success && !isIncrementOrDecrement(rawOperatorName) ? "=" : ""; + var postfix = match.Groups[3].Success && !IsIncrementOrDecrement(rawOperatorName) ? "=" : ""; operatorName = $"{prefix}{rawOperatorName}{postfix}"; return true; } diff --git a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll index 2ecbbc44a4d..c9b8e61f493 100644 --- a/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll +++ b/csharp/ql/lib/semmle/code/csharp/exprs/Call.qll @@ -576,7 +576,7 @@ class MutatorOperatorCall extends OperatorCall { * * ```csharp * class A { - * public void operator++() { ... } + * public void operator ++() { ... } * * public static void Increment(A a) { * a++;