Skip to content

[libc][NFC] Add missing constexpr #82007

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
Feb 16, 2024
Merged

Conversation

gchatelet
Copy link
Contributor

This is a fix forward for the Fuchsia build bot
https://lab.llvm.org/buildbot/#/builders/98/builds/33515

@gchatelet gchatelet requested a review from lntue February 16, 2024 16:24
@llvmbot llvmbot added the libc label Feb 16, 2024
@gchatelet gchatelet requested a review from frobtech February 16, 2024 16:24
@llvmbot
Copy link
Member

llvmbot commented Feb 16, 2024

@llvm/pr-subscribers-libc

Author: Guillaume Chatelet (gchatelet)

Changes

This is a fix forward for the Fuchsia build bot
https://lab.llvm.org/buildbot/#/builders/98/builds/33515


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

1 Files Affected:

  • (modified) libc/src/__support/number_pair.h (+2-2)
diff --git a/libc/src/__support/number_pair.h b/libc/src/__support/number_pair.h
index 934f41806b5f30..ee6667b1299fe8 100644
--- a/libc/src/__support/number_pair.h
+++ b/libc/src/__support/number_pair.h
@@ -21,8 +21,8 @@ template <typename T> struct NumberPair {
 };
 
 template <typename T>
-cpp::enable_if_t<cpp::is_integral_v<T> && cpp::is_unsigned_v<T>, NumberPair<T>>
-split(T a) {
+cpp::enable_if_t<cpp::is_integral_v<T> && cpp::is_unsigned_v<T>,
+                 NumberPair<T>> constexpr split(T a) {
   constexpr size_t HALF_BIT_WIDTH = sizeof(T) * 4;
   constexpr T LOWER_HALF_MASK = (T(1) << HALF_BIT_WIDTH) - T(1);
   NumberPair<T> result;

@gchatelet gchatelet merged commit eb97599 into llvm:main Feb 16, 2024
@gchatelet gchatelet deleted the add_missing_constexpr branch February 16, 2024 16:57
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