[PATCH] D87561: [Sema] List conversion validate character array

2020-10-03 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-10-03 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-27 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-27 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-27 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-20 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-19 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-16 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-15 Thread Mark de Wever via Phabricator via cfe-commits
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:

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-14 Thread Mark de Wever via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-13 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
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

[PATCH] D87561: [Sema] List conversion validate character array

2020-09-12 Thread Mark de Wever via Phabricator via cfe-commits
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