zyn0217 wrote: We already have stack guards protecting instantiation from stack overflows like this, which makes sense given that recursive instantiation chains are common in metaprogramming world.
However a stack guard also adds overhead to a function call, and with this we have to pay a little more when parsing a template argument and the add-up could be huge when running in a template heavy codebase where the template argument lists are often long rather than deep. Indeed this could be seen as a Parser bug, but I think this is more like a trade-off that we don't want pay much for unusual code patterns that can be written by human. https://github.com/llvm/llvm-project/pull/224393 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
