1 // Test this without pch. 2 // RUN: %clang_cc1 -fblocks -include %S/exprs.h -fsyntax-only -verify %s 3 4 // Test with pch. 5 // RUN: %clang_cc1 -emit-pch -fblocks -o %t %S/exprs.h 6 // RUN: %clang_cc1 -fblocks -include-pch %t -fsyntax-only -verify %s 7 8 __SIZE_TYPE__ size_type_value; 9 int integer; 10 long long_integer; 11 double floating; 12 _Complex double floating_complex; 13 14 // DeclRefExpr 15 int_decl_ref *int_ptr1 = &integer; 16 enum_decl_ref *enum_ptr1 = &integer; 17 18 // IntegerLiteral 19 integer_literal *int_ptr2 = &integer; 20 long_literal *long_ptr1 = &long_integer; 21 22 // FloatingLiteral + ParenExpr 23 floating_literal *double_ptr = &floating; 24 25 // ImaginaryLiteral 26 imaginary_literal *cdouble_ptr = &floating_complex; 27 28 // StringLiteral 29 const char* printHello() { 30 return hello; 31 } 32 33 // CharacterLiteral 34 char_literal *int_ptr3 = &integer; 35 36 // UnaryOperator 37 negate_enum *int_ptr4 = &integer; 38 39 // OffsetOfExpr 40 offsetof_type *offsetof_ptr = &size_type_value; 41 42 // UnaryExprOrTypeTraitExpr 43 typeof(sizeof(float)) size_t_value; 44 typeof_sizeof *size_t_ptr = &size_t_value; 45 typeof_sizeof2 *size_t_ptr2 = &size_t_value; 46 47 // ArraySubscriptExpr 48 array_subscript *double_ptr1_5 = &floating; 49 50 // CallExpr 51 call_returning_double *double_ptr2 = &floating; 52 53 // MemberExpr 54 member_ref_double *double_ptr3 = &floating; 55 56 // BinaryOperator 57 add_result *int_ptr5 = &integer; 58 59 // CompoundAssignOperator 60 addeq_result *int_ptr6 = &integer; 61 62 add_result_with_typeinfo *int_typeinfo_ptr6; 63 64 // ConditionalOperator 65 conditional_operator *double_ptr4 = &floating; 66 67 // CStyleCastExpr 68 void_ptr vp1 = &integer; 69 70 // CompoundLiteral 71 struct S s; 72 compound_literal *sptr = &s; 73 74 // ExtVectorElementExpr 75 ext_vector_element *double_ptr5 = &floating; 76 77 // InitListExpr 78 double get_from_double_array(unsigned Idx) { return double_array[Idx]; } 79 80 /// DesignatedInitExpr 81 float get_from_designated(unsigned Idx) { 82 return designated_inits[2].y; 83 } 84 85 // TypesCompatibleExpr 86 types_compatible *int_ptr7 = &integer; 87 88 // ChooseExpr 89 choose_expr *int_ptr8 = &integer; 90 91 // GNUNullExpr FIXME: needs C++ 92 //null_type null = __null; 93 94 // ShuffleVectorExpr 95 shuffle_expr *vec_ptr = &vec2; 96 97 // GenericSelectionExpr 98 generic_selection_expr *double_ptr6 = &floating; 99