zyn0217 wrote: I think somehow we still need an extra bit in `Stmt` to carry over the unexpanded info because a body could contain other statements e.g. `DeclStmt` other than full expressions that could propagate up the unexpanded flag through calls to `ContainsUnexpandedParameterPack()`. For example, in one of my test cases:
```cpp template <class T> struct identity { using type = T; }; template <class = void> void f() { []<class... Is>(Is...) { ([] { using T = identity<Is>::type; }(), ...); }(1, 2); } template void f(); // #instantiate-f ``` This patch resolves it by visiting the body twice (of course, it's suboptimal), however patch #99882 still crashes because that relies on the mechanism above, I believe. https://github.com/llvm/llvm-project/pull/86265 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits