[all-commits] [llvm/llvm-project] 66e089: [Sema] Reject list-initialization of enumeration t...

Akira Hatanaka via All-commits all-commits at lists.llvm.org
Thu Jun 2 17:26:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 66e08995b0b72d28acb5e87b90292e59fabfadae
      https://github.com/llvm/llvm-project/commit/66e08995b0b72d28acb5e87b90292e59fabfadae
  Author: Akira Hatanaka <ahatanaka at apple.com>
  Date:   2022-06-02 (Thu, 02 Jun 2022)

  Changed paths:
    M clang/lib/Sema/SemaInit.cpp
    M clang/test/SemaCXX/enum-scoped.cpp

  Log Message:
  -----------
  [Sema] Reject list-initialization of enumeration types from a
brace-init-list containing a single element of a different scoped
enumeration type

It is rejected because it doesn't satisfy the condition that the element
has to be implicitly convertible to the underlying type of the
enumeration.

http://eel.is/c++draft/dcl.init.list#3.8

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




More information about the All-commits mailing list