]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Merge commit 69d42eef4bec from llvm-project (by Dimitry Andric):
authorDimitry Andric <dim@FreeBSD.org>
Wed, 14 Jun 2023 18:49:59 +0000 (20:49 +0200)
committerDimitry Andric <dim@FreeBSD.org>
Thu, 22 Jun 2023 18:22:54 +0000 (20:22 +0200)
commitcf24393421ca807899c599a53ddc5dcedb7c71dc
tree6125382fffec8e2729e728eba9b7879d436df8bb
parent2efbaac7a07fff163640a67873b3ac250794ec3f
Merge commit 69d42eef4bec from llvm-project (by Dimitry Andric):

  [Clang] Show type in enum out of range diagnostic

  When the diagnostic for an out of range enum value is printed, it
  currently does not show the actual enum type in question, for example:

      v8/src/base/bit-field.h:43:29: error: integer value 7 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
        static constexpr T kMax = static_cast<T>(kNumValues - 1);
                                  ^

  This can make it cumbersome to find the cause for the problem. Add the
  enum type to the diagnostic message, to make it easier.

  Reviewed By: aaron.ballman

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

PR: 271047
MFC after: 1 month
contrib/llvm-project/clang/include/clang/Basic/DiagnosticASTKinds.td
contrib/llvm-project/clang/lib/AST/ExprConstant.cpp