diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 05:41:29 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-06-13 05:41:29 +0000 |
commit | 59b26d84b64510158e23d80eba077b844b7e0b04 (patch) | |
tree | 0005117b8e6556da67dbcb0d17546d0c5607b3f1 /test/Lexer/char-literal.cpp | |
parent | df9ef1bc8c3780307ab2ed81bf5e31c23310b936 (diff) | |
download | clang-59b26d84b64510158e23d80eba077b844b7e0b04.tar.gz |
Fix off-by-one error in UTF-16 encoding: don't try to use a surrogate pair for U+FFFF.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158391 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer/char-literal.cpp')
-rw-r--r-- | test/Lexer/char-literal.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Lexer/char-literal.cpp b/test/Lexer/char-literal.cpp index 5dc53608f8..8556d468cb 100644 --- a/test/Lexer/char-literal.cpp +++ b/test/Lexer/char-literal.cpp @@ -22,3 +22,6 @@ char m = '👿'; // expected-error {{character too large for enclosing character char32_t n = U'ab'; // expected-error {{Unicode character literals may not contain multiple characters}} char16_t o = '👽'; // expected-error {{character too large for enclosing character literal type}} + +char16_t p[2] = u"\U0000FFFF"; +char16_t q[2] = u"\U00010000"; // expected-error {{too long}} |