[libc-commits] [libc] 8735e0c - [libc] Remove superfluous explicitly defaulted constructors (#177471)
via libc-commits
libc-commits at lists.llvm.org
Thu Jan 22 13:49:43 PST 2026
Author: Roland McGrath
Date: 2026-01-22T13:49:39-08:00
New Revision: 8735e0c5145d9392b85edd54ca17481eb468d4bf
URL: https://github.com/llvm/llvm-project/commit/8735e0c5145d9392b85edd54ca17481eb468d4bf
DIFF: https://github.com/llvm/llvm-project/commit/8735e0c5145d9392b85edd54ca17481eb468d4bf.diff
LOG: [libc] Remove superfluous explicitly defaulted constructors (#177471)
Any user-defined constructor, even an `= default` one, is
incompatible with aggregate initialization in C++20.
The default constructor does not need to be declared at all in
these cases. It's implicit.
Added:
Modified:
libc/config/linux/app.h
libc/src/__support/threads/fork_callbacks.cpp
Removed:
################################################################################
diff --git a/libc/config/linux/app.h b/libc/config/linux/app.h
index 11ac6ee51e5a0..ff4070eead0ca 100644
--- a/libc/config/linux/app.h
+++ b/libc/config/linux/app.h
@@ -76,8 +76,6 @@ struct TLSDescriptor {
// Note that, dependending the target architecture ABI, it can be the
// same as |addr| or something else.
uintptr_t tp = 0;
-
- constexpr TLSDescriptor() = default;
};
// Create and initialize the TLS area for the current thread. Should not
diff --git a/libc/src/__support/threads/fork_callbacks.cpp b/libc/src/__support/threads/fork_callbacks.cpp
index b050b1712f4aa..49fb41a975826 100644
--- a/libc/src/__support/threads/fork_callbacks.cpp
+++ b/libc/src/__support/threads/fork_callbacks.cpp
@@ -22,7 +22,6 @@ struct ForkCallbackTriple {
ForkCallback *prepare = nullptr;
ForkCallback *parent = nullptr;
ForkCallback *child = nullptr;
- constexpr ForkCallbackTriple() = default;
};
class AtForkCallbackManager {
More information about the libc-commits
mailing list