Skip to content

Add mem_uninitialized lint to FCW lint on uses#100342

Closed
ghost wants to merge 6 commits intomasterfrom
unknown repository
Closed

Add mem_uninitialized lint to FCW lint on uses#100342
ghost wants to merge 6 commits intomasterfrom
unknown repository

Conversation

@ghost
Copy link

@ghost ghost commented Aug 9, 2022

This PR adds a lint that will detect uses of std::mem::uninitialized (using the mem_uninitialized diagnostic item) that are not definitely of "basic" types like int/float/raw pointer, and emit a FCW lint for it.

For generic cases, we can't say it's definitely UB, just that it might be.

Background: #98862 (comment)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.