Warning origins for warnings originating from event accessors are very confusing #100499
Labels
area-Tools-ILLink
.NET linker development as well as trimming analyzers
Milestone
Currently
MarkEvent
will directly callMarkMethod(add_event)
andMarkMethod(remove_Event)
with the origin set to the event itself. So for example: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 callMarkEvent(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).
The text was updated successfully, but these errors were encountered: