[PATCH] D153375: [Clang] Fix incorrect use of direct initialization with copy initialization
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 30 15:46:19 PDT 2023
rsmith requested changes to this revision.
rsmith added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3.cpp:293
+ e = {E::E1};
+ e = {0}; // expected-error {{cannot initialize a value of type 'E' with an rvalue of type 'int'}}
+}
----------------
This looks valid to me. The language rules say we treat this as `e = E{0};`, which we accept.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153375/new/
https://reviews.llvm.org/D153375
More information about the cfe-commits
mailing list