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