[all-commits] [llvm/llvm-project] 3b00e4: Further update -Wbitfield-constant-conversion for ...

Aaron Ballman via All-commits all-commits at lists.llvm.org
Wed Aug 31 06:25:14 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b00e486797c0a28f0b5216ea507329d098ce573
      https://github.com/llvm/llvm-project/commit/3b00e486797c0a28f0b5216ea507329d098ce573
  Author: Aaron Ballman <aaron at aaronballman.com>
  Date:   2022-08-31 (Wed, 31 Aug 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticGroups.td
    M clang/include/clang/Basic/DiagnosticSemaKinds.td
    M clang/lib/Sema/SemaChecking.cpp
    M clang/test/CXX/drs/dr6xx.cpp
    M clang/test/Sema/constant-conversion.c
    M clang/test/SemaCXX/constant-conversion.cpp

  Log Message:
  -----------
  Further update -Wbitfield-constant-conversion for 1-bit bitfield

https://reviews.llvm.org/D131255 (82afc9b169a67e8b8a1862fb9c41a2cd974d6691)
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.

Differential Revision: https://reviews.llvm.org/D132851




More information about the All-commits mailing list