-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[libc] Add -Wno-sign-conversion
& re-attempt -Wconversion
#129811
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
Merged
lntue
merged 14 commits into
llvm:main
from
vinay-deshmukh:vinay-issue-119281-sign-conversion
Mar 10, 2025
Merged
Changes from 7 commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
9e64e2a
WIP: sign-conversion
vinay-deshmukh 47c95c9
clang-format
vinay-deshmukh 958813a
better cast
vinay-deshmukh 25aaf92
Reapply "[libc] Enable -Wconversion for tests. (#127523)"
vinay-deshmukh 7a71ad5
correct cast
vinay-deshmukh 3a9667c
Fix adjust to be ptrdiff_t
vinay-deshmukh e01f8a9
fix cmake
vinay-deshmukh 624b01e
clang-format
vinay-deshmukh 59d3810
wrong header
vinay-deshmukh e9ab7b4
Merge remote-tracking branch 'upstream/main' into vinay-issue-119281-…
vinay-deshmukh d44ca0a
use unsigned over size_t for 32 bit indexing
vinay-deshmukh 02ba577
Werror to force out size conversion issues
vinay-deshmukh 54271d5
Remove Werror
vinay-deshmukh 2a05303
no-sign-conversion
vinay-deshmukh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because
-Wno-sign-conversion
is effectively "silencing" itThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried this PR and there are still many warnings from
-Wsign-conversion
:Some example:
Probably you should change to
-Wno-sign-conversion
in this PR, add a TODO comment to clean it up, and then fix the remaining-Wsign-conversion
in a followup PR.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to reproduce these in the PR checks?
I don't have a x86 64 machine at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can see them in the logs of some of the premerge bots, such as:
https://buildkite.com/llvm-project/github-pull-requests/builds/154789#0195738e-55d8-4974-b5b7-1c857402d13d
https://github.com/llvm/llvm-project/actions/runs/13732988495/job/38413066727?pr=129811
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made it
-Wno-sign-conversion