aboutsummaryrefslogtreecommitdiff
path: root/test/SemaCXX/cxx0x-type-convert-construct.cpp
blob: a523108c6e20afb8dbe6bc3ef4bf011cc63e5d14 (plain)
1
2
3
4
5
6
7
8
9
10
// RUN: %clang_cc1 -std=gnu++0x -fsyntax-only -verify %s 

void f() {
  char *u8str;
  u8str = u8"a UTF-8 string"; // expected-error {{assigning to 'char *' from incompatible type 'const char [15]'}}
  char16_t *ustr;
  ustr = u"a UTF-16 string"; // expected-error {{assigning to 'char16_t *' from incompatible type 'const char16_t [16]'}}
  char32_t *Ustr;
  Ustr = U"a UTF-32 string"; // expected-error {{assigning to 'char32_t *' from incompatible type 'const char32_t [16]'}}
}