mirror-llvm-project/libc
Simon Tatham bd9e922d44
[libc][AArch64] Avoid -Wshadow warnings about uint128_t etc (#212227)
`aarch64/inline_memset.h` defines type aliases `uint128_t`, `uint256_t`
and `uint512_t` at file scope. `aarch64/inline_memmove.h`, alongside it,
defines the same aliases at function scope. If both headers are included
by the same source file, this can lead to a warning about the
function-scope aliases shadowing the file-scope ones, which turns into a
compile error if you build with `clang -Werror -Wshadow`.

Commit a81db64570 (PR #210895) exposed this latent compile failure,
by making `CPP/string.h` include both files. But there's nothing wrong
with that, so the right fix is to make it _safe_ to include both files,
not to stop doing it.

This commit moves the function-scope aliases in memmove up to file
scope. That makes them duplicate definitions in the _same_ scope, which
doesn't cause the same error.

Other options would be to move the memset aliases down into function
scope (duplicating them in two functions), or to move them into a tiny
AArch64-specific header file with an include guard. Both of those are
more intrusive than this fix.
2026-07-27 14:31:31 +01:00
..
benchmarks [libc][benchmark] allow benchmark to be built without llvm support (#200951) 2026-06-25 19:16:08 +00:00
cmake [libc][termios] Make termios hermetic and fix its compatibility with glibc 2.42 or after. (#211039) 2026-07-24 13:31:41 -04:00
config [libc] Add missing sys/types.h integer and BSD/System V type definitions (#211861) 2026-07-24 21:49:38 +01:00
docs [libc][math] Implement half precision lgamma function (#192834) 2026-07-19 04:29:50 +03:00
examples [libc] Fix broken links in libc (#145199) 2025-06-23 15:51:43 -07:00
fuzzing [libc] Migrate printf_core from stdio/ to __support/. (#208303) 2026-07-21 14:35:24 -07:00
hdr [libc][termios] Make termios hermetic and fix its compatibility with glibc 2.42 or after. (#211039) 2026-07-24 13:31:41 -04:00
include [libc] Add symbolic constants for si_code values. (#211945) 2026-07-24 16:57:00 -07:00
lib [libc] Generate a stub for libpthread.a (#200908) 2026-06-15 23:35:20 -07:00
shared [libc][math] Implement half precision lgamma function (#192834) 2026-07-19 04:29:50 +03:00
src [libc][AArch64] Avoid -Wshadow warnings about uint128_t etc (#212227) 2026-07-27 14:31:31 +01:00
startup [libc][NFC] Port raw syscall users to existing syscall_wrappers (#208039) 2026-07-17 14:23:39 -03:00
test [libc][test][NFC] Fix compiler warnings in libc tests (#212100) 2026-07-26 22:03:05 +01:00
utils [libc][math] Implement half precision lgamma function (#192834) 2026-07-19 04:29:50 +03:00
.clang-tidy
.gitignore [libc][wctype] Create generation script for classification lookup tables (#172042) 2026-01-06 12:13:28 +01:00
CMakeLists.txt [libc][termios] Make termios hermetic and fix its compatibility with glibc 2.42 or after. (#211039) 2026-07-24 13:31:41 -04:00
LICENSE.TXT
Maintainers.md [libc][freebsd] initialize freebsd support (#124459) 2026-05-19 13:04:34 -07:00
README.txt

LLVM libc
=========

This directory and its subdirectories contain source code for llvm-libc,
a retargetable implementation of the C standard library.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.