1 // Test this without pch.
2 // RUN: %clang_cc1 -fblocks -include %S/exprs.h -fsyntax-only -verify %s
5 // RUN: %clang_cc1 -emit-pch -fblocks -o %t %S/exprs.h
6 // RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s -DWITH_PCH
9 // expected-no-diagnostics
12 __SIZE_TYPE__ size_type_value
;
16 _Complex
double floating_complex
;
19 int_decl_ref
*int_ptr1
= &integer
;
20 enum_decl_ref
*enum_ptr1
= &integer
;
23 integer_literal
*int_ptr2
= &integer
;
24 long_literal
*long_ptr1
= &long_integer
;
26 // FloatingLiteral + ParenExpr
27 floating_literal
*double_ptr
= &floating
;
30 imaginary_literal
*cdouble_ptr
= &floating_complex
;
33 const char* printHello(void) {
38 char_literal
*int_ptr3
= &integer
;
41 negate_enum
*int_ptr4
= &integer
;
44 offsetof_type
*offsetof_ptr
= &size_type_value
;
46 // UnaryExprOrTypeTraitExpr
47 typeof(sizeof(float)) size_t_value
;
48 typeof_sizeof
*size_t_ptr
= &size_t_value
;
49 typeof_sizeof2
*size_t_ptr2
= &size_t_value
;
52 array_subscript
*double_ptr1_5
= &floating
;
55 call_returning_double
*double_ptr2
= &floating
;
58 member_ref_double
*double_ptr3
= &floating
;
61 add_result
*int_ptr5
= &integer
;
63 // CompoundAssignOperator
64 addeq_result
*int_ptr6
= &integer
;
66 add_result_with_typeinfo
*int_typeinfo_ptr6
;
68 // ConditionalOperator
69 conditional_operator
*double_ptr4
= &floating
;
72 void_ptr vp1
= &integer
;
76 compound_literal
*sptr
= &s
;
78 // ExtVectorElementExpr
79 ext_vector_element
*double_ptr5
= &floating
;
82 double get_from_double_array(unsigned Idx
) { return double_array
[Idx
]; }
84 /// DesignatedInitExpr
85 float get_from_designated(unsigned Idx
) {
86 return designated_inits
[2].y
;
89 // TypesCompatibleExpr
90 types_compatible
*int_ptr7
= &integer
;
93 choose_expr
*int_ptr8
= &integer
;
95 // GNUNullExpr FIXME: needs C++
96 //null_type null = __null;
99 shuffle_expr
*vec_ptr
= &vec2
;
101 // GenericSelectionExpr
102 generic_selection_expr
*double_ptr6
= &floating
;