[all-commits] [llvm/llvm-project] cc1041: [Clang] Allow downgrading to a warning the diagnos...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Mon Aug 8 16:23:24 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cc104113ddecbdcec2cca848adbb6afa1214e9de
      https://github.com/llvm/llvm-project/commit/cc104113ddecbdcec2cca848adbb6afa1214e9de
  Author: Shafik Yaghmour <shafik.yaghmour at intel.com>
  Date:   2022-08-08 (Mon, 08 Aug 2022)

  Changed paths:
    M clang/docs/ReleaseNotes.rst
    M clang/include/clang/Basic/DiagnosticASTKinds.td
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/MicrosoftCompatibility.cpp
    M clang/test/SemaCXX/compare.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp

  Log Message:
  -----------
  [Clang] Allow downgrading to a warning the diagnostic for setting a non fixed enum to a value outside the range of the enumeration values

In D130058 we diagnose the undefined behavior of setting the value outside the
range of the enumerations values for an enum without a fixed underlying type.

Based on feedback we will provide users to the ability to downgrade this
diagnostic to a waring to allow for a transition period. We expect to turn this
diagnostic to an error in the next release.

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




More information about the All-commits mailing list