[clang-tools-extra] [clang-tidy] Fix bugprone-misplaced-widening-cast false positive on bitfield assignments (PR #197554)
via cfe-commits
cfe-commits at lists.llvm.org
Thu May 14 19:29:52 PDT 2026
================
@@ -372,6 +372,12 @@ Changes in existing checks
<clang-tidy/checks/bugprone/macro-parentheses>` check by printing the macro
definition in the warning message if the macro is defined on command line.
+- Improved :doc:`bugprone-misplaced-widening-cast
+ <clang-tidy/checks/bugprone/misplaced-widening-cast>` check by fixing a false
+ positive on bitfield assignments when ``CheckImplicitCasts`` is enabled. The
+ checker now uses the actual bitfield width instead of the declared type to
----------------
EugeneZelenko wrote:
```suggestion
positive on bitfield assignments when `CheckImplicitCasts` is enabled. The
check now uses the actual bitfield width instead of the declared type to
```
Plus possible formatting changes. Also Wikipedia uses `bit field`.
https://github.com/llvm/llvm-project/pull/197554
More information about the cfe-commits
mailing list