[clang] [Clang] [C++26] Implement P1306R5 Expansion Statements (PR #165195)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 3 06:43:09 PST 2025
================
@@ -376,6 +376,7 @@ LANGOPT(ConstexprCallDepth, 32, 512, Benign,
"maximum constexpr call depth")
LANGOPT(ConstexprStepLimit, 32, 1048576, Benign,
"maximum constexpr evaluation steps")
+LANGOPT(MaxTemplateForExpansions, 32, 256, Benign, "maximum template for expansions")
LANGOPT(EnableNewConstInterp, 1, 0, Benign,
----------------
Sirraide wrote:
I ran this again, and it turns out I was testing Clang compiled in debug mode. In release mode, we can do ~1 million instantiations in about 5 seconds, so it’s not *as* bad as I thought it was; we should be able to increase the limit for this quite a bit (I’m not entirely sure what a good limit would be; I’m suprised there’s nothing about this in [[implimits]](https://eel.is/c++draft/implimits)), but I do think we should still have one.
https://github.com/llvm/llvm-project/pull/165195
More information about the cfe-commits
mailing list