clang/test/Analysis/PR135665.cpp
raw| 1 | // RUN: %clang_analyze_cc1 -std=c++20 -analyzer-checker=core -verify %s |
| 2 | |
| 3 | // expected-no-diagnostics |
| 4 | |
| 5 | template<typename... F> |
| 6 | struct overload : public F... |
| 7 | { |
| 8 | using F::operator()...; |
| 9 | }; |
| 10 | |
| 11 | template<typename... F> |
| 12 | overload(F&&...) -> overload<F...>; |
| 13 | |
| 14 | int main() |
| 15 | { |
| 16 | const auto l = overload([](const int* i) {}); // no-crash |
| 17 | |
| 18 | return 0; |
| 19 | } |