summaryrefslogtreecommitdiffstats
path: root/test/PCH/cxx_exprs.cpp
blob: 51269d57b147a9e128052d378a89279f7699c971 (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
// Test this without pch.
// RUN: %clang_cc1 -include %S/cxx_exprs.h -fsyntax-only -verify %s

// Test with pch.
// RUN: %clang_cc1 -x c++-header -emit-pch -o %t %S/cxx_exprs.h
// RUN: %clang_cc1 -include-pch %t -fsyntax-only -verify %s 

int integer;
double floating;
char character;

// CXXStaticCastExpr
static_cast_result void_ptr = &integer;

// CXXDynamicCastExpr
Derived *d;
dynamic_cast_result derived_ptr = d;

// CXXReinterpretCastExpr
reinterpret_cast_result void_ptr2 = &integer;

// CXXConstCastExpr
const_cast_result char_ptr = &character;

// CXXFunctionalCastExpr
functional_cast_result *double_ptr = &floating;
OpenPOWER on IntegriCloud