C#: Extract field modifiers and tag the field as being compiler generated.

This commit is contained in:
Michael Nebel
2026-02-13 12:41:51 +01:00
parent d93f4850df
commit c3a1eb181e

View File

@@ -28,6 +28,9 @@ namespace Semmle.Extraction.CSharp.Entities
var unboundFieldKey = PropertyField.Create(Context, Symbol.OriginalDefinition);
var name = Symbol.AssociatedSymbol is not null ? $"{Symbol.AssociatedSymbol.GetName()}.field" : Symbol.Name;
trapFile.fields(this, VariableKind.None, name, ContainingType!, Type.TypeRef, unboundFieldKey);
trapFile.compiler_generated(this);
PopulateModifiers(trapFile);
if (Context.OnlyScaffold)
{