[clang-tools-extra] [clang-tidy] Add bugprone-lambda-capture-lifetime check (PR #203757)

via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 14 03:18:58 PDT 2026


github-actions[bot] wrote:

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

* 3192 tests passed
* 32 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/update-checks-list.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_update_docs.py -o C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\update-checks-list.test.tmp.clang-tidy-checks-list.rst
# executed command: C:/Python312/python.exe 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../clang-tidy/tool/check_update_docs.py' -o 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\update-checks-list.test.tmp.clang-tidy-checks-list.rst'
# .---command stderr------------
# | 
# | 'clang-tools-extra/docs/clang-tidy/checks/list.rst' is out of date.
# | Fix it by running 'clang-tools-extra/clang-tidy/add_new_check.py --update-docs'.
# | 
# `-----------------------------
# 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.rst C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\update-checks-list.test.tmp.clang-tidy-checks-list.rst
# executed command: diff --strip-trailing-cr 'C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst' 'C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\update-checks-list.test.tmp.clang-tidy-checks-list.rst'
# .---command stdout------------
# | *** C:\_work\llvm-project\llvm-project\clang-tools-extra\test\clang-tidy\infrastructure/../../../docs/clang-tidy/checks/list.rst
# | --- C:\_work\llvm-project\llvm-project\build\tools\clang\tools\extra\test\clang-tidy\infrastructure\Output\update-checks-list.test.tmp.clang-tidy-checks-list.rst
# | ***************
# | *** 114,120 ****
# |      :doc:`bugprone-infinite-loop <bugprone/infinite-loop>`,
# |      :doc:`bugprone-integer-division <bugprone/integer-division>`,
# |      :doc:`bugprone-invalid-enum-default-initialization <bugprone/invalid-enum-default-initialization>`,
# | !    :doc:`bugprone-lambda-capture-lifetime <bugprone/lambda-capture-lifetime>`, "Yes"
# |      :doc:`bugprone-lambda-function-name <bugprone/lambda-function-name>`,
# |      :doc:`bugprone-macro-parentheses <bugprone/macro-parentheses>`, "Yes"
# |      :doc:`bugprone-macro-repeated-side-effects <bugprone/macro-repeated-side-effects>`,
# | --- 114,120 ----
# |      :doc:`bugprone-infinite-loop <bugprone/infinite-loop>`,
# |      :doc:`bugprone-integer-division <bugprone/integer-division>`,
# |      :doc:`bugprone-invalid-enum-default-initialization <bugprone/invalid-enum-default-initialization>`,
# | !    :doc:`bugprone-lambda-capture-lifetime <bugprone/lambda-capture-lifetime>`,
# |      :doc:`bugprone-lambda-function-name <bugprone/lambda-function-name>`,
# |      :doc:`bugprone-macro-parentheses <bugprone/macro-parentheses>`, "Yes"
# |      :doc:`bugprone-macro-repeated-side-effects <bugprone/macro-repeated-side-effects>`,
# `-----------------------------
# 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/203757


More information about the cfe-commits mailing list