Skip to content

Conversation

@lntue
Copy link
Contributor

@lntue lntue commented Oct 16, 2025

Fixes #163677.

@llvmbot
Copy link
Member

llvmbot commented Oct 16, 2025

@llvm/pr-subscribers-libc

Author: None (lntue)

Changes

Fixes #163677.


Patch is 28.03 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/163826.diff

32 Files Affected:

  • (modified) libc/benchmarks/LibcBenchmark.h (+4-5)
  • (modified) libc/benchmarks/LibcMemoryBenchmark.cpp (+3-3)
  • (modified) libc/benchmarks/LibcMemoryBenchmark.h (+3-3)
  • (modified) libc/benchmarks/LibcMemoryBenchmarkMain.cpp (+2-2)
  • (modified) libc/benchmarks/gpu/LibcGpuBenchmark.h (+4-4)
  • (modified) libc/benchmarks/gpu/Random.h (+3-3)
  • (modified) libc/fuzzing/__support/hashtable_fuzz.cpp (+1-1)
  • (modified) libc/shared/rpc.h (+10-10)
  • (modified) libc/src/__support/CPP/expected.h (+2-2)
  • (modified) libc/src/__support/FPUtil/FPBits.h (+3-3)
  • (modified) libc/src/__support/File/file.h (+1-1)
  • (modified) libc/src/__support/OSUtil/linux/vdso.h (+1-1)
  • (modified) libc/src/__support/arg_list.h (+2-2)
  • (modified) libc/src/__support/freetrie.h (+3-4)
  • (modified) libc/src/__support/integer_to_string.h (+1-1)
  • (modified) libc/src/__support/memory_size.h (+1-1)
  • (modified) libc/src/__support/sign.h (+1-2)
  • (modified) libc/src/__support/str_to_num_result.h (+6-6)
  • (modified) libc/src/__support/threads/linux/rwlock.h (+4-4)
  • (modified) libc/src/stdio/generic/puts.cpp (+1-1)
  • (modified) libc/src/stdio/printf_core/float_dec_converter_limited.h (+2-2)
  • (modified) libc/src/stdio/printf_core/writer.h (+7-7)
  • (modified) libc/src/stdio/scanf_core/string_reader.h (+2-2)
  • (modified) libc/src/stdio/scanf_core/vfscanf_internal.h (+1-1)
  • (modified) libc/src/string/memory_utils/utils.h (+1-1)
  • (modified) libc/test/UnitTest/LibcTest.h (+2-2)
  • (modified) libc/test/include/sys/queue_test.cpp (+2-2)
  • (modified) libc/test/src/__support/hash_test.cpp (+4-4)
  • (modified) libc/test/src/string/memory_utils/memory_check_utils.h (+3-3)
  • (modified) libc/utils/MPCWrapper/MPCUtils.cpp (+8-10)
  • (modified) libc/utils/MPCWrapper/MPCUtils.h (+2-2)
  • (modified) libc/utils/MPFRWrapper/MPFRUtils.h (+2-2)
diff --git a/libc/benchmarks/LibcBenchmark.h b/libc/benchmarks/LibcBenchmark.h
index 6b1556721e416..d0d9ce1aed423 100644
--- a/libc/benchmarks/LibcBenchmark.h
+++ b/libc/benchmarks/LibcBenchmark.h
@@ -279,8 +279,8 @@ template <typename T> class CircularArrayRef {
     size_t Offset;
 
   public:
-    explicit const_iterator(llvm::ArrayRef<T> Array, size_t Index = 0)
-        : Array(Array), Index(Index), Offset(Index % Array.size()) {}
+    explicit const_iterator(llvm::ArrayRef<T> Arr, size_t Idx = 0)
+        : Array(Arr), Index(Idx), Offset(Idx % Arr.size()) {}
     const_iterator &operator++() {
       ++Index;
       ++Offset;
@@ -293,9 +293,8 @@ template <typename T> class CircularArrayRef {
     const T &operator*() const { return Array[Offset]; }
   };
 
-  CircularArrayRef(llvm::ArrayRef<T> Array, size_t Size)
-      : Array(Array), Size(Size) {
-    assert(Array.size() > 0);
+  CircularArrayRef(llvm::ArrayRef<T> Arr, size_t S) : Array(Arr), Size(S) {
+    assert(Arr.size() > 0);
   }
 
   const_iterator begin() const { return const_iterator(Array); }
diff --git a/libc/benchmarks/LibcMemoryBenchmark.cpp b/libc/benchmarks/LibcMemoryBenchmark.cpp
index 9307ee45b2853..4182fada442a9 100644
--- a/libc/benchmarks/LibcMemoryBenchmark.cpp
+++ b/libc/benchmarks/LibcMemoryBenchmark.cpp
@@ -49,9 +49,9 @@ OffsetDistribution::OffsetDistribution(size_t BufferSize, size_t MaxSizeValue,
 // Precomputes offset where to insert mismatches between the two buffers.
 MismatchOffsetDistribution::MismatchOffsetDistribution(size_t BufferSize,
                                                        size_t MaxSizeValue,
-                                                       size_t MismatchAt)
-    : MismatchAt(MismatchAt) {
-  if (MismatchAt <= 1)
+                                                       size_t MisAt)
+    : MismatchAt(MisAt) {
+  if (MisAt <= 1)
     return;
   for (size_t i = MaxSizeValue + 1; i < BufferSize; i += MaxSizeValue)
     MismatchIndices.push_back(i);
diff --git a/libc/benchmarks/LibcMemoryBenchmark.h b/libc/benchmarks/LibcMemoryBenchmark.h
index 5ba8b936a0caf..c0720850f4e7f 100644
--- a/libc/benchmarks/LibcMemoryBenchmark.h
+++ b/libc/benchmarks/LibcMemoryBenchmark.h
@@ -110,10 +110,10 @@ class AlignedBuffer {
 public:
   static constexpr size_t Alignment = 512;
 
-  explicit AlignedBuffer(size_t Size)
+  explicit AlignedBuffer(size_t S)
       : Buffer(static_cast<char *>(
-            aligned_alloc(Alignment, alignTo(Size, Alignment)))),
-        Size(Size) {}
+            aligned_alloc(Alignment, alignTo(S, Alignment)))),
+        Size(S) {}
   ~AlignedBuffer() { free(Buffer); }
 
   inline char *operator+(size_t Index) { return Buffer + Index; }
diff --git a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
index 613160d72c17f..acb95b1125a0c 100644
--- a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
+++ b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
@@ -207,8 +207,8 @@ struct MemfunctionBenchmarkSweep final : public MemfunctionBenchmarkBase {
 
 struct MemfunctionBenchmarkDistribution final
     : public MemfunctionBenchmarkBase {
-  MemfunctionBenchmarkDistribution(MemorySizeDistribution Distribution)
-      : Distribution(Distribution), Probabilities(Distribution.Probabilities),
+  MemfunctionBenchmarkDistribution(MemorySizeDistribution Dist)
+      : Distribution(Dist), Probabilities(Distribution.Probabilities),
         SizeSampler(Probabilities.begin(), Probabilities.end()),
         OffsetSampler(MemfunctionBenchmarkBase::BufferSize,
                       Probabilities.size() - 1, MaybeAlign(AlignedAccess)) {}
diff --git a/libc/benchmarks/gpu/LibcGpuBenchmark.h b/libc/benchmarks/gpu/LibcGpuBenchmark.h
index b310d49a60fd1..725b01788b168 100644
--- a/libc/benchmarks/gpu/LibcGpuBenchmark.h
+++ b/libc/benchmarks/gpu/LibcGpuBenchmark.h
@@ -156,10 +156,10 @@ class Benchmark {
     add_benchmark(this);
   }
 
-  Benchmark(uint64_t (*f)(uint32_t), char const *suite_name,
-            char const *test_name, uint32_t num_threads)
-      : target(BenchmarkTarget(f)), suite_name(suite_name),
-        test_name(test_name), num_threads(num_threads) {
+  Benchmark(uint64_t (*f)(uint32_t), char const *suite, char const *test,
+            uint32_t n_threads)
+      : target(BenchmarkTarget(f)), suite_name(suite), test_name(test),
+        num_threads(n_threads) {
     add_benchmark(this);
   }
 
diff --git a/libc/benchmarks/gpu/Random.h b/libc/benchmarks/gpu/Random.h
index f7d272289a6d9..f4cf751b5f69e 100644
--- a/libc/benchmarks/gpu/Random.h
+++ b/libc/benchmarks/gpu/Random.h
@@ -74,10 +74,10 @@ template <typename T> class UniformExponent {
 public:
   explicit UniformExponent(int min_exp = -FPBits::EXP_BIAS,
                            int max_exp = FPBits::EXP_BIAS,
-                           cpp::optional<Sign> forced_sign = cpp::nullopt)
+                           cpp::optional<Sign> sign = cpp::nullopt)
       : min_exp(clamp_exponent(cpp::min(min_exp, max_exp))),
-        max_exp(clamp_exponent(cpp::max(min_exp, max_exp))),
-        forced_sign(forced_sign) {}
+        max_exp(clamp_exponent(cpp::max(min_exp, max_exp))), forced_sign(sign) {
+  }
 
   LIBC_INLINE T operator()(RandomGenerator &rng) const noexcept {
     // Sample unbiased exponent e uniformly in [min_exp, max_exp] without modulo
diff --git a/libc/fuzzing/__support/hashtable_fuzz.cpp b/libc/fuzzing/__support/hashtable_fuzz.cpp
index a7a57624446df..5f4ff1c698421 100644
--- a/libc/fuzzing/__support/hashtable_fuzz.cpp
+++ b/libc/fuzzing/__support/hashtable_fuzz.cpp
@@ -118,7 +118,7 @@ class HashTable {
 public:
   HashTable(uint64_t size, uint64_t seed)
       : table(internal::HashTable::allocate(size, seed)) {}
-  HashTable(internal::HashTable *table) : table(table) {}
+  HashTable(internal::HashTable *t) : table(t) {}
   ~HashTable() { internal::HashTable::deallocate(table); }
   HashTable(HashTable &&other) : table(other.table) { other.table = nullptr; }
   bool is_valid() const { return table != nullptr; }
diff --git a/libc/shared/rpc.h b/libc/shared/rpc.h
index dac2a7949a906..772e7035f989a 100644
--- a/libc/shared/rpc.h
+++ b/libc/shared/rpc.h
@@ -88,15 +88,15 @@ template <bool Invert> struct Process {
   static constexpr uint64_t NUM_BITS_IN_WORD = sizeof(uint32_t) * 8;
   uint32_t lock[MAX_PORT_COUNT / NUM_BITS_IN_WORD] = {0};
 
-  RPC_ATTRS Process(uint32_t port_count, void *buffer)
-      : port_count(port_count), inbox(reinterpret_cast<uint32_t *>(
-                                    advance(buffer, inbox_offset(port_count)))),
+  RPC_ATTRS Process(uint32_t n_ports, void *buffer)
+      : port_count(n_ports), inbox(reinterpret_cast<uint32_t *>(
+                                 advance(buffer, inbox_offset(n_ports)))),
         outbox(reinterpret_cast<uint32_t *>(
-            advance(buffer, outbox_offset(port_count)))),
+            advance(buffer, outbox_offset(n_ports)))),
         header(reinterpret_cast<Header *>(
-            advance(buffer, header_offset(port_count)))),
+            advance(buffer, header_offset(n_ports)))),
         packet(reinterpret_cast<Buffer *>(
-            advance(buffer, buffer_offset(port_count)))) {}
+            advance(buffer, buffer_offset(n_ports)))) {}
 
   /// Allocate a memory buffer sufficient to store the following equivalent
   /// representation in memory.
@@ -292,10 +292,10 @@ RPC_ATTRS static void invoke_rpc(F &&fn, uint32_t lane_size, uint64_t lane_mask,
 /// processes. A port is conceptually an index into the memory provided by the
 /// underlying process that is guarded by a lock bit.
 template <bool T> struct Port {
-  RPC_ATTRS Port(Process<T> &process, uint64_t lane_mask, uint32_t lane_size,
-                 uint32_t index, uint32_t out)
-      : process(process), lane_mask(lane_mask), lane_size(lane_size),
-        index(index), out(out), receive(false), owns_buffer(true) {}
+  RPC_ATTRS Port(Process<T> &proc, uint64_t l_mask, uint32_t l_size,
+                 uint32_t idx, uint32_t o)
+      : process(proc), lane_mask(l_mask), lane_size(l_size), index(idx), out(o),
+        receive(false), owns_buffer(true) {}
   RPC_ATTRS ~Port() = default;
 
 private:
diff --git a/libc/src/__support/CPP/expected.h b/libc/src/__support/CPP/expected.h
index 8a93091f0ebfb..3f9355799a8bc 100644
--- a/libc/src/__support/CPP/expected.h
+++ b/libc/src/__support/CPP/expected.h
@@ -21,7 +21,7 @@ template <class T> class unexpected {
   T value;
 
 public:
-  LIBC_INLINE constexpr explicit unexpected(T value) : value(value) {}
+  LIBC_INLINE constexpr explicit unexpected(T val) : value(val) {}
   LIBC_INLINE constexpr T error() { return value; }
 };
 
@@ -35,7 +35,7 @@ template <class T, class E> class expected {
   bool is_expected;
 
 public:
-  LIBC_INLINE constexpr expected(T exp) : exp(exp), is_expected(true) {}
+  LIBC_INLINE constexpr expected(T e) : exp(e), is_expected(true) {}
   LIBC_INLINE constexpr expected(unexpected<E> unexp)
       : unexp(unexp.error()), is_expected(false) {}
 
diff --git a/libc/src/__support/FPUtil/FPBits.h b/libc/src/__support/FPUtil/FPBits.h
index ce4925bae125a..a64225cdb5f2a 100644
--- a/libc/src/__support/FPUtil/FPBits.h
+++ b/libc/src/__support/FPUtil/FPBits.h
@@ -210,9 +210,9 @@ template <FPType fp_type> struct FPStorage : public FPLayout<fp_type> {
   // different semantics.
   template <typename T> struct TypedInt {
     using value_type = T;
-    LIBC_INLINE constexpr explicit TypedInt(T value) : value(value) {}
-    LIBC_INLINE constexpr TypedInt(const TypedInt &value) = default;
-    LIBC_INLINE constexpr TypedInt &operator=(const TypedInt &value) = default;
+    LIBC_INLINE constexpr explicit TypedInt(T v) : value(v) {}
+    LIBC_INLINE constexpr TypedInt(const TypedInt &v) = default;
+    LIBC_INLINE constexpr TypedInt &operator=(const TypedInt &v) = default;
 
     LIBC_INLINE constexpr explicit operator T() const { return value; }
 
diff --git a/libc/src/__support/File/file.h b/libc/src/__support/File/file.h
index 3652e448c7f5a..0285c5e8ab97a 100644
--- a/libc/src/__support/File/file.h
+++ b/libc/src/__support/File/file.h
@@ -27,7 +27,7 @@ struct FileIOResult {
   int error;
 
   constexpr FileIOResult(size_t val) : value(val), error(0) {}
-  constexpr FileIOResult(size_t val, int error) : value(val), error(error) {}
+  constexpr FileIOResult(size_t val, int err) : value(val), error(err) {}
 
   constexpr bool has_error() { return error != 0; }
 
diff --git a/libc/src/__support/OSUtil/linux/vdso.h b/libc/src/__support/OSUtil/linux/vdso.h
index a5108b3a1fb5d..1824190e781e4 100644
--- a/libc/src/__support/OSUtil/linux/vdso.h
+++ b/libc/src/__support/OSUtil/linux/vdso.h
@@ -34,7 +34,7 @@ class Symbol {
 public:
   LIBC_INLINE_VAR static constexpr size_t COUNT =
       static_cast<size_t>(VDSOSym::VDSOSymCount);
-  LIBC_INLINE constexpr explicit Symbol(VDSOSym sym) : sym(sym) {}
+  LIBC_INLINE constexpr explicit Symbol(VDSOSym s) : sym(s) {}
   LIBC_INLINE constexpr Symbol(size_t idx) : sym(static_cast<VDSOSym>(idx)) {}
   LIBC_INLINE constexpr cpp::string_view name() const {
     return symbol_name(sym);
diff --git a/libc/src/__support/arg_list.h b/libc/src/__support/arg_list.h
index 7b78a9c0fe619..beb84b661ecd3 100644
--- a/libc/src/__support/arg_list.h
+++ b/libc/src/__support/arg_list.h
@@ -102,8 +102,8 @@ template <bool packed> class StructArgList {
   void *end;
 
 public:
-  LIBC_INLINE StructArgList(void *ptr, size_t size)
-      : ptr(ptr), end(reinterpret_cast<unsigned char *>(ptr) + size) {}
+  LIBC_INLINE StructArgList(void *p, size_t size)
+      : ptr(p), end(reinterpret_cast<unsigned char *>(p) + size) {}
   LIBC_INLINE StructArgList(const StructArgList &other) {
     ptr = other.ptr;
     end = other.end;
diff --git a/libc/src/__support/freetrie.h b/libc/src/__support/freetrie.h
index 42363c2c9e2f4..0c5819aacfc98 100644
--- a/libc/src/__support/freetrie.h
+++ b/libc/src/__support/freetrie.h
@@ -62,9 +62,8 @@ class FreeTrie {
     size_t min;
     size_t width;
 
-    LIBC_INLINE constexpr SizeRange(size_t min, size_t width)
-        : min(min), width(width) {
-      LIBC_ASSERT(!(width & (width - 1)) && "width must be a power of two");
+    LIBC_INLINE constexpr SizeRange(size_t m, size_t w) : min(m), width(w) {
+      LIBC_ASSERT(!(w & (w - 1)) && "width must be a power of two");
     }
 
     /// @returns The lower half of the size range.
@@ -83,7 +82,7 @@ class FreeTrie {
   };
 
   LIBC_INLINE constexpr FreeTrie() : FreeTrie(SizeRange{0, 0}) {}
-  LIBC_INLINE constexpr FreeTrie(SizeRange range) : range(range) {}
+  LIBC_INLINE constexpr FreeTrie(SizeRange r) : range(r) {}
 
   /// Sets the range of possible block sizes. This can only be called when the
   /// trie is empty.
diff --git a/libc/src/__support/integer_to_string.h b/libc/src/__support/integer_to_string.h
index 29449bd739730..09c05b4768ccc 100644
--- a/libc/src/__support/integer_to_string.h
+++ b/libc/src/__support/integer_to_string.h
@@ -113,7 +113,7 @@ template <bool forward> class StringBufferWriterImpl {
 
 public:
   StringBufferWriterImpl(const StringBufferWriterImpl &) = delete;
-  StringBufferWriterImpl(cpp::span<char> buffer) : buffer(buffer) {}
+  StringBufferWriterImpl(cpp::span<char> buf) : buffer(buf) {}
 
   LIBC_INLINE size_t size() const { return index; }
   LIBC_INLINE size_t remainder_size() const { return buffer.size() - size(); }
diff --git a/libc/src/__support/memory_size.h b/libc/src/__support/memory_size.h
index 3d40b113bcb68..827952ea3d9cd 100644
--- a/libc/src/__support/memory_size.h
+++ b/libc/src/__support/memory_size.h
@@ -37,7 +37,7 @@ class SafeMemSize {
 private:
   using type = cpp::make_signed_t<size_t>;
   type value;
-  LIBC_INLINE explicit SafeMemSize(type value) : value(value) {}
+  LIBC_INLINE explicit SafeMemSize(type val) : value(val) {}
 
 public:
   LIBC_INLINE_VAR static constexpr size_t MAX_MEM_SIZE =
diff --git a/libc/src/__support/sign.h b/libc/src/__support/sign.h
index e0de0e0798acb..d46208446a506 100644
--- a/libc/src/__support/sign.h
+++ b/libc/src/__support/sign.h
@@ -32,8 +32,7 @@ struct Sign {
   LIBC_INLINE constexpr Sign negate() const { return Sign(!is_negative); }
 
 private:
-  LIBC_INLINE constexpr explicit Sign(bool is_negative)
-      : is_negative(is_negative) {}
+  LIBC_INLINE constexpr explicit Sign(bool is_neg) : is_negative(is_neg) {}
 
   bool is_negative;
 };
diff --git a/libc/src/__support/str_to_num_result.h b/libc/src/__support/str_to_num_result.h
index 48c363c88ff41..7fcbfbac5234f 100644
--- a/libc/src/__support/str_to_num_result.h
+++ b/libc/src/__support/str_to_num_result.h
@@ -32,12 +32,12 @@ template <typename T> struct StrToNumResult {
   int error;
   ptrdiff_t parsed_len;
 
-  LIBC_INLINE constexpr StrToNumResult(T value)
-      : value(value), error(0), parsed_len(0) {}
-  LIBC_INLINE constexpr StrToNumResult(T value, ptrdiff_t parsed_len)
-      : value(value), error(0), parsed_len(parsed_len) {}
-  LIBC_INLINE constexpr StrToNumResult(T value, ptrdiff_t parsed_len, int error)
-      : value(value), error(error), parsed_len(parsed_len) {}
+  LIBC_INLINE constexpr StrToNumResult(T val)
+      : value(val), error(0), parsed_len(0) {}
+  LIBC_INLINE constexpr StrToNumResult(T val, ptrdiff_t parsed_length)
+      : value(val), error(0), parsed_len(parsed_length) {}
+  LIBC_INLINE constexpr StrToNumResult(T val, ptrdiff_t parsed_length, int err)
+      : value(val), error(err), parsed_len(parsed_length) {}
 
   LIBC_INLINE constexpr bool has_error() { return error != 0; }
 
diff --git a/libc/src/__support/threads/linux/rwlock.h b/libc/src/__support/threads/linux/rwlock.h
index f7aeb5b709aa3..f4ef8dc9f3235 100644
--- a/libc/src/__support/threads/linux/rwlock.h
+++ b/libc/src/__support/threads/linux/rwlock.h
@@ -65,9 +65,9 @@ class WaitingQueue final : private RawMutex {
     WaitingQueue &queue;
     bool is_pshared;
 
-    LIBC_INLINE Guard(WaitingQueue &queue, bool is_pshared)
-        : queue(queue), is_pshared(is_pshared) {
-      queue.lock(cpp::nullopt, is_pshared);
+    LIBC_INLINE Guard(WaitingQueue &q, bool pshared)
+        : queue(q), is_pshared(pshared) {
+      queue.lock(cpp::nullopt, pshared);
     }
 
   public:
@@ -154,7 +154,7 @@ class RwState {
 
 public:
   // Construction and conversion functions.
-  LIBC_INLINE constexpr RwState(int state = 0) : state(state) {}
+  LIBC_INLINE constexpr RwState(int s = 0) : state(s) {}
   LIBC_INLINE constexpr operator int() const { return state; }
 
   // Utilities to check the state of the RwLock.
diff --git a/libc/src/stdio/generic/puts.cpp b/libc/src/stdio/generic/puts.cpp
index 4267dd546c4dc..91af659587777 100644
--- a/libc/src/stdio/generic/puts.cpp
+++ b/libc/src/stdio/generic/puts.cpp
@@ -21,7 +21,7 @@ namespace {
 
 // Simple helper to unlock the file once destroyed.
 struct ScopedLock {
-  ScopedLock(LIBC_NAMESPACE::File *stream) : stream(stream) { stream->lock(); }
+  ScopedLock(LIBC_NAMESPACE::File *s) : stream(s) { s->lock(); }
   ~ScopedLock() { stream->unlock(); }
 
 private:
diff --git a/libc/src/stdio/printf_core/float_dec_converter_limited.h b/libc/src/stdio/printf_core/float_dec_converter_limited.h
index 9cdc13573d320..efc14404279f8 100644
--- a/libc/src/stdio/printf_core/float_dec_converter_limited.h
+++ b/libc/src/stdio/printf_core/float_dec_converter_limited.h
@@ -81,9 +81,9 @@ struct DigitsInput {
   // and shifts it up to the top of the UInt128 so that a function consuming
   // this struct afterwards doesn't have to remember which format it came from.
   DigitsInput(int32_t fraction_len, StorageType mantissa_, int exponent_,
-              Sign sign)
+              Sign sign_)
       : mantissa(UInt128(mantissa_) << (127 - fraction_len)),
-        exponent(exponent_), sign(sign) {
+        exponent(exponent_), sign(sign_) {
     if (!(mantissa & (UInt128(1) << 127)) && mantissa != 0) {
       // Normalize a denormalized input.
       int shift = cpp::countl_zero(mantissa);
diff --git a/libc/src/stdio/printf_core/writer.h b/libc/src/stdio/printf_core/writer.h
index 1d4734a51b9b8..b29c065fb9b47 100644
--- a/libc/src/stdio/printf_core/writer.h
+++ b/libc/src/stdio/printf_core/writer.h
@@ -54,18 +54,18 @@ template <WriteMode write_mode> struct WriteBuffer {
   // stream writer with function pointers.
   [[maybe_unused]] WriteMode write_mode_;
 
-  LIBC_INLINE WriteBuffer(char *buff, size_t buff_len, StreamWriter hook,
+  LIBC_INLINE WriteBuffer(char *buf, size_t buf_len, StreamWriter hook,
                           void *target)
-      : buff(buff), init_buff(buff), buff_len(buff_len), stream_writer(hook),
+      : buff(buf), init_buff(buf), buff_len(buf_len), stream_writer(hook),
         output_target(target), write_mode_(WriteMode::FLUSH_TO_STREAM) {}
 
-  LIBC_INLINE WriteBuffer(char *buff, size_t buff_len)
-      : buff(buff), init_buff(buff), buff_len(buff_len), stream_writer(nullptr),
+  LIBC_INLINE WriteBuffer(char *buf, size_t buf_len)
+      : buff(buf), init_buff(buf), buff_len(buf_len), stream_writer(nullptr),
         output_target(nullptr),
         write_mode_(WriteMode::FILL_BUFF_AND_DROP_OVERFLOW) {}
 
-  LIBC_INLINE WriteBuffer(char *buff, size_t buff_len, StreamWriter hook)
-      : buff(buff), init_buff(buff), buff_len(buff_len), stream_writer(hook),
+  LIBC_INLINE WriteBuffer(char *buf, size_t buf_len, StreamWriter hook)
+      : buff(buf), init_buff(buf), buff_len(buf_len), stream_writer(hook),
         output_target(this), write_mode_(WriteMode::RESIZE_AND_FILL_BUFF) {}
 
   LIBC_INLINE int flush_to_stream(cpp::string_view new_str) {
@@ -156,7 +156,7 @@ template <WriteMode write_mode> class Writer final {
   }
 
 public:
-  LIBC_INLINE Writer(WriteBuffer<write_mode> &wb) : wb(wb) {}
+  LIBC_INLINE Writer(WriteBuffer<write_mode> &buf) : wb(buf) {}
 
   // Takes a string, copies it into the buffer if there is space, else passes it
   // to the overflow mechanism to be handled separately.
diff --git a/libc/src/stdio/scanf_core/string_reader.h b/libc/src/stdio/scanf_core/string_reader.h
index 95ca22d956b7d..d1e91ebba9174 100644
--- a/libc/src/stdio/scanf_core/string_reader.h
+++ b/libc/src/stdio/scanf_core/string_reader.h
@@ -24,8 +24,8 @@ class StringReader : public Reader<StringReader> {
   size_t buff_cur = 0;
 
 public:
-  LIBC_INLINE StringReader(const char *buffer, size_t buff_len)
-      : buffer(buffer), buff_len(buff_len) {}
+  LIBC_INLINE StringReader(const char *buf, size_t buf_len)
+      : buffer(buf), buff_len(buf_len) {...
[truncated]

@jhuber6
Copy link
Contributor

jhuber6 commented Oct 16, 2025

See my comment on the issue

@lntue lntue closed this Oct 17, 2025
@lntue lntue deleted the name branch October 17, 2025 15:01
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.

[libc] Was it intended to name constructor parameters identically to members?

3 participants