cor3ntin wrote:

I think the issue here is that we make the assumption that a full expression 
cannot contain an unexpanded pack
But that does not hold  for lambda.

Maybe instead of removing the assert entirely we could check whether one of the 
enclosing scope is a lambda.

While I think the change would be correct, i also think the assert is useful 
and I'm a bit concerned that removing it entirely will create problems down the 
line.

so i would encouraging researching 

```cpp
assert((!Unexpanded.empty() || enclosedInAnOtherExpression()) && "Unable to 
find unexpanded parameter packs");
```

where `enclosedInAnOtherExpression` would try to check that we are in a lambda  
- maybe `Sema::getEnclosingLambda()` is sufficient - not sure though.


Can we run into similar problems with statement expressions ? (I don't think so 
as they don't have parameter or capture list)

https://github.com/llvm/llvm-project/pull/69224
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to