[libc-commits] [libc] [libc][stdlib] Move LIBC_INLINE after template and before constexpr (PR #95037)

via libc-commits libc-commits at lists.llvm.org
Mon Jun 10 13:43:43 PDT 2024


https://github.com/PiJoules created https://github.com/llvm/llvm-project/pull/95037

None

>From 0b7857cdf69c07387f1edaf825ce99afbbf52fa3 Mon Sep 17 00:00:00 2001
From: Leonard Chan <leonardchan at google.com>
Date: Mon, 10 Jun 2024 13:41:59 -0700
Subject: [PATCH] [libc][stdlib] Move LIBC_INLINE after template and before
 constexpr

---
 libc/src/stdlib/block.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libc/src/stdlib/block.h b/libc/src/stdlib/block.h
index ce26add082d0a..afb18c1ef738f 100644
--- a/libc/src/stdlib/block.h
+++ b/libc/src/stdlib/block.h
@@ -39,8 +39,8 @@ LIBC_INLINE constexpr size_t align_down(size_t value, size_t alignment) {
 }
 
 /// Returns the value rounded down to the nearest multiple of alignment.
-LIBC_INLINE template <typename T>
-constexpr T *align_down(T *value, size_t alignment) {
+template <typename T>
+LIBC_INLINE constexpr T *align_down(T *value, size_t alignment) {
   return reinterpret_cast<T *>(
       align_down(reinterpret_cast<size_t>(value), alignment));
 }



More information about the libc-commits mailing list