Skip to content

[NFC] Address compiler warnings: Fix C4146 compiler warnings in APInt.cpp #7556

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
merged 1 commit into from
Jun 20, 2025

Conversation

alsepkow
Copy link
Contributor

Addresses #7555

All but one are simple updates to use std::numeric_limits.
One case converts to use ~ operator and includes a comment with additional context.

@alsepkow alsepkow changed the title Address compiler warnings: Fix C4146 compiler warnings in APInt.cpp [NFC] Address compiler warnings: Fix C4146 compiler warnings in APInt.cpp Jun 19, 2025
// it evaluates to the same bit pattern as INT64_MIN. Because N is
// unsigned, assigning N = ~I + 1 preserves the exact bit pattern
// and correctly represents the 2's complement value of -I.
N = (~I + 1);
Copy link

Choose a reason for hiding this comment

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

Thanks for the comment

@alsepkow alsepkow merged commit b4baabb into microsoft:main Jun 20, 2025
14 checks passed
@github-project-automation github-project-automation bot moved this from New to Done in HLSL Roadmap Jun 20, 2025
@alsepkow alsepkow deleted the user/alsepkow/EO_4146_ApInt_1 branch June 25, 2025 02:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants