[llvm-branch-commits] [clang] [Clang] [C++26] Expansion Statements (Part 10: Expansion Limit) (PR #169689)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Jun 1 09:48:03 PDT 2026
Sirraide wrote:
> > Iirc when I was testing this it did 1 million expansions w/o hitting any existing limits; that was w/ an empty expansion statement but that already took a few seconds.
>
> That's fine - the limits are there to avoid overwhelming the compiler, not because something might be slow
I’m more worried about it taking even longer and someone mistakenly thinking that we have a bug in Clang or that the compiler is hanging when the bug would really be in user code in this case; iirc @AaronBallman has said in the past that the `constexpr` steps limit exists for a similar reason, so I thought it’d make sense to implement something similar for this.
(side note: I don’t believe 1 million expansions would ever not be a bug candidly...)
https://github.com/llvm/llvm-project/pull/169689
More information about the llvm-branch-commits
mailing list