2010-10-06 12:57:26 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fshort-wchar -verify %s
|
|
|
|
|
|
|
|
void f() {
|
2012-01-18 20:27:10 +08:00
|
|
|
(void)L"\U00010000"; // unicode escape produces UTF-16 sequence, so no warning
|
2010-10-09 08:27:47 +08:00
|
|
|
|
2012-01-18 20:27:10 +08:00
|
|
|
(void)L'\U00010000'; // expected-error {{character too large for enclosing character literal type}}
|
2010-10-09 08:27:47 +08:00
|
|
|
|
2011-07-27 13:40:30 +08:00
|
|
|
(void)L'ab'; // expected-warning {{extraneous characters in character constant ignored}}
|
2010-10-09 08:27:47 +08:00
|
|
|
|
2011-07-27 13:40:30 +08:00
|
|
|
(void)L'a\u1000'; // expected-warning {{extraneous characters in character constant ignored}}
|
2010-10-06 12:57:26 +08:00
|
|
|
}
|
|
|
|
|