aboutsummaryrefslogtreecommitdiff
path: root/test/PCH/exprs.c
blob: 49f74dd91a9148e0884c37fb391d58540ef9c098 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Test this without pch.
// RUN: clang-cc -fblocks -include %S/exprs.h -fsyntax-only -verify %s

// Test with pch.
// RUN: clang-cc -emit-pch -fblocks -o %t %S/exprs.h &&
// RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s 

int integer;
long long_integer;
double floating;
_Complex double floating_complex;

// DeclRefExpr
int_decl_ref *int_ptr1 = &integer;
enum_decl_ref *enum_ptr1 = &integer;

// IntegerLiteral
integer_literal *int_ptr2 = &integer;
long_literal *long_ptr1 = &long_integer;

// FloatingLiteral + ParenExpr
floating_literal *double_ptr = &floating;

// ImaginaryLiteral
imaginary_literal *cdouble_ptr = &floating_complex;

// StringLiteral
const char* printHello() {
  return hello;
}

// CharacterLiteral
char_literal *int_ptr3 = &integer;

// UnaryOperator
negate_enum *int_ptr4 = &integer;

// SizeOfAlignOfExpr
typeof(sizeof(float)) size_t_value;
typeof_sizeof *size_t_ptr = &size_t_value;
typeof_sizeof2 *size_t_ptr2 = &size_t_value;

// ArraySubscriptExpr
array_subscript *double_ptr1_5 = &floating;

// CallExpr
call_returning_double *double_ptr2 = &floating;

// MemberExpr
member_ref_double *double_ptr3 = &floating;

// BinaryOperator
add_result *int_ptr5 = &integer;

// CompoundAssignOperator
addeq_result *int_ptr6 = &integer;

// ConditionalOperator
conditional_operator *double_ptr4 = &floating;

// CStyleCastExpr
void_ptr vp1 = &integer;