This repository was archived by the owner on Sep 25, 2026. It is now read-only.
Repository navigation
Produce warnings for annotations on invalid types - #2599
Merged
tlakollo merged 4 commits intoFeb 14, 2022
Merged
Conversation
…yzer Dont produce dataflow warnings for annotations on invalid types Add extension file to ask if a type is interesting for dataflow
Contributor
Author
|
They are two tests failing, one of them at least to me seems like it should be a warning since the property type is object. But linker does dataflow analysis and ends up generating another warning. Second one seems to be related to an intrinsic, it believes is operating over a TypeHandle but we are using Type.GetTypeFromHandle() so its actually operating on a type. Will have to go deeper on those failures |
sbomer
reviewed
Feb 11, 2022
tlakollo
marked this pull request as ready for review
February 11, 2022 23:28
sbomer
reviewed
Feb 12, 2022
| (calledMethod.ReturnType.IsTypeInterestingForDataflow () || | ||
| (calledMethod.AssociatedSymbol is IPropertySymbol property && | ||
| property.Type.IsTypeInterestingForDataflow ()))) { | ||
| methodReturnValue = new MethodReturnValue (calledMethod); |
Member
There was a problem hiding this comment.
I don't think this needs to handle the associated symbol specially, because MethodReturnValue already checks FlowAnnotations.GetMethodReturnValueAnnotation which looks at the associated symbol.
We also should do the same in HandleReturnValue and VisitConversion.
vitek-karas
reviewed
Feb 14, 2022
This was referenced Feb 15, 2022
agocke
pushed a commit
to dotnet/runtime
that referenced
this pull request
Nov 16, 2022
Produce warnings for annotations on invalid types using a symbol analyzer Add code to not produce invalid types warnings on dataflow analysis, and reduce the scope to only interesting types Add extension file to ask if a type is interesting for dataflow Commit migrated from dotnet/linker@09bef6e
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Produce warnings for annotations on invalid types using a symbol analyzer
Don't produce dataflow warnings for annotations on invalid types
Add extension file to ask if a type is interesting for dataflow
Fixes #2598