diff options
Diffstat (limited to 'test/PCH/cxx_exprs.h')
-rw-r--r-- | test/PCH/cxx_exprs.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/test/PCH/cxx_exprs.h b/test/PCH/cxx_exprs.h new file mode 100644 index 0000000..b649428 --- /dev/null +++ b/test/PCH/cxx_exprs.h @@ -0,0 +1,21 @@ +// Header for PCH test cxx_exprs.cpp + +// CXXStaticCastExpr +typedef typeof(static_cast<void *>(0)) static_cast_result; + +// CXXDynamicCastExpr +struct Base { virtual void f(); }; +struct Derived : Base { }; +Base *base_ptr; +typedef typeof(dynamic_cast<Derived *>(base_ptr)) dynamic_cast_result; + +// CXXReinterpretCastExpr +typedef typeof(reinterpret_cast<void *>(0)) reinterpret_cast_result; + +// CXXConstCastExpr +const char *const_char_ptr_value; +typedef typeof(const_cast<char *>(const_char_ptr_value)) const_cast_result; + +// CXXFunctionalCastExpr +int int_value; +typedef typeof(double(int_value)) functional_cast_result; |