flovent wrote:

> The same occurs with assigning to `auto`: https://godbolt.org/z/nofG6cehf
> 
> Will this also be handled by this change?

If you mean directly calling this lambda, analyzer can already analyze 
`operator()` correctly before this patch, because neither `CXXConversionDecl` 
and `__invoke` is used here.

This patch fix the situation like this: https://godbolt.org/z/4YWPP6939
```
void f()
{
    auto f = []() { return 0; };
    int (*ptr)() = f;
    1 / ptr();
}
```
lambda `f` should be called and produce divzero.

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

Reply via email to