<p>Thanks!</p>
<div class="gmail_quote">On Mar 9, 2012 5:22 AM, "Benjamin Kramer" <<a href="mailto:benny.kra@googlemail.com">benny.kra@googlemail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
On 09.03.2012, at 14:04, Dimitry Andric wrote:<br>
<br>
> On 2012-03-09 09:00, Richard Smith wrote:<br>
>> Author: rsmith<br>
>> Date: Fri Mar  9 02:00:36 2012<br>
>> New Revision: 152392<br>
>><br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project?rev=152392&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=152392&view=rev</a><br>
>> Log:<br>
>> Support for raw and template forms of numeric user-defined literals,<br>
>> and lots of tidying up.<br>
> ...<br>
>> Added: cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p2.cpp<br>
>> URL: <a href="http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p2.cpp?rev=152392&view=auto" target="_blank">http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p2.cpp?rev=152392&view=auto</a><br>

>> ==============================================================================<br>
>> --- cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p2.cpp (added)<br>
>> +++ cfe/trunk/test/CXX/lex/lex.literal/lex.ext/p2.cpp Fri Mar  9 02:00:36 2012<br>
>> @@ -0,0 +1,16 @@<br>
>> +// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s<br>
>> +<br>
>> +typedef decltype(sizeof(int)) size_t;<br>
>> +<br>
>> +// FIXME: These diagnostics should say 'size_t' instead of 'unsigned long'<br>
>> +int a = 123_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'unsigned long long' or 'const char *', and no matching literal operator template}}<br>

>> +int b = 4.2_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'long double' or 'const char *', and no matching literal operator template}}<br>

>> +int c = "foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned long'}}<br>
>> +int d = L"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const wchar_t *' and 'unsigned long'}}<br>
>> +int e = u8"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned long'}}<br>
>> +int f = u"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char16_t *' and 'unsigned long'}}<br>
>> +int g = U"foo"_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with arguments of types 'const char32_t *' and 'unsigned long'}}<br>
>> +int h = 'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char'}}<br>
>> +int i = L'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'wchar_t'}}<br>
>> +int j = u'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char16_t'}}<br>
>> +int k = U'y'_x; // expected-error {{no matching literal operator for call to 'operator "" _x' with argument of type 'char32_t'}}<br>
><br>
> This particular test fails on FreeBSD, but only on i386 (where size_t is unsigned int), not amd64 (where size_t is unsigned long):<br>
<br>
I committed a workaround in r152404.<br>
<br>
- Ben<br>
<br>
><br>
> ******************** TEST 'Clang :: CXX/lex/lex.literal/lex.ext/p2.cpp' FAILED ********************<br>
> Script:<br>
> --<br>
> /home/dim/obj/llvm-152403-trunk-fbsd10-i386-rel-1/Release+Asserts/bin/clang -cc1 -internal-isystem /home/dim/obj/llvm-152403-trunk-fbsd10-i386-rel-1/Release+Asserts/bin/../lib/clang/3.1/include -fsyntax-only -std=c++11 -verify /share/dim/src/llvm/trunk/tools/clang/test/CXX/lex/lex.literal/lex.ext/p2.cpp<br>

> --<br>
> Exit Code: 1<br>
> Command Output (stderr):<br>
> --<br>
> error: 'error' diagnostics expected but not seen:<br>
>  Line 8: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned long'<br>
>  Line 9: no matching literal operator for call to 'operator "" _x' with arguments of types 'const wchar_t *' and 'unsigned long'<br>
>  Line 10: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned long'<br>
>  Line 11: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char16_t *' and 'unsigned long'<br>
>  Line 12: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char32_t *' and 'unsigned long'<br>
> error: 'error' diagnostics seen but not expected:<br>
>  Line 8: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned int'<br>
>  Line 9: no matching literal operator for call to 'operator "" _x' with arguments of types 'const wchar_t *' and 'unsigned int'<br>
>  Line 10: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char *' and 'unsigned int'<br>
>  Line 11: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char16_t *' and 'unsigned int'<br>
>  Line 12: no matching literal operator for call to 'operator "" _x' with arguments of types 'const char32_t *' and 'unsigned int'<br>
> 10 errors generated.<br>
> --<br>
> _______________________________________________<br>
> cfe-commits mailing list<br>
> <a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br>
</blockquote></div>