[all-commits] [llvm/llvm-project] 6acc69: [STLForwardCompat] Improve category handling in tr...

Krzysztof Parzyszek via All-commits all-commits at lists.llvm.org
Fri Jul 18 11:34:36 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6acc6991f83409be3ca6315edf8c7f381ebe4d40
      https://github.com/llvm/llvm-project/commit/6acc6991f83409be3ca6315edf8c7f381ebe4d40
  Author: Krzysztof Parzyszek <Krzysztof.Parzyszek at amd.com>
  Date:   2025-07-18 (Fri, 18 Jul 2025)

  Changed paths:
    M llvm/include/llvm/ADT/STLForwardCompat.h
    M llvm/unittests/ADT/STLForwardCompatTest.cpp

  Log Message:
  -----------
  [STLForwardCompat] Improve category handling in transformOptional (#149539)

The old version would prefer the "const &" overload over the "&&" one
unless the former was not allowed in the given situation. In particular,
if the function passed was "[](auto &&)" the argument would be "const &"
even if the value passed to transformOptional was an rvalue reference.

This version improves the handling of expression categories, and the
lambda argument category will reflect the argument category in the above
scenario.



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