Nico Weber | a0f15b0 | 2010-10-06 04:57:26 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -fshort-wchar -verify %s |
| 2 | |
| 3 | void f() { |
Seth Cantrell | 7748cbc | 2012-01-18 12:27:10 +0000 | [diff] [blame] | 4 | (void)L"\U00010000"; // unicode escape produces UTF-16 sequence, so no warning |
Nico Weber | 59705ae | 2010-10-09 00:27:47 +0000 | [diff] [blame] | 5 | |
Seth Cantrell | 7748cbc | 2012-01-18 12:27:10 +0000 | [diff] [blame] | 6 | (void)L'\U00010000'; // expected-error {{character too large for enclosing character literal type}} |
Nico Weber | 59705ae | 2010-10-09 00:27:47 +0000 | [diff] [blame] | 7 | |
Douglas Gregor | 5cee119 | 2011-07-27 05:40:30 +0000 | [diff] [blame] | 8 | (void)L'ab'; // expected-warning {{extraneous characters in character constant ignored}} |
Nico Weber | 59705ae | 2010-10-09 00:27:47 +0000 | [diff] [blame] | 9 | |
Douglas Gregor | 5cee119 | 2011-07-27 05:40:30 +0000 | [diff] [blame] | 10 | (void)L'a\u1000'; // expected-warning {{extraneous characters in character constant ignored}} |
Nico Weber | a0f15b0 | 2010-10-06 04:57:26 +0000 | [diff] [blame] | 11 | } |
| 12 | |