mirror of
https://github.com/github/codeql.git
synced 2025-12-22 11:46:32 +01:00
C#: Update the extractor to use the BestOrDefault extension method to choose between multiple locations.
This commit is contained in:
@@ -82,12 +82,12 @@ namespace Semmle.Extraction.CSharp.Entities
|
||||
/// The location which is stored in the database and is used when highlighting source code.
|
||||
/// It's generally short, e.g. a method name.
|
||||
/// </summary>
|
||||
public override Microsoft.CodeAnalysis.Location? ReportingLocation => Symbol.Locations.FirstOrDefault();
|
||||
public override Microsoft.CodeAnalysis.Location? ReportingLocation => Symbol.Locations.BestOrDefault();
|
||||
|
||||
/// <summary>
|
||||
/// The full text span of the entity, e.g. for binding comments.
|
||||
/// </summary>
|
||||
public virtual Microsoft.CodeAnalysis.Location? FullLocation => Symbol.Locations.FirstOrDefault();
|
||||
public virtual Microsoft.CodeAnalysis.Location? FullLocation => Symbol.Locations.BestOrDefault();
|
||||
|
||||
public virtual IEnumerable<Extraction.Entities.Location> Locations
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user