[clang] [clang][analyzer] Handle CXXParenInitListExpr alongside InitListExpr (PR #136041)

Balazs Benics via cfe-commits cfe-commits at lists.llvm.org
Sun Apr 20 08:31:51 PDT 2025


================
@@ -0,0 +1,19 @@
+// 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) {});
----------------
steakhal wrote:

```suggestion
  const auto l = overload([](const int* i) {}); // no-crash
```

https://github.com/llvm/llvm-project/pull/136041


More information about the cfe-commits mailing list