C#: Update the extractor to use the BestOrDefault extension method to choose between multiple locations.

This commit is contained in:
Michael Nebel
2024-06-25 15:50:44 +02:00
parent dd65d960be
commit e15a47d58c
12 changed files with 12 additions and 13 deletions

View File

@@ -13,7 +13,7 @@ namespace Semmle.Extraction
{
Text = msg;
EntityText = symbol.ToString() ?? "";
Location = symbol.Locations.FirstOrDefault();
Location = symbol.Locations.BestOrDefault();
}
public InternalError(SyntaxNode node, string msg)