[Sema] List conversion validate character array.
The function `TryListConversion` didn't properly validate the following part of the standard: Otherwise, if the parameter type is a character array [... ] and the initializer list has a single element that is an appropriately-typed string literal (8.5.2 [dcl.init.string]), the implicit conversion sequence is the identity conversion. This caused the following call to `f()` to be ambiguous. void f(int(&&)[1]); void f(unsigned(&&)[1]); void g(unsigned i) { f({i}); } This issue only occurs when the initializer list had one element. Differential Revision: https://reviews.llvm.org/D87561
Loading
Please sign in to comment