1 // RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
3 void escape(const void *);
5 // CHECK-DAG: internal global i8 99
8 const char *x
[1] = {({static char _x
= 99; &_x
; })};
17 #define N_ARGS(...) (sizeof((int[]){__VA_ARGS__}) / sizeof(int))
19 #define ARRAY_PTR(...) ({ \
20 static const struct sized_array _a = {N_ARGS(__VA_ARGS__), {__VA_ARGS__}}; \
25 const struct sized_array
*a
;
29 // CHECK-DAG: internal constant { i32, [2 x i32] } { i32 2, [2 x i32] [i32 50, i32 60] }
30 const struct sized_array
*A
= ARRAY_PTR(50, 60);
32 // CHECK-DAG: internal constant { i32, [3 x i32] } { i32 3, [3 x i32] [i32 10, i32 20, i32 30] }
33 struct outer X
= {ARRAY_PTR(10, 20, 30)};