https://github.com/efriedma-quic commented:
In general, it's hard to avoid recursion: an AST is fundamentally a tree, and the most natural way to walk a tree is recursive, which is why we have issues in the first place. This usually isn't an issue because people don't write deeply nested code, but unfortunately it's easy to get extreme nesting with switch cases. (Also with template instantiation, but that's not relevant in this context.) A more targeted hack specifically targeting CaseStmt would probably be sufficient, but I guess making the whole thing iterative is also fine. https://github.com/llvm/llvm-project/pull/115395 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits