blob: e444dfec158b5c9c8029f0e2ab8297474cb32ff5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
// RUN: %clang_cc1 %s -fsyntax-only --embed-dir=%S/Inputs -verify -std=c23
static constexpr unsigned char data[] = {
#embed "big_char.txt"
};
static constexpr char data1[] = {
#embed "big_char.txt" // expected-error {{constexpr initializer evaluates to 255 which is not exactly representable in type 'const char'}}
};
static constexpr int data2[] = {
#embed "big_char.txt"
};
static constexpr unsigned data3[] = {
#embed "big_char.txt" suffix(, -1) // expected-error {{constexpr initializer evaluates to -1 which is not exactly representable in type 'const unsigned int'}}
};
static constexpr int data4[] = {
#embed "big_char.txt" suffix(, -1)
};
|