[clang] [Clang] add -Wshift-bool warning to handle shifting of bool (PR #127336)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 19 12:06:11 PST 2025


================
@@ -138,6 +138,7 @@ Improvements to Clang's diagnostics
 - Fixed a bug where Clang's Analysis did not correctly model the destructor behavior of ``union`` members (#GH119415).
 - A statement attribute applied to a ``case`` label no longer suppresses
   'bypassing variable initialization' diagnostics (#84072).
+- The ``-Wshift-bool`` warning has been added to warn about shifting a ``boolean``. (#GH28334)
----------------
AaronBallman wrote:

```suggestion
- The ``-Wshift-bool`` warning has been added to warn about shifting a boolean. (#GH28334)
```

https://github.com/llvm/llvm-project/pull/127336


More information about the cfe-commits mailing list