blob: de00c02f13157b18a0478d66e3cb1733913b36d3 [file] [log] [blame]
Nico Webera0f15b02010-10-06 04:57:26 +00001// RUN: %clang_cc1 -fsyntax-only -fshort-wchar -verify %s
2
3void f() {
Seth Cantrell7748cbc2012-01-18 12:27:10 +00004 (void)L"\U00010000"; // unicode escape produces UTF-16 sequence, so no warning
Nico Weber59705ae2010-10-09 00:27:47 +00005
Seth Cantrell7748cbc2012-01-18 12:27:10 +00006 (void)L'\U00010000'; // expected-error {{character too large for enclosing character literal type}}
Nico Weber59705ae2010-10-09 00:27:47 +00007
Douglas Gregor5cee1192011-07-27 05:40:30 +00008 (void)L'ab'; // expected-warning {{extraneous characters in character constant ignored}}
Nico Weber59705ae2010-10-09 00:27:47 +00009
Douglas Gregor5cee1192011-07-27 05:40:30 +000010 (void)L'a\u1000'; // expected-warning {{extraneous characters in character constant ignored}}
Nico Webera0f15b02010-10-06 04:57:26 +000011}
12