[clang] Add diag for ctor initializers + increase limit (PR #239011)
Corentin Jabot via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 5 01:38:56 PST 2026
================
@@ -1855,12 +1846,12 @@ class DeclContext {
LLVM_PREFERRED_TYPE(FunctionDeclBitfields)
uint64_t : NumFunctionDeclBits;
- /// 19 bits to fit in the remaining available space.
- /// Note that this makes CXXConstructorDeclBitfields take
- /// exactly 64 bits and thus the width of NumCtorInitializers
- /// will need to be shrunk if some bit is added to NumDeclContextBitfields,
- /// NumFunctionDeclBitfields or CXXConstructorDeclBitfields.
----------------
cor3ntin wrote:
I think we should retain the comment.
We can use as much bits available for now, however the minutes we need extra bits, we'll sacrifice some of these.
The status quo is plenty (even if it trips someone's code generator), and 500K is just ridiculous.
Note that - if there is an important use case (I sort of don't trust these things to work well as there are limits in so many places) - we could do what we do for `ParamIndices` and offload some information in `ASTContext` for the "big nodes"
https://github.com/llvm/llvm-project/pull/239011
More information about the cfe-commits
mailing list