[PATCH] D132851: Further update -Wbitfield-constant-conversion for 1-bit bitfield
Aaron Ballman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 29 07:11:07 PDT 2022
aaron.ballman created this revision.
aaron.ballman added reviewers: ShawnZhong, thakis, clang-language-wg, erichkeane.
Herald added a project: All.
aaron.ballman requested review of this revision.
Herald added a project: clang.
https://reviews.llvm.org/D131255 (82afc9b169a67e8b8a1862fb9c41a2cd974d6691 <https://reviews.llvm.org/rG82afc9b169a67e8b8a1862fb9c41a2cd974d6691>) began warning about conversion causing data loss for a single-bit bit-field. However, after landing the changes, there were reports about significant false positives from some code bases.
This alters the approach taken in that patch by introducing a new warning group (`-Wsingle-bit-bitfield-constant-conversion`) which is grouped under `-Wbitfield-constant-conversion` to allow users to selectively disable the single-bit warning without losing the other constant conversion warnings.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D132851
Files:
clang/docs/ReleaseNotes.rst
clang/include/clang/Basic/DiagnosticGroups.td
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Sema/SemaChecking.cpp
clang/test/CXX/drs/dr6xx.cpp
clang/test/Sema/constant-conversion.c
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D132851.456330.patch
Type: text/x-patch
Size: 5901 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220829/73d1ceff/attachment-0001.bin>
More information about the cfe-commits
mailing list