[all-commits] [llvm/llvm-project] 87104e: [Clang] [Sema] Diagnose returning an initializer l...

Kartik Ohlan via All-commits all-commits at lists.llvm.org
Thu Apr 2 07:56:17 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 87104ee51450e5c6417b80cfd9a0771c9a690a1c
      https://github.com/llvm/llvm-project/commit/87104ee51450e5c6417b80cfd9a0771c9a690a1c
  Author: Kartik Ohlan <kartik7ohlan at gmail.com>
  Date:   2026-04-02 (Thu, 02 Apr 2026)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaStmt.cpp
    A clang/test/SemaCXX/void-lambda-return-init.cpp

  Log Message:
  -----------
  [Clang] [Sema] Diagnose returning an initializer list from a lambda with a return type of void (#188904)

We previously didn’t diagnose attempts to return an initializer list from
a lambda with an explicit return type of `void`. This patch fixes that. It also 
cleans up the error message so it actually says "lambda" instead of "block".

Fixes #188661

Signed off by: Kartik



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list