diff options
author | Craig Topper <craig.topper@gmail.com> | 2011-08-11 05:57:09 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2011-08-11 05:57:09 +0000 |
commit | 2e4f44f2799410a2336675e075c7f82cbbc29b33 (patch) | |
tree | e0b0aef7f4da7d128d12947ab362390f581e3620 /test/Lexer/string_concat.cpp | |
parent | 03720fce6e709661af020f3e4e6dfd08a96e8044 (diff) |
Add tests for string literal concatenation.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@137302 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Lexer/string_concat.cpp')
-rw-r--r-- | test/Lexer/string_concat.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/test/Lexer/string_concat.cpp b/test/Lexer/string_concat.cpp new file mode 100644 index 0000000000..633e02492f --- /dev/null +++ b/test/Lexer/string_concat.cpp @@ -0,0 +1,33 @@ +// RUN: %clang_cc1 -std=c++0x -fsyntax-only -verify %s + +void f() { + + const char* a = u8"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* b = u8"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* c = u8"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* d = u8"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* e = u8"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char* f = u8"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + + const char16_t* g = u"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* h = u"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* i = u"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* j = u"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* k = u"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char16_t* l = u"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + + const char32_t* m = U"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* n = U"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* o = U"abc" L"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* p = U"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* q = U"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const char32_t* r = U"abc" LR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + + const wchar_t* s = L"abc" u8"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* t = L"abc" u"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* u = L"abc" U"abc"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* v = L"abc" u8R"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* w = L"abc" uR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} + const wchar_t* x = L"abc" UR"(abc)"; // expected-error {{ unsupported non-standard concatenation of string literals }} +} + |