[clang-tools-extra] [clang-tidy] Handle auto&& in missing-std-forward (PR #220164)

via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 2 21:08:00 PDT 2026


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results

* 3324 tests passed
* 34 tests skipped
* 1 test failed

## Failed Tests
(click on a test name to see its output)

### Clang Tools
<details>
<summary>Clang Tools.clang-tidy/infrastructure/alphabetical-order.test</summary>

```
Exit Code: 1

Command Output (stdout):
--
# RUN: at line 1
C:/Python312/python.exe C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.md
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.md'
# note: command had no output on stdout or stderr
# RUN: at line 2
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.md C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.md
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.md' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.clang-tidy-checks-list.md'
# note: command had no output on stdout or stderr
# RUN: at line 4
C:/Python312/python.exe C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.md
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.md'
# .---command stderr------------
# | 
# | Entries in 'clang-tools-extra/docs/ReleaseNotes.md' are not alphabetically sorted.
# | Fix the ordering by applying diff printed below.
# | 
# `-----------------------------
# RUN: at line 5
diff --strip-trailing-cr C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.md C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.md
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.md' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.md'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/ReleaseNotes.md
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\alphabetical-order.test.tmp.ReleaseNotes.md
# | ***************
# | *** 147,162 ****
# |     <clang-tidy/checks/bugprone/std-namespace-modification>` when checking
# |     lambda closure types used as template arguments.
# |   
# |   - Improved {doc}`cppcoreguidelines-pro-type-member-init
# |     <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` check by treating
# |     `std::array` the same as built-in arrays when `IgnoreArrays` option is enabled.
# |   
# |   - Improved {doc}`cppcoreguidelines-use-enum-class
# |     <clang-tidy/checks/cppcoreguidelines/use-enum-class>` check by omitting unnamed enums from the `enum class` requirement, as previously the check suggested users an ill-formed fix.
# | - 
# | - - Improved {doc}`cppcoreguidelines-missing-std-forward
# | -   <clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by diagnosing
# | -   unforwarded `auto&&` parameters in C++20 abbreviated function templates.
# |   
# |   - Improved {doc}`misc-const-correctness
# |     <clang-tidy/checks/misc/const-correctness>` check:
# | --- 147,162 ----
# |     <clang-tidy/checks/bugprone/std-namespace-modification>` when checking
# |     lambda closure types used as template arguments.
# |   
# | + - Improved {doc}`cppcoreguidelines-missing-std-forward
# | +   <clang-tidy/checks/cppcoreguidelines/missing-std-forward>` check by diagnosing
# | +   unforwarded `auto&&` parameters in C++20 abbreviated function templates.
# | + 
# |   - Improved {doc}`cppcoreguidelines-pro-type-member-init
# |     <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` check by treating
# |     `std::array` the same as built-in arrays when `IgnoreArrays` option is enabled.
# |   
# |   - Improved {doc}`cppcoreguidelines-use-enum-class
# |     <clang-tidy/checks/cppcoreguidelines/use-enum-class>` check by omitting unnamed enums from the `enum class` requirement, as previously the check suggested users an ill-formed fix.
# |   
# |   - Improved {doc}`misc-const-correctness
# |     <clang-tidy/checks/misc/const-correctness>` check:
# `-----------------------------
# error: command failed with exit status: 1

--

```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/220164


More information about the cfe-commits mailing list