HighCommander4 wrote:

> I assume we should just add a max depth (as I have seen in other places) to 
> this recursion, I have seen 10 before as a limit to body traversal

A max depth doesn't hurt, but I wonder if we should also keep track of a set of 
function instantiations we've visited during the current top-level use of 
`ForwardingToConstructorVisitor`. In the test case from the previous comment, 
it's a waste to be visiting the body of the same function instantiation even 
`$MAX_DEPTH` times; we shouldn't be visiting it more than once.

https://github.com/llvm/llvm-project/pull/169742
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to