Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 1 | // Test this without pch. |
| 2 | // RUN: clang-cc -fblocks -include %S/exprs.h -fsyntax-only -verify %s |
| 3 | |
| 4 | // Test with pch. |
| 5 | // RUN: clang-cc -emit-pch -fblocks -o %t %S/exprs.h && |
| 6 | // RUN: clang-cc -fblocks -include-pch %t -fsyntax-only -verify %s |
| 7 | |
| 8 | int integer; |
| 9 | long long_integer; |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 10 | double floating; |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 11 | |
| 12 | // DeclRefExpr |
| 13 | int_decl_ref *int_ptr1 = &integer; |
| 14 | enum_decl_ref *enum_ptr1 = &integer; |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 15 | |
| 16 | // IntegerLiteral |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 17 | integer_literal *int_ptr2 = &integer; |
| 18 | long_literal *long_ptr1 = &long_integer; |
| 19 | |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 20 | // FloatingLiteral + ParenExpr |
Douglas Gregor | 17fc223 | 2009-04-14 21:55:33 +0000 | [diff] [blame] | 21 | floating_literal *double_ptr = &floating; |
| 22 | |
| 23 | // CharacterLiteral |
Douglas Gregor | 0b74891 | 2009-04-14 21:18:50 +0000 | [diff] [blame] | 24 | char_literal *int_ptr3 = &integer; |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 25 | |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame^] | 26 | // UnaryOperator |
| 27 | negate_enum *int_ptr4 = &integer; |
| 28 | |
| 29 | // SizeOfAlignOfExpr |
| 30 | typeof(sizeof(float)) size_t_value; |
| 31 | typeof_sizeof *size_t_ptr = &size_t_value; |
| 32 | typeof_sizeof2 *size_t_ptr2 = &size_t_value; |
| 33 | |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 34 | // BinaryOperator |
Douglas Gregor | 0b0b77f | 2009-04-15 15:58:59 +0000 | [diff] [blame^] | 35 | add_result *int_ptr5 = &integer; |
Douglas Gregor | db600c3 | 2009-04-15 00:25:59 +0000 | [diff] [blame] | 36 | |
| 37 | // CStyleCastExpr |
| 38 | void_ptr vp1 = &integer; |