[clang-tools-extra] [clang-tidy] In bugprone-unused-return-value allow cast to void for pre-C++26 by default (PR #171618)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 10 08:16:22 PST 2025
================
@@ -153,6 +153,12 @@ Improvements to clang-tidy
`-header-filter='.*'`. To disable warnings from non-system, set `-header-filter`
to an empty string.
+- :doc:`bugprone-unused-return-value <clang-tidy/checks/bugprone/unused-return-value>`
+ now defaults ``AllowCastToVoid`` to ``false`` when running with C++26 or newer
+ language modes, while older standards keep the previous ``true`` default.
+ With C++26, the ``_`` placeholder should be used to mark unused return
----------------
EugeneZelenko wrote:
```suggestion
now defaults `AllowCastToVoid` to `false` when running with C++26 or newer
language modes, while older standards keep the previous `true` default.
With C++26, the `_` placeholder should be used to mark unused return
```
https://github.com/llvm/llvm-project/pull/171618
More information about the cfe-commits
mailing list