C#: Only extract the unbound location for fields and parameters and use this location in the QL code.

This commit is contained in:
Michael Nebel
2025-10-09 11:44:57 +02:00
parent f200c3ce85
commit 051b83f036
3 changed files with 9 additions and 5 deletions

View File

@@ -49,7 +49,10 @@ namespace Semmle.Extraction.CSharp.Entities
}
}
WriteLocationsToTrap(trapFile.field_location, this, Locations);
if (Context.ExtractLocation(Symbol))
{
WriteLocationsToTrap(trapFile.field_location, this, Locations);
}
if (!IsSourceDeclaration || !Symbol.FromSource())
return;