1 // RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks
2 // RUN: %clang_cc1 -fsyntax-only -verify %s -fblocks -fexperimental-new-constant-interpreter
4 // expected-no-diagnostics
8 void_type_class
, integer_type_class
, char_type_class
,
9 enumeral_type_class
, boolean_type_class
,
10 pointer_type_class
, reference_type_class
, offset_type_class
,
11 real_type_class
, complex_type_class
,
12 function_type_class
, method_type_class
,
13 record_type_class
, union_type_class
,
14 array_type_class
, string_type_class
,
15 lang_type_class
, opaque_type_class
,
16 bitint_type_class
, vector_type_class
22 enum { red
, green
, blue
} enum_obj
;
27 struct { int a
; float b
; } s_obj
;
28 union { int a
; float b
; } u_obj
;
31 __attribute__((vector_size(16))) int vec
;
32 typedef __attribute__((ext_vector_type(4))) int evec_t
;
34 typedef _BitInt(8) int8_t3
__attribute__((ext_vector_type(3)));
36 typedef _BitInt(16) int16_t3
__attribute__((ext_vector_type(4)));
38 typedef _BitInt(32) int32_t3
__attribute__((ext_vector_type(5)));
40 typedef _BitInt(64) int64_t3
__attribute__((ext_vector_type(6)));
42 typedef _BitInt(8) vint8_t3
__attribute__((vector_size(3)));
44 typedef _BitInt(16) vint16_t3
__attribute__((vector_size(4)));
46 typedef _BitInt(32) vint32_t3
__attribute__((vector_size(8)));
48 typedef _BitInt(64) vint64_t3
__attribute__((vector_size(16)));
53 _Atomic
double atomic_d
;
54 _Complex
int complex_i
;
55 _Complex
double complex_d
;
57 int a1
[__builtin_classify_type(f()) == void_type_class
? 1 : -1];
58 int a2
[__builtin_classify_type(i
) == integer_type_class
? 1 : -1];
59 int a3
[__builtin_classify_type(c
) == integer_type_class
? 1 : -1];
60 int a4
[__builtin_classify_type(enum_obj
) == integer_type_class
? 1 : -1];
61 int a5
[__builtin_classify_type(p
) == pointer_type_class
? 1 : -1];
62 int a6
[__builtin_classify_type(d
) == real_type_class
? 1 : -1];
63 int a7
[__builtin_classify_type(cc
) == complex_type_class
? 1 : -1];
64 int a8
[__builtin_classify_type(f
) == pointer_type_class
? 1 : -1];
65 int a0
[__builtin_classify_type(s_obj
) == record_type_class
? 1 : -1];
66 int a10
[__builtin_classify_type(u_obj
) == union_type_class
? 1 : -1];
67 int a11
[__builtin_classify_type(arr
) == pointer_type_class
? 1 : -1];
68 int a12
[__builtin_classify_type("abc") == pointer_type_class
? 1 : -1];
69 int a13
[__builtin_classify_type(block
) == no_type_class
? 1 : -1];
70 int a14
[__builtin_classify_type(vec
) == vector_type_class
? 1 : -1];
71 int a15
[__builtin_classify_type(evec
) == vector_type_class
? 1 : -1];
72 int a16
[__builtin_classify_type(atomic_i
) == integer_type_class
? 1 : -1];
73 int a17
[__builtin_classify_type(atomic_d
) == real_type_class
? 1 : -1];
74 int a18
[__builtin_classify_type(complex_i
) == complex_type_class
? 1 : -1];
75 int a19
[__builtin_classify_type(complex_d
) == complex_type_class
? 1 : -1];
76 int a20
[__builtin_classify_type(bitint
) == bitint_type_class
? 1 : -1];
79 extern int (^p
)(void);
80 int n
= __builtin_classify_type(p
);