13steinj wrote:

> lambda can also appear as a part of the default argument, and that would make 
> getTemplateInstantiationArgs provide extra template arguments in undesired 
> contexts. This leads to issue 
> https://github.com/llvm/llvm-project/issues/89853.

FYI in my issue, even if the lambda didn't appear as part of the default 
argument, I was [still able to trigger the 
bug](https://godbolt.org/z/4KrEMTTdd). Noting in case this fix only resolves 
the case of lambdas in default template arguments, and not passed in explicitly.

e.g. 

```cpp
static constexpr auto not_default_now = []<const char c> {
    (void) static_cast<char>(c);
};

template<auto Pred>
using broken = decltype(Pred.template operator()<'\0'>());

broken<not_default_now>* boom;
```


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

Reply via email to