Fangyi Zhou 461168a3d3
[clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (#136041)
As reported in #135665, C++20 parenthesis initializer list expressions
are not handled correctly and were causing crashes. This commit attempts
to fix the issue by handing parenthesis initializer lists along side
existing initializer lists.

Fixes #135665.
2025-04-20 17:32:42 +02:00

20 lines
336 B
C++

// RUN: %clang_analyze_cc1 -std=c++20 -analyzer-checker=core -verify %s
// expected-no-diagnostics
template<typename... F>
struct overload : public F...
{
using F::operator()...;
};
template<typename... F>
overload(F&&...) -> overload<F...>;
int main()
{
const auto l = overload([](const int* i) {}); // no-crash
return 0;
}