[all-commits] [llvm/llvm-project] 154c7c: [Clang] Don't add top-level const qualifiers to ca...

Younan Zhang via All-commits all-commits at lists.llvm.org
Tue Dec 3 23:31:36 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 154c7c0bf272adc67d3ffc541a01fe8025843fd2
      https://github.com/llvm/llvm-project/commit/154c7c0bf272adc67d3ffc541a01fe8025843fd2
  Author: Younan Zhang <zyn7109 at gmail.com>
  Date:   2024-12-04 (Wed, 04 Dec 2024)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/lib/Sema/SemaExpr.cpp
    M clang/test/SemaCXX/lambda-capture-type-deduction.cpp

  Log Message:
  -----------
  [Clang] Don't add top-level const qualifiers to captured function types (#118050)

This aligns with the logic in `TreeTransform::RebuildQualifiedType()`
where we refrain from adding const qualifiers to function types.
Previously, we seemed to overlook this edge case when copy-capturing a
variable that is of function type within a const-qualified lambda.

This issue also reveals other related problems as in incorrect type
printout and a suspicious implementation in DeduceTemplateArguments. I
decide to leave them in follow-up work.

Fixes #84961



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