[all-commits] [llvm/llvm-project] 6d00c4: [Clang] Do not skip over `RequiresExprBodyDecl` wh...

Corentin Jabot via All-commits all-commits at lists.llvm.org
Wed Jul 9 14:21:31 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6d00c4297f6714c03ab10f57c10063ebd79264a1
      https://github.com/llvm/llvm-project/commit/6d00c4297f6714c03ab10f57c10063ebd79264a1
  Author: Corentin Jabot <corentinjabot at gmail.com>
  Date:   2025-07-10 (Thu, 10 Jul 2025)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/AST/ItaniumMangle.cpp
    M clang/lib/Sema/SemaLambda.cpp
    M clang/test/CodeGenCXX/mangle-requires.cpp
    M clang/test/CodeGenCXX/ms-mangle-requires.cpp
    M clang/test/SemaTemplate/concepts-lambda.cpp

  Log Message:
  -----------
  [Clang] Do not skip over `RequiresExprBodyDecl` when creating lambdas (#147764)

When we create a lambda, we would skip over declaration contexts
representing a require expression body, which would lead to wrong
lookup.

Note that I wasn't able to establish why the code
in `Sema::createLambdaClosureType` was there to begin with (it's not
exactly recent)

The changes to mangling only ensure the status quo is preserved and do
not attempt to address the known issues of
mangling lambdas in require clauses.

In particular the itanium mangling is consistent with Clang before this
patch but differs from GCC's.

Fixes #147650



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