Skip to content

Commit 82cceb0

Browse files
committed
C#: Mark event accessors without bodies as compiler generated
1 parent cdfe239 commit 82cceb0

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

csharp/extractor/Semmle.Extraction.CSharp/Entities/EventAccessor.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,11 @@ public override void Populate(TextWriter trapFile)
5252
trapFile.event_accessor_location(this, l);
5353

5454
Overrides(trapFile);
55+
56+
if (Symbol.FromSource() && Block is null)
57+
{
58+
trapFile.compiler_generated(this);
59+
}
5560
}
5661

5762
public static EventAccessor Create(Context cx, IMethodSymbol symbol, IEventSymbol @event) =>

0 commit comments

Comments
 (0)