Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add trim analysis warnings for delegate creation #92427

Merged
merged 3 commits into from
Sep 25, 2023

Conversation

sbomer
Copy link
Member

@sbomer sbomer commented Sep 21, 2023

The ILLink analyzer was not producing warnings for annotated methods, lambdas, or local functions accessed for delegate creation.

Some ExpectedWarnings for ILLink/NativeAot were updated to avoid relying on the name of the compiler-generated methods for lambdas or local functions, because the analyzer reports the warnings as:

IL2111: Method 'lambda expression' with parameters... is accessed via reflection.

Fixes #84918

The ILLink analyzer was not producing warnings for annotated methods,
lambdas, or local functions accessed for delegate creation.

Some ExpectedWarnings for ILLink/NativeAot were updated to avoid
relying on the name of the compiler-generated methods for lambdas
or local functions, because the analyzer reports the warnings as:

IL2111: Method 'lambda expression' with parameters... is accessed
via reflection.
@ghost ghost added the linkable-framework Issues associated with delivering a linker friendly framework label Sep 21, 2023
@ghost ghost assigned sbomer Sep 21, 2023
@ghost
Copy link

ghost commented Sep 21, 2023

Tagging subscribers to this area: @dotnet/area-meta
See info in area-owners.md if you want to be subscribed.

Issue Details

The ILLink analyzer was not producing warnings for annotated methods, lambdas, or local functions accessed for delegate creation.

Some ExpectedWarnings for ILLink/NativeAot were updated to avoid relying on the name of the compiler-generated methods for lambdas or local functions, because the analyzer reports the warnings as:

IL2111: Method 'lambda expression' with parameters... is accessed via reflection.

Author: sbomer
Assignees: -
Labels:

area-Meta, linkable-framework

Milestone: -

Copy link
Member

@vitek-karas vitek-karas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than the RUC question - this looks good.

@sbomer
Copy link
Member Author

sbomer commented Sep 25, 2023

@dotnet-policy-service rerun

@sbomer sbomer closed this Sep 25, 2023
@sbomer sbomer reopened this Sep 25, 2023
@sbomer sbomer merged commit 89f6743 into dotnet:main Sep 25, 2023
60 checks passed
@ghost ghost locked as resolved and limited conversation to collaborators Oct 26, 2023
@sbomer sbomer deleted the ldftnDAMWarnings branch November 3, 2023 18:39
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Meta linkable-framework Issues associated with delivering a linker friendly framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ILLink analyzer: Action delegate is not handled correctly in the dataflow
2 participants