Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 1 | // Header for PCH test cxx_exprs.cpp |
| 2 | |
| 3 | // CXXStaticCastExpr |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 4 | typedef __typeof__(static_cast<void *>(0)) static_cast_result; |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 5 | |
| 6 | // CXXDynamicCastExpr |
| 7 | struct Base { virtual void f(); }; |
| 8 | struct Derived : Base { }; |
| 9 | Base *base_ptr; |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 10 | typedef __typeof__(dynamic_cast<Derived *>(base_ptr)) dynamic_cast_result; |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 11 | |
| 12 | // CXXReinterpretCastExpr |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 13 | typedef __typeof__(reinterpret_cast<void *>(0)) reinterpret_cast_result; |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 14 | |
| 15 | // CXXConstCastExpr |
| 16 | const char *const_char_ptr_value; |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 17 | typedef __typeof__(const_cast<char *>(const_char_ptr_value)) const_cast_result; |
Sam Weinig | ce757a7 | 2010-01-16 21:21:01 +0000 | [diff] [blame] | 18 | |
| 19 | // CXXFunctionalCastExpr |
| 20 | int int_value; |
Sam Weinig | eb7f961 | 2010-02-07 06:32:43 +0000 | [diff] [blame] | 21 | typedef __typeof__(double(int_value)) functional_cast_result; |
| 22 | |
| 23 | // CXXBoolLiteralExpr |
| 24 | typedef __typeof__(true) bool_literal_result; |
| 25 | const bool true_value = true; |
| 26 | const bool false_value = false; |
| 27 | |
| 28 | // CXXNullPtrLiteralExpr |
| 29 | typedef __typeof__(nullptr) cxx_null_ptr_result; |