1 // RUN: %clang_cc1 -std=c++20 -verify %s -DCHAR8_T
2 // RUN: %clang_cc1 -std=c++20 -verify %s -fchar8_t -DCHAR8_T
3 // RUN: %clang_cc1 -std=c++17 -verify %s -fchar8_t -DCHAR8_T
5 // RUN: %clang_cc1 -std=c++17 -verify %s
6 // RUN: %clang_cc1 -std=c++17 -verify %s -fno-char8_t
7 // RUN: %clang_cc1 -std=c++20 -verify %s -fno-char8_t
9 #if defined(__cpp_char8_t) != defined(CHAR8_T)
10 #error wrong setting for __cpp_char_t
13 #if defined(__cpp_char8_t) && __is_identifier(char8_t)
14 #error char8_t is an identifier under -fchar8_t
17 #if !defined(__cpp_char8_t) && !__is_identifier(char8_t)
18 #error char8_t is a keyword under -fno-char8_t
23 // expected-error@-2 {{unknown type}}
25 // expected-no-diagnostics