[clang] [clang] Use a Worklist for some CodeGenFunctions (PR #115395)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Wed Nov 20 17:32:16 PST 2024
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
More information about the cfe-commits
mailing list