[clang-tools-extra] [clang-tidy] Fix bugprone-macro-parentheses false positive for _Generic (PR #216237)
via cfe-commits
cfe-commits at lists.llvm.org
Sun Aug 23 20:14:32 PDT 2026
github-actions[bot] wrote:
<!--PREMERGE ADVISOR COMMENT: Windows-->
# :window: Windows x64 Test Results
* 3314 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
# | ***************
# | *** 124,129 ****
# | --- 124,134 ----
# |
# | #### Changes in existing checks
# |
# | + - Improved {doc}`bugprone-macro-parentheses
# | + <clang-tidy/checks/bugprone/macro-parentheses>` check by fixing a false
# | + positive for macro arguments used as the type-name in a C11 `_Generic`
# | + selection, where parenthesizing them would be invalid.
# | +
# | - Fixed a crash in {doc}`bugprone-misplaced-operator-in-strlen-in-alloc
# | <clang-tidy/checks/bugprone/misplaced-operator-in-strlen-in-alloc>` when
# | checking an array new expression without a size expression.
# | ***************
# | *** 208,218 ****
# | <clang-tidy/checks/readability/use-std-min-max>` check by fixing spurious
# | trailing semicolons and lost comments when the `if` body has no braces.
# |
# | - - Improved {doc}`bugprone-macro-parentheses
# | - <clang-tidy/checks/bugprone/macro-parentheses>` check by fixing a false
# | - positive for macro arguments used as the type-name in a C11 `_Generic`
# | - selection, where parenthesizing them would be invalid.
# | -
# | #### Removed checks
# |
# | - Removed the deprecated `zircon-temporary-objects` check. Users should migrate to
# | --- 213,218 ----
# `-----------------------------
# 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/216237
More information about the cfe-commits
mailing list