-
Notifications
You must be signed in to change notification settings - Fork 5.4k
Closed
Closed
Copy link
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Milestone
Description
Currently MarkEvent will directly call MarkMethod(add_event) and MarkMethod(remove_Event) with the origin set to the event itself. So for example:
// IL2026 - about the add_event
public event EventHandler TestEvent {
[RequiresUnreferencedCode()]
add {}
}The warning is reported on the event itself and not on the callsite actually accessing the event. It's also reported repeatedly (if there are multiple callsites).
This gets potentially even worse because ProcessEvent(add_event) will call MarkEvent(event) and so that will potentially trigger the warning multiple times on its own.
RUC on type makes this even worse since both accessors are automatically RUC and this loops on itself (I think I saw the warning triplicated and on the wrong place).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area-Tools-ILLink.NET linker development as well as trimming analyzers.NET linker development as well as trimming analyzers
Type
Projects
Status
No status