[all-commits] [llvm/llvm-project] b0668d: [libc++] Make sure that __desugars_to isn't trippe...

Louis Dionne via All-commits all-commits at lists.llvm.org
Tue Mar 25 11:29:28 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b0668d859b237f6991f416b688cedb7389354fd8
      https://github.com/llvm/llvm-project/commit/b0668d859b237f6991f416b688cedb7389354fd8
  Author: Louis Dionne <ldionne.2 at gmail.com>
  Date:   2025-03-25 (Tue, 25 Mar 2025)

  Changed paths:
    M libcxx/include/__algorithm/sort.h
    M libcxx/include/__algorithm/stable_sort.h
    M libcxx/include/__functional/reference_wrapper.h
    M libcxx/include/__type_traits/desugars_to.h
    A libcxx/test/libcxx/type_traits/desugars_to.compile.pass.cpp
    A libcxx/test/libcxx/utilities/function.objects/refwrap/desugars_to.compile.pass.cpp

  Log Message:
  -----------
  [libc++] Make sure that __desugars_to isn't tripped up by reference_wrapper, const and ref qualifiers (#132092)

Previously, const and ref qualification on an operation would cause
__desugars_to to report false, which would lead to unnecessary
pessimizations. The same holds for reference_wrapper.

In practice, const and ref qualifications on the operation itself are
not relevant to determining whether an operation desugars to something
else or not, so can be ignored.

We are not stripping volatile qualifiers from operations in this patch
because we feel that this requires additional discussion.

Fixes #129312



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