This revision was automatically updated to reflect the committed changes.
Mordante marked 2 inline comments as done.
Closed by commit rG0ce6d6b46eb7: [Sema] List conversion validate character
array. (authored by Mordante).
Changed prior to commit:
https://reviews.llvm.org/D87561?vs=294556&id=29
Mordante marked 6 inline comments as done.
Mordante added inline comments.
Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414
+ void f(const char[4]);
+ void f(const wchar_t[4]);
+ void f(const char16_t[4]);
+ void f(const char32_t[4]);
rsmith wrote:
> Mordant
rsmith accepted this revision.
rsmith added a comment.
This revision is now accepted and ready to land.
Thanks, only nits here. Please feel free to submit after addressing them, or
request another round of review if you prefer.
Comment at: clang/lib/Sema/SemaInit.cpp:3115-3118
Mordante updated this revision to Diff 294556.
Mordante added a comment.
Addresses the review comments.
Adds an extra test case to test whether the proper overload is called. The
proper overload is a bit of a surprise so when the expected behaviour changes
the overload test can be adjusted.
CH
Mordante marked 2 inline comments as done.
Mordante added inline comments.
Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414
+ void f(const char[4]);
+ void f(const wchar_t[4]);
+ void f(const char16_t[4]);
+ void f(const char32_t[4]);
rsmith wrote:
> rsmith
rsmith added inline comments.
Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414
+ void f(const char[4]);
+ void f(const wchar_t[4]);
+ void f(const char16_t[4]);
+ void f(const char32_t[4]);
rsmith wrote:
> Mordante wrote:
> > rsmith wrote:
> > > These should
rsmith added inline comments.
Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414
+ void f(const char[4]);
+ void f(const wchar_t[4]);
+ void f(const char16_t[4]);
+ void f(const char32_t[4]);
Mordante wrote:
> rsmith wrote:
> > These should presumably be refer
Mordante added inline comments.
Comment at: clang/test/CXX/drs/dr14xx.cpp:411-414
+ void f(const char[4]);
+ void f(const wchar_t[4]);
+ void f(const char16_t[4]);
+ void f(const char32_t[4]);
rsmith wrote:
> These should presumably be references to arrays, r
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:4989
+if (ToType->isArrayType() && ToType->isCharType() &&
+isa(From->getInit(0))) {
InitializedEntity Entity =
Mordante wrote:
> rsmith wrote:
> > This is too narrow a c
Mordante marked 2 inline comments as done.
Mordante added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:4989
+if (ToType->isArrayType() && ToType->isCharType() &&
+isa(From->getInit(0))) {
InitializedEntity Entity =
rsmith wrote:
Mordante marked 3 inline comments as done.
Mordante added a comment.
Thanks for the feedback!
Comment at: clang/lib/Sema/SemaOverload.cpp:4988
+
+if (ToType->isArrayType() && ToType->isCharType() &&
+isa(From->getInit(0))) {
rsmith wrote:
> `isCharT
rsmith added inline comments.
Comment at: clang/lib/Sema/SemaOverload.cpp:4988
+
+if (ToType->isArrayType() && ToType->isCharType() &&
+isa(From->getInit(0))) {
`isCharType` is too narrow a check here. We also need to check for all the
other types th
Mordante created this revision.
Mordante added reviewers: lvoufo, rsmith.
Mordante added a project: clang.
Mordante requested review of this revision.
The function `TryListConversion` didn't properly validate the following part of
the standard:
Otherwise, if the parameter type is a character a
13 matches
Mail list logo