summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/constexpr-printing.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2012-01-02 18:14:06 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2012-01-02 18:14:06 +0000
commitdbfd4037fccf619c08bf76abea29608cfe0eb922 (patch)
tree117efa07120b37288171eb32fb5657553f4aa0d8 /clang/test/SemaCXX/constexpr-printing.cpp
parent8e25104b108ad0d40c144e9eeae374e3eb6607a7 (diff)
downloadbcm5719-llvm-dbfd4037fccf619c08bf76abea29608cfe0eb922.tar.gz
bcm5719-llvm-dbfd4037fccf619c08bf76abea29608cfe0eb922.zip
Add assertion to char32_t that the value is valid, as suggested by Jordy Rose.
Add a test that such characters don't make it through to StringLiteral objects in error recovery. llvm-svn: 147438
Diffstat (limited to 'clang/test/SemaCXX/constexpr-printing.cpp')
-rw-r--r--clang/test/SemaCXX/constexpr-printing.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/test/SemaCXX/constexpr-printing.cpp b/clang/test/SemaCXX/constexpr-printing.cpp
index a648fab42e3..03768c09fb9 100644
--- a/clang/test/SemaCXX/constexpr-printing.cpp
+++ b/clang/test/SemaCXX/constexpr-printing.cpp
@@ -83,7 +83,9 @@ constexpr char c8 = get(u8"test\0\\\"\t\a\b\234"); // \
expected-error {{}} expected-note {{u8"test\000\\\"\t\a\b\234"}}
constexpr char16_t c16 = get(u"test\0\\\"\t\a\b\234\u1234"); // \
expected-error {{}} expected-note {{u"test\000\\\"\t\a\b\234\u1234"}}
-constexpr char32_t c32 = get(U"test\0\\\"\t\a\b\234\u1234\U00101234"); // \
- expected-error {{}} expected-note {{U"test\000\\\"\t\a\b\234\u1234\U00101234"}}
+constexpr char32_t c32 = get(U"test\0\\\"\t\a\b\234\u1234\U0010ffff"); // \
+ expected-error {{}} expected-note {{U"test\000\\\"\t\a\b\234\u1234\U0010FFFF"}}
constexpr wchar_t wc = get(L"test\0\\\"\t\a\b\234\u1234"); // \
expected-error {{}} expected-note {{L"test\000\\\"\t\a\b\234\u1234"}}
+
+constexpr char32_t c32_err = get(U"\U00110000"); // expected-error {{invalid universal character}}
OpenPOWER on IntegriCloud