[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:44:13 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: None (PiJoules)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/95037.diff
1 Files Affected:
- (modified) libc/src/stdlib/block.h (+2-2)
``````````diff
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));
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/95037
More information about the libc-commits
mailing list