forked from dotnet/linker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement data flow annotations on generic parameters (dotnet#1245)
* Implement data flow annotations on generic parameters The checks are done when linker calls MarkType(TypeReference) or MarkMethod(MethodReference). The check itself is straightforward as it uses existing functionality. Added annotations in FlowAnnotations for generic parameters. Added one parameter to MarkType to better track the location where the type reference comes from. This enables much more precise reporting of warnings. On test side this makes the recognized/unrecognized attributes applicable to many more things as warnings can come from types, fields and so on. * Recognize MakeGenericType/Method and warn on them Data flow on generic parameters makes any generic instantiation potentially problematic. So we need to start marking MakeGenericType and MakeGenericMethod as problematic as well. MakeGenericType is possible to only warn when there are generic parameters with annotations. For MakeGenericMethod we can't do anything special as we don't track MethodInfo instances.
- Loading branch information
1 parent
fd182b0
commit c75e881
Showing
10 changed files
with
1,439 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.