Skip to content
This repository was archived by the owner on Sep 25, 2026. It is now read-only.

Avoid analyzing cref for generic parameters - #2732

Merged
tlakollo merged 2 commits into
dotnet:mainfrom
tlakollo:NREInCrefComments
Apr 8, 2022
Merged

tlakollo merged 2 commits into
dotnet:mainfrom
tlakollo:NREInCrefComments

Conversation

@tlakollo

@tlakollo tlakollo commented Apr 7, 2022 •

Copy link
Copy Markdown
Contributor

Add check for cref in generic parameter dataflow to avoid failing with a nullreference exception
Refactor code to reuse the while loop for both INamedType and Method symbols
Add tests

Fixes #2724

…h a nullreference exception

Refactor code to reuse the while loop for both INamedType and Method symbols
Add tests
@tlakollo
tlakollo requested a review from LakshanF April 7, 2022 22:18
@tlakollo
tlakollo requested a review from marek-safar as a code owner April 7, 2022 22:18
@tlakollo tlakollo self-assigned this Apr 7, 2022
@tlakollo
tlakollo requested a review from sbomer as a code owner April 7, 2022 22:18

@LakshanF LakshanF left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wow, didn't know that the analyzer needs to handle cref comments as well!

@tlakollo

tlakollo commented Apr 8, 2022

Copy link
Copy Markdown
Contributor Author

I forgot to add a reference to the issue that Sven found (#2724) added to the description

@tlakollo
tlakollo merged commit 3292e23 into dotnet:main Apr 8, 2022
@tlakollo
tlakollo deleted the NREInCrefComments branch April 8, 2022 17:16
agocke pushed a commit to dotnet/runtime that referenced this pull request Nov 16, 2022
Add check for cref in generic parameter dataflow to avoid failing with a nullreference exception
Refactor code to reuse the while loop for both INamedType and Method symbols
Add tests
Fixes dotnet/linker#2724

Commit migrated from dotnet/linker@3292e23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Analyzer throws NRE when visiting certain cref XML comments

3 participants