Bug 175477 - [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
Summary: [WPE] Build failure with Clang 4.0.1: no matching conversion for functional-s...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WPE WebKit (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Adrian Perez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-11 05:30 PDT by Adrian Perez
Modified: 2017-08-11 06:27 PDT (History)
6 users (show)

See Also:


Attachments
Patch (1.54 KB, patch)
2017-08-11 05:38 PDT, Adrian Perez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Adrian Perez 2017-08-11 05:30:22 PDT
Building WPE from “trunk” with Clang 4.0.1 results in the following error:

---

../../Source/WebKit/Shared/wpe/WebEventFactory.cpp:62:16: error: no matching conversion for functional-style cast from 'pointer' (aka 'unsigned short *') to 'WTF::String'
        return String(uchar16.get());
               ^~~~~~~~~~~~~~~~~~~~
../../Source/WTF/wtf/text/WTFString.h:99:27: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'const UChar *' (aka 'const char16_t *') for 1st argument
    WTF_EXPORT_STRING_API String(const UChar*);
                          ^
../../Source/WTF/wtf/text/WTFString.h:106:27: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'const LChar *' (aka 'const unsigned char *') for 1st argument
    WTF_EXPORT_STRING_API String(const LChar* characters);
                          ^
../../Source/WTF/wtf/text/WTFString.h:107:27: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'const char *' for 1st argument
    WTF_EXPORT_STRING_API String(const char* characters);
                          ^
../../Source/WTF/wtf/text/WTFString.h:122:27: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'WTF::ASCIILiteral' for 1st argument
    WTF_EXPORT_STRING_API String(ASCIILiteral);
                          ^
../../Source/WTF/wtf/text/WTFString.h:132:5: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'const WTF::String' for 1st argument
    String(const String& other)
    ^
../../Source/WTF/wtf/text/WTFString.h:135:5: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'WTF::String' for 1st argument
    String(String&& other)
    ^
../../Source/WTF/wtf/text/WTFString.h:476:5: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'WTF::HashTableDeletedValueType' for 1st argument
    String(WTF::HashTableDeletedValueType) : m_impl(WTF::HashTableDeletedValue) { }
    ^
../../Source/WTF/wtf/text/WTFString.h:552:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'WTF::StringImpl &' for 1st argument
inline String::String(StringImpl& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:557:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'WTF::StringImpl *' for 1st argument
inline String::String(StringImpl* impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:562:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'Ref<WTF::StringImpl>' for 1st argument
inline String::String(Ref<StringImpl>&& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:567:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'RefPtr<WTF::StringImpl>' for 1st argument
inline String::String(RefPtr<StringImpl>&& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:572:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'Ref<WTF::AtomicStringImpl>' for 1st argument
inline String::String(Ref<AtomicStringImpl>&& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:577:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'RefPtr<WTF::AtomicStringImpl>' for 1st argument
inline String::String(RefPtr<AtomicStringImpl>&& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:582:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'StaticStringImpl &' (aka 'WTF::StringImpl::StaticStringImpl &') for 1st argument
inline String::String(StaticStringImpl& impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:587:16: note: candidate constructor not viable: no known conversion from 'pointer' (aka 'unsigned short *') to 'StaticStringImpl *' (aka 'WTF::StringImpl::StaticStringImpl *') for 1st argument
inline String::String(StaticStringImpl* impl)
               ^
../../Source/WTF/wtf/text/WTFString.h:593:9: note: candidate template ignored: could not match 'Vector<char16_t, inlineCapacity, type-parameter-0-1, 16>' against 'unsigned short *'
String::String(const Vector<UChar, inlineCapacity, OverflowHandler>& vector)
        ^
../../Source/WTF/wtf/text/WTFString.h:128:5: note: candidate constructor template not viable: requires 2 arguments, but 1 was provided
    String(const char (&characters)[characterCount], ConstructFromLiteralTag) : m_impl(StringImpl::createFromLiteral<characterCount>(characters)) { }
    ^
../../Source/WTF/wtf/text/WTFString.h:82:5: note: candidate constructor not viable: requires 0 arguments, but 1 was provided
    String() { }
    ^
../../Source/WTF/wtf/text/WTFString.h:103:27: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    WTF_EXPORT_STRING_API String(const char* characters, unsigned length);
                          ^
../../Source/WTF/wtf/text/WTFString.h:102:27: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    WTF_EXPORT_STRING_API String(const LChar* characters, unsigned length);
                          ^
../../Source/WTF/wtf/text/WTFString.h:85:27: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
    WTF_EXPORT_STRING_API String(const UChar* characters, unsigned length);
                          ^
Comment 1 Adrian Perez 2017-08-11 05:38:46 PDT
Created attachment 317926 [details]
Patch
Comment 2 WebKit Commit Bot 2017-08-11 06:26:02 PDT
Comment on attachment 317926 [details]
Patch

Clearing flags on attachment: 317926

Committed r220585: <http://trac.webkit.org/changeset/220585>
Comment 3 WebKit Commit Bot 2017-08-11 06:26:04 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Konstantin Tokarev 2017-08-11 06:27:06 PDT
FYI, it's because of ICU 59, not Clang