brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 3ed1f76 Raw
22 lines · c
1// RUN: %clang_cc1 -x c -std=c11 -Werror %s2// RUN: %clang_cc1 -x c++ -std=c++11 -Werror %s3// RUN: %clang_cc1 -x c -std=c11 -Wc99-compat -verify %s4// RUN: %clang_cc1 -x c++ -std=c++11 -Wc++98-compat -verify %s5 6#ifndef __cplusplus7typedef __CHAR16_TYPE__ char16_t;8typedef __CHAR32_TYPE__ char32_t;9#else10// expected-warning@17 {{'char16_t' type specifier is incompatible with C++98}}11// expected-warning@18 {{'char32_t' type specifier is incompatible with C++98}}12// expected-warning@20 {{'char16_t' type specifier is incompatible with C++98}}13// expected-warning@21 {{'char32_t' type specifier is incompatible with C++98}}14#endif15 16const char *a = u8"abcd"; // expected-warning {{unicode literals are incompatible with}}17const char16_t *b = u"abcd"; // expected-warning {{unicode literals are incompatible with}}18const char32_t *c = U"abcd"; // expected-warning {{unicode literals are incompatible with}}19 20char16_t d = u'a'; // expected-warning {{unicode literals are incompatible with}}21char32_t e = U'a'; // expected-warning {{unicode literals are incompatible with}}22