aboutsummaryrefslogtreecommitdiff
path: root/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp
blob: 1c6ef90c8b8861b800e5f9c9a0886d43ab08c970 (plain) (blame)
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
// RUN: %clang_cc1 %s -E -fms-compatibility

bool f() {
  // Check that operators still work before redefining them.
#if compl 0 bitand 1
  return true and false;
#endif
}

// All c++ keywords should be #define-able in ms mode.
// (operators like "and" aren't normally, the rest always is.)
#define and
#define and_eq
#define alignas
#define alignof
#define asm
#define auto
#define bitand
#define bitor
#define bool
#define break
#define case
#define catch
#define char
#define char16_t
#define char32_t
#define class
#define compl
#define const
#define constexpr
#define const_cast
#define continue
#define decltype
#define default
#define delete
#define double
#define dynamic_cast
#define else
#define enum
#define explicit
#define export
#define extern
#define false
#define float
#define for
#define friend
#define goto
#define if
#define inline
#define int
#define long
#define mutable
#define namespace
#define new
#define noexcept
#define not
#define not_eq
#define nullptr
#define operator
#define or
#define or_eq
#define private
#define protected
#define public
#define register
#define reinterpret_cast
#define return
#define short
#define signed
#define sizeof
#define static
#define static_assert
#define static_cast
#define struct
#define switch
#define template
#define this
#define thread_local
#define throw
#define true
#define try
#define typedef
#define typeid
#define typename
#define union
#define unsigned
#define using
#define virtual
#define void
#define volatile
#define wchar_t
#define while
#define xor
#define xor_eq

// Check this is all properly defined away.
and
and_eq
alignas
alignof
asm
auto
bitand
bitor
bool
break
case
catch
char
char16_t
char32_t
class
compl
const
constexpr
const_cast
continue
decltype
default
delete
double
dynamic_cast
else
enum
explicit
export
extern
false
float
for
friend
goto
if
inline
int
long
mutable
namespace
new
noexcept
not
not_eq
nullptr
operator
or
or_eq
private
protected
public
register
reinterpret_cast
return
short
signed
sizeof
static
static_assert
static_cast
struct
switch
template
this
thread_local
throw
true
try
typedef
typeid
typename
union
unsigned
using
virtual
void
volatile
wchar_t
while
xor
xor_eq