[PATCH] D153375: [Clang] Fix incorrect use of direct initialization with copy initialization

Corentin Jabot via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jun 30 09:51:04 PDT 2023


cor3ntin accepted this revision.
cor3ntin added a comment.
This revision is now accepted and ready to land.

LGTM but can you add a line in Release Notes? Thanks



================
Comment at: clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp:292
+  E e;
+  e = {0}; // expected-error {{cannot initialize a value of type 'E' with an rvalue of type 'int'}}
+}
----------------
Should we add a test that passes here? Even if it currently doesn't crash

 enum class E {Foo};
 E e;
 e = {E::Foo};




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153375/new/

https://reviews.llvm.org/D153375



More information about the cfe-commits mailing list