[all-commits] [llvm/llvm-project] 4e4587: [Clang] Restrict non fixed enum to a value outside...

Shafik Yaghmour via All-commits all-commits at lists.llvm.org
Wed Aug 10 11:12:16 PDT 2022

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

  Changed paths:
    M clang/lib/AST/ExprConstant.cpp
    M clang/test/SemaCXX/constant-expression-cxx11.cpp

  Log Message:
  [Clang] Restrict non fixed enum to a value outside the range of the enumeration values warning to context requiring a constant expression

In D131307 we allowed the diagnostic to be turned into a warning for a
transition period.

This had the side effect of triggering the warning in contexts not required to
be constant expression. This change will restrict the diagnostic to constant
expression contexts. This should reduce the fallout of this diagnostic.

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

More information about the All-commits mailing list