[clang] Fix crash and improve diagnostics for void lambda returns (PR #188904)

via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 2 06:50:56 PDT 2026


================
@@ -18,7 +18,7 @@ void infer_void_return_type(int i) {
     switch (x) {
     case 0: return get<void>();
     case 1: return;
-    case 2: return { 1, 2.0 }; //expected-error{{cannot deduce}}
+    case 2: return { 1, 2.0 }; // expected-error {{cannot deduce lambda return type from initializer list}}
----------------
Sirraide wrote:

This file should just be reverted now that we don’t need to update it anymore

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


More information about the cfe-commits mailing list