Skip to content

Conversation

@sbomer
Copy link
Member

@sbomer sbomer commented Jul 29, 2022

This is like the existing test, but additionally shows a visible
difference in the warning behavior. When the warning is produced for
generic arguments rather than dataflow, it will show up even if we don't
do dataflow for the local function whose callsite was removed.

When branch removal breaks the link between the local function and
its user method, this can result in warning suppressions that don't
take effect.

We could use the desired warning behavior to decide what the fix
needs to do (whether it should do compiler-generated owning method
detection before vs after constant propagation for the method).

This is like the existing test, but additionally shows a visible
difference in the warning behavior.
@sbomer sbomer requested a review from marek-safar as a code owner July 29, 2022 23:18
@sbomer sbomer requested review from vitek-karas and removed request for marek-safar July 29, 2022 23:18
@sbomer
Copy link
Member Author

sbomer commented Jul 29, 2022

Never mind, I thought I had a case that showed different warning behavior but I was doing something wrong locally. Please ignore.

@sbomer sbomer closed this Jul 29, 2022
@sbomer
Copy link
Member Author

sbomer commented Jul 29, 2022

Ah, it's too sensitive to ordering. Putting it in its own test file gives the warning I expected.

@sbomer sbomer reopened this Jul 29, 2022
- Add issue link
@sbomer sbomer merged commit 783014a into dotnet:main Aug 1, 2022
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
This is like the existing test, but additionally shows a visible
difference in the warning behavior. When the warning is produced for
generic arguments rather than dataflow, it will show up even if we don't
do dataflow for the local function whose callsite was removed.

When branch removal breaks the link between the local function and
its user method, this can result in warning suppressions that don't
take effect.

We could use the desired warning behavior to decide what the fix
needs to do (whether it should do compiler-generated owning method
detection before vs after constant propagation for the method).


Commit migrated from dotnet/linker@783014a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants