blob: a871aa201f124d70530f5cf09d743fe37692a6d2 [file] [log] [blame]
Sam Weinigce757a72010-01-16 21:21:01 +00001// Header for PCH test cxx_exprs.cpp
2
3// CXXStaticCastExpr
Sam Weinigeb7f9612010-02-07 06:32:43 +00004typedef __typeof__(static_cast<void *>(0)) static_cast_result;
Sam Weinigce757a72010-01-16 21:21:01 +00005
6// CXXDynamicCastExpr
7struct Base { virtual void f(); };
8struct Derived : Base { };
9Base *base_ptr;
Sam Weinigeb7f9612010-02-07 06:32:43 +000010typedef __typeof__(dynamic_cast<Derived *>(base_ptr)) dynamic_cast_result;
Sam Weinigce757a72010-01-16 21:21:01 +000011
12// CXXReinterpretCastExpr
Sam Weinigeb7f9612010-02-07 06:32:43 +000013typedef __typeof__(reinterpret_cast<void *>(0)) reinterpret_cast_result;
Sam Weinigce757a72010-01-16 21:21:01 +000014
15// CXXConstCastExpr
16const char *const_char_ptr_value;
Sam Weinigeb7f9612010-02-07 06:32:43 +000017typedef __typeof__(const_cast<char *>(const_char_ptr_value)) const_cast_result;
Sam Weinigce757a72010-01-16 21:21:01 +000018
19// CXXFunctionalCastExpr
20int int_value;
Sam Weinigeb7f9612010-02-07 06:32:43 +000021typedef __typeof__(double(int_value)) functional_cast_result;
22
23// CXXBoolLiteralExpr
24typedef __typeof__(true) bool_literal_result;
25const bool true_value = true;
26const bool false_value = false;
27
28// CXXNullPtrLiteralExpr
29typedef __typeof__(nullptr) cxx_null_ptr_result;