[clang-tools-extra] [clang-tidy] Fix crash on pointer arithmetic with an incomplete type in bugprone-pointer-arithmetic-on-polymorphic-object (PR #215724)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 21 17:53:24 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results
* 3369 tests passed
* 8 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
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o /home/gha/actions-runner/_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: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o /home/gha/actions-runner/_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 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../docs/clang-tidy/checks/list.md /home/gha/actions-runner/_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 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../docs/clang-tidy/checks/list.md /home/gha/actions-runner/_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
/usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/alphabetical-order.test.tmp.ReleaseNotes.md
# executed command: /usr/bin/python3 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../clang-tidy/tool/check_alphabetical_order.py -o /home/gha/actions-runner/_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 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../docs/ReleaseNotes.md /home/gha/actions-runner/_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 /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../docs/ReleaseNotes.md /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/alphabetical-order.test.tmp.ReleaseNotes.md
# .---command stdout------------
# | *** /home/gha/actions-runner/_work/llvm-project/llvm-project/clang-tools-extra/test/clang-tidy/infrastructure/../../../docs/ReleaseNotes.md
# | --- /home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/clang/tools/extra/test/clang-tidy/infrastructure/Output/alphabetical-order.test.tmp.ReleaseNotes.md
# | ***************
# | *** 114,126 ****
# | <clang-tidy/checks/bugprone/misplaced-operator-in-strlen-in-alloc>` when
# | checking an array new expression without a size expression.
# |
# | - Fixed a crash in {doc}`bugprone-std-namespace-modification
# | <clang-tidy/checks/bugprone/std-namespace-modification>` when checking
# | lambda closure types used as template arguments.
# | -
# | - - Fixed a crash in {doc}`bugprone-pointer-arithmetic-on-polymorphic-object
# | - <clang-tidy/checks/bugprone/pointer-arithmetic-on-polymorphic-object>` when
# | - the pointer points to an incomplete (forward-declared) type.
# |
# | - Improved {doc}`cppcoreguidelines-pro-type-member-init
# | <clang-tidy/checks/cppcoreguidelines/pro-type-member-init>` check by treating
# | --- 114,126 ----
# | <clang-tidy/checks/bugprone/misplaced-operator-in-strlen-in-alloc>` when
# | checking an array new expression without a size expression.
# |
# | + - Fixed a crash in {doc}`bugprone-pointer-arithmetic-on-polymorphic-object
# | + <clang-tidy/checks/bugprone/pointer-arithmetic-on-polymorphic-object>` when
# | + the pointer points to an incomplete (forward-declared) type.
# | +
# | - Fixed a crash in {doc}`bugprone-std-namespace-modification
# | <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
# `-----------------------------
# 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/215724
More information about the cfe-commits
mailing list