erichkeane accepted this revision.
erichkeane added a comment.
This revision is now accepted and ready to land.

2 nits, otherwise LGTM.



================
Comment at: clang/lib/Sema/SemaChecking.cpp:13080
 
-  S.Diag(InitLoc, diag::warn_impcast_bitfield_precision_constant)
-    << PrettyValue << PrettyTrunc << OriginalInit->getType()
-    << Init->getSourceRange();
+  bool IsOneBit = FieldWidth == 1 && Value == 1;
+  S.Diag(InitLoc, IsOneBit
----------------
Might consider hoisting this line above the macro-checking, and just use it in 
both cases.  Also, perhaps a more descriptive name?  
`IsInvalidSignedOneBitAssignment` ? 


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132851/new/

https://reviews.llvm.org/D132851

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to