zyn0217 wrote:
> If we remove MaybeDestroyTemplateIds(); in ParseStatementOrDeclaration, does
> it fix the bug, and does it actually impact performance?
It fixes the bug; however, I'm afraid we would also lose the chance to optimize
the following:
```cpp
void foo() {
auto generic = []<class T>() {}; // 1'
auto generic_2 = []<class U, class V>() {}; // 2'
// ... and many more ...
} // We'd remove `T`, `U` and `V` here rather than at 1' and 2'.
```
https://github.com/llvm/llvm-project/pull/89494
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits