mirror of
https://github.com/github/codeql.git
synced 2026-06-19 11:51:08 +02:00
C#: Address other CoPilot review comments.
This commit is contained in:
@@ -103,9 +103,10 @@ namespace Semmle.Extraction.CSharp.Entities.Expressions
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the given method is a slice method, which is defined as a method with
|
||||
/// the name "Slice" or "SubString" and two parameters.
|
||||
/// </summary> <param name="method">The method symbol to check.</param>
|
||||
/// <returns>True if the method is a slice method, false otherwise.</returns>
|
||||
/// the name "Slice" or "Substring" and two parameters.
|
||||
/// </summary>
|
||||
/// <param name="method">The method symbol to check.</param>
|
||||
/// <returns>True if the method is a slice method; false otherwise.</returns>
|
||||
private bool IsSliceWithRange(IMethodSymbol method, [NotNullWhen(true)] out IPropertySymbol? lengthPropertySymbol, [NotNullWhen(true)] out RangeExpressionSyntax? range)
|
||||
{
|
||||
range = null;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
---
|
||||
category: minorAnalysis
|
||||
---
|
||||
* Improved extraction of span range-access expressions (for example, `a[0..3]`). These expressions are now extracted as span `Slice` calls.
|
||||
* Improved extraction of range-access expressions on spans and strings (for example, `a[0..3]`). These expressions are now extracted as `Slice` (span) or `Substring` (string) calls.
|
||||
|
||||
Reference in New Issue
Block a user