Skip to content

[Libc] Turn implicit to explicit conversion #130615

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 2 commits into from
Mar 10, 2025

Conversation

jplehr
Copy link
Contributor

@jplehr jplehr commented Mar 10, 2025

This fixes a build issue on the AMDGPU libc bot after #126846 landed that introduced a warning.

This fixes a build issue on the AMDGPU libc bot after llvm#126846
landed that introduced a warning.
@jplehr jplehr requested a review from jhuber6 March 10, 2025 14:32
@llvmbot llvmbot added the libc label Mar 10, 2025
@llvmbot
Copy link
Member

llvmbot commented Mar 10, 2025

@llvm/pr-subscribers-libc

Author: Jan Patrick Lehr (jplehr)

Changes

This fixes a build issue on the AMDGPU libc bot after #126846 landed that introduced a warning.


Full diff: https://github.com/llvm/llvm-project/pull/130615.diff

1 Files Affected:

  • (modified) libc/src/__support/high_precision_decimal.h (+1-1)
diff --git a/libc/src/__support/high_precision_decimal.h b/libc/src/__support/high_precision_decimal.h
index 922dce484aa6b..d5bf179e80f83 100644
--- a/libc/src/__support/high_precision_decimal.h
+++ b/libc/src/__support/high_precision_decimal.h
@@ -401,7 +401,7 @@ class HighPrecisionDecimal {
         this->right_shift(MAX_SHIFT_AMOUNT);
         shift_amount += MAX_SHIFT_AMOUNT;
       }
-      this->right_shift(-shift_amount);
+      this->right_shift(-static_cast<uint32_t>(shift_amount));
     }
   }
 

@jplehr jplehr merged commit ef407df into llvm:main Mar 10, 2025
14 of 15 checks passed
VishMCW pushed a commit to VishMCW/llvm-project that referenced this pull request Mar 18, 2025
This fixes a build issue on the AMDGPU libc bot after
llvm#126846 landed that introduced
a warning.

---------

Co-authored-by: Joseph Huber <huberjn@outlook.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants