================
@@ -195,14 +204,28 @@ void MisplacedWideningCastCheck::check(const 
MatchFinder::MatchResult &Result) {
   const QualType CastType = Cast->getType();
   const QualType CalcType = Calc->getType();
 
+  // If assigning to a bit field, use the bit field width as the effective
+  // target width. The declared type may be wider than the actual bit field
+  // storage. "BitField" is bound in the matcher via optionally(); if present,
+  // the LHS is a bit field member.
----------------
vbvictor wrote:

```suggestion
  // If assigning to a bit field, use the bit field width as the effective
  // target width. The declared type may be wider than the actual bit field
  // storage.
```

https://github.com/llvm/llvm-project/pull/197554
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to