[PATCH] D131255: Fix Wbitfield-constant-conversion on 1-bit signed bitfield

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 11 15:04:58 PDT 2022


thakis added inline comments.


================
Comment at: clang/lib/Sema/SemaChecking.cpp:13069
-  // therefore don't strictly fit into a signed bitfield of width 1.
-  if (FieldWidth == 1 && Value == 1)
-    return false;
----------------
This was to suppress false positives. All instances we've seen of this are in fact false positives.

Was there any analysis on true / false positives for this change?

At least for our code, this seems to make the warning strictly worse.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D131255



More information about the cfe-commits mailing list