Coverage Report

Created: 2019-07-24 05:18

/Users/buildslave/jenkins/workspace/clang-stage2-coverage-R/llvm/tools/clang/include/clang/AST/BuiltinTypes.def
Line
Count
Source
1
853
//===-- BuiltinTypes.def - Metadata about BuiltinTypes ----------*- C++ -*-===//
2
853
//
3
853
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
853
// See https://llvm.org/LICENSE.txt for license information.
5
853
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
853
//
7
853
//===----------------------------------------------------------------------===//
8
853
//
9
853
//  This file defines the database about various builtin singleton types.
10
853
//
11
853
//  BuiltinType::Id is the enumerator defining the type.
12
853
//
13
853
//  Context.SingletonId is the global singleton of this type.  Some global
14
853
//  singletons are shared by multiple types.
15
853
//
16
853
//    BUILTIN_TYPE(Id, SingletonId) - A builtin type that has not been
17
853
//    covered by any other #define.  Defining this macro covers all
18
853
//    the builtins.
19
853
//
20
853
//    SIGNED_TYPE(Id, SingletonId) - A signed integral type.
21
853
//
22
853
//    UNSIGNED_TYPE(Id, SingletonId) - An unsigned integral type.
23
853
//
24
853
//    FLOATING_TYPE(Id, SingletonId) - A floating-point type.
25
853
//
26
853
//    PLACEHOLDER_TYPE(Id, SingletonId) - A placeholder type.  Placeholder
27
853
//    types are used to perform context-sensitive checking of specific
28
853
//    forms of expression.
29
853
//
30
853
//    SHARED_SINGLETON_TYPE(Expansion) - The given expansion corresponds
31
853
//    to a builtin which uses a shared singleton type.
32
853
//
33
853
//===----------------------------------------------------------------------===//
34
853
35
#ifndef SIGNED_TYPE
36
61.6M
#define SIGNED_TYPE(Id, SingletonId) BUILTIN_TYPE(Id, SingletonId)
37
#endif
38
39
#ifndef UNSIGNED_TYPE
40
75.3M
#define UNSIGNED_TYPE(Id, SingletonId) BUILTIN_TYPE(Id, SingletonId)
41
#endif
42
43
#ifndef FLOATING_TYPE
44
20.5M
#define FLOATING_TYPE(Id, SingletonId) BUILTIN_TYPE(Id, SingletonId)
45
#endif
46
47
#ifndef PLACEHOLDER_TYPE
48
41
#define PLACEHOLDER_TYPE(Id, SingletonId) BUILTIN_TYPE(Id, SingletonId)
49
#endif
50
51
#ifndef SHARED_SINGLETON_TYPE
52
66.4M
#define SHARED_SINGLETON_TYPE(Expansion) Expansion
53
#endif
54
55
853
//===- Builtin Types ------------------------------------------------------===//
56
853
57
853
// void
58
3.42M
BUILTIN_TYPE(Void, VoidTy)
59
3.42M
60
3.42M
//===- Unsigned Types -----------------------------------------------------===//
61
3.42M
62
3.42M
// 'bool' in C++, '_Bool' in C99
63
16.6M
UNSIGNED_TYPE(Bool, BoolTy)
64
16.6M
65
16.6M
// 'char' for targets where it's unsigned
66
16.6M
SHARED_SINGLETON_TYPE16.6M
(UNSIGNED_TYPE(Char_U, CharTy))
67
16.6M
68
16.6M
// 'unsigned char', explicitly qualified
69
16.6M
UNSIGNED_TYPE(UChar, UnsignedCharTy)
70
16.6M
71
16.6M
// 'wchar_t' for targets where it's unsigned
72
16.6M
SHARED_SINGLETON_TYPE16.6M
(UNSIGNED_TYPE(WChar_U, WCharTy))
73
16.6M
74
16.6M
// 'char8_t' in C++20 (proposed)
75
16.6M
UNSIGNED_TYPE(Char8, Char8Ty)
76
16.6M
77
16.6M
// 'char16_t' in C++
78
16.6M
UNSIGNED_TYPE(Char16, Char16Ty)
79
16.6M
80
16.6M
// 'char32_t' in C++
81
16.6M
UNSIGNED_TYPE(Char32, Char32Ty)
82
16.6M
83
16.6M
// 'unsigned short'
84
16.6M
UNSIGNED_TYPE(UShort, UnsignedShortTy)
85
16.6M
86
16.6M
// 'unsigned int'
87
16.6M
UNSIGNED_TYPE(UInt, UnsignedIntTy)
88
16.6M
89
16.6M
// 'unsigned long'
90
16.6M
UNSIGNED_TYPE16.6M
(ULong, UnsignedLongTy)
91
16.6M
92
16.6M
// 'unsigned long long'
93
16.6M
UNSIGNED_TYPE16.6M
(ULongLong, UnsignedLongLongTy)
94
16.6M
95
16.6M
// '__uint128_t'
96
16.6M
UNSIGNED_TYPE(UInt128, UnsignedInt128Ty)
97
16.6M
98
16.6M
//===- Signed Types -------------------------------------------------------===//
99
16.6M
100
16.6M
// 'char' for targets where it's signed
101
16.6M
SHARED_SINGLETON_TYPE16.6M
(SIGNED_TYPE(Char_S, CharTy))
102
16.6M
103
16.6M
// 'signed char', explicitly qualified
104
16.6M
SIGNED_TYPE16.6M
(SChar, SignedCharTy)
105
16.6M
106
16.6M
// 'wchar_t' for targets where it's signed
107
16.6M
SHARED_SINGLETON_TYPE16.6M
(SIGNED_TYPE(WChar_S, WCharTy))
108
16.6M
109
16.6M
// 'short' or 'signed short'
110
16.6M
SIGNED_TYPE(Short, ShortTy)
111
16.6M
112
16.6M
// 'int' or 'signed int'
113
16.6M
SIGNED_TYPE(Int, IntTy)
114
16.6M
115
16.6M
// 'long' or 'signed long'
116
16.6M
SIGNED_TYPE16.6M
(Long, LongTy)
117
16.6M
118
16.6M
// 'long long' or 'signed long long'
119
16.6M
SIGNED_TYPE16.6M
(LongLong, LongLongTy)
120
16.6M
121
16.6M
// '__int128_t'
122
16.6M
SIGNED_TYPE(Int128, Int128Ty)
123
16.6M
124
16.6M
//===- Fixed point types --------------------------------------------------===//
125
16.6M
126
16.6M
// 'short _Accum'
127
16.6M
SIGNED_TYPE16.6M
(ShortAccum, ShortAccumTy)
128
16.6M
129
16.6M
// '_Accum'
130
16.6M
SIGNED_TYPE(Accum, AccumTy)
131
16.6M
132
16.6M
// 'long _Accum'
133
16.6M
SIGNED_TYPE(LongAccum, LongAccumTy)
134
16.6M
135
16.6M
// 'unsigned short _Accum'
136
16.6M
UNSIGNED_TYPE(UShortAccum, UnsignedShortAccumTy)
137
16.6M
138
16.6M
// 'unsigned _Accum'
139
16.6M
UNSIGNED_TYPE(UAccum, UnsignedAccumTy)
140
16.6M
141
16.6M
// 'unsigned long _Accum'
142
16.6M
UNSIGNED_TYPE(ULongAccum, UnsignedLongAccumTy)
143
16.6M
144
16.6M
// 'short _Fract'
145
16.6M
SIGNED_TYPE(ShortFract, ShortFractTy)
146
16.6M
147
16.6M
// '_Fract'
148
16.6M
SIGNED_TYPE(Fract, FractTy)
149
16.6M
150
16.6M
// 'long _Fract'
151
16.6M
SIGNED_TYPE(LongFract, LongFractTy)
152
16.6M
153
16.6M
// 'unsigned short _Fract'
154
16.6M
UNSIGNED_TYPE(UShortFract, UnsignedShortFractTy)
155
16.6M
156
16.6M
// 'unsigned _Fract'
157
16.6M
UNSIGNED_TYPE(UFract, UnsignedFractTy)
158
16.6M
159
16.6M
// 'unsigned long _Fract'
160
16.6M
UNSIGNED_TYPE(ULongFract, UnsignedLongFractTy)
161
16.6M
162
16.6M
// '_Sat short _Accum'
163
16.6M
SIGNED_TYPE(SatShortAccum, SatShortAccumTy)
164
16.6M
165
16.6M
// '_Sat _Accum'
166
16.6M
SIGNED_TYPE(SatAccum, SatAccumTy)
167
16.6M
168
16.6M
// '_Sat long _Accum'
169
16.6M
SIGNED_TYPE(SatLongAccum, SatLongAccumTy)
170
16.6M
171
16.6M
// '_Sat unsigned short _Accum'
172
16.6M
UNSIGNED_TYPE(SatUShortAccum, SatUnsignedShortAccumTy)
173
16.6M
174
16.6M
// '_Sat unsigned _Accum'
175
16.6M
UNSIGNED_TYPE(SatUAccum, SatUnsignedAccumTy)
176
16.6M
177
16.6M
// '_Sat unsigned long _Accum'
178
16.6M
UNSIGNED_TYPE(SatULongAccum, SatUnsignedLongAccumTy)
179
16.6M
180
16.6M
// '_Sat short _Fract'
181
16.6M
SIGNED_TYPE(SatShortFract, SatShortFractTy)
182
16.6M
183
16.6M
// '_Sat _Fract'
184
16.6M
SIGNED_TYPE(SatFract, SatFractTy)
185
16.6M
186
16.6M
// '_Sat long _Fract'
187
16.6M
SIGNED_TYPE(SatLongFract, SatLongFractTy)
188
16.6M
189
16.6M
// '_Sat unsigned short _Fract'
190
16.6M
UNSIGNED_TYPE(SatUShortFract, SatUnsignedShortFractTy)
191
16.6M
192
16.6M
// '_Sat unsigned _Fract'
193
16.6M
UNSIGNED_TYPE(SatUFract, SatUnsignedFractTy)
194
16.6M
195
16.6M
// '_Sat unsigned long _Fract'
196
16.6M
UNSIGNED_TYPE(SatULongFract, SatUnsignedLongFractTy)
197
16.6M
198
16.6M
//===- Floating point types -----------------------------------------------===//
199
16.6M
200
16.6M
// 'half' in OpenCL, '__fp16' in ARM NEON.
201
16.6M
FLOATING_TYPE(Half, HalfTy)
202
16.6M
203
16.6M
// 'float'
204
16.6M
FLOATING_TYPE(Float, FloatTy)
205
16.6M
206
16.6M
// 'double'
207
16.6M
FLOATING_TYPE(Double, DoubleTy)
208
16.6M
209
16.6M
// 'long double'
210
16.6M
FLOATING_TYPE16.6M
(LongDouble, LongDoubleTy)
211
16.6M
212
16.6M
// '_Float16'
213
16.6M
FLOATING_TYPE16.6M
(Float16, HalfTy)
214
16.6M
215
16.6M
// '__float128'
216
16.6M
FLOATING_TYPE(Float128, Float128Ty)
217
3.42M
218
3.42M
//===- Language-specific types --------------------------------------------===//
219
3.42M
220
3.42M
// This is the type of C++0x 'nullptr'.
221
3.42M
BUILTIN_TYPE(NullPtr, NullPtrTy)
222
3.42M
223
3.42M
// The primitive Objective C 'id' type.  The user-visible 'id'
224
3.42M
// type is a typedef of an ObjCObjectPointerType to an
225
3.42M
// ObjCObjectType with this as its base.  In fact, this only ever
226
3.42M
// shows up in an AST as the base type of an ObjCObjectType.
227
3.42M
BUILTIN_TYPE(ObjCId, ObjCBuiltinIdTy)
228
3.42M
229
3.42M
// The primitive Objective C 'Class' type.  The user-visible
230
3.42M
// 'Class' type is a typedef of an ObjCObjectPointerType to an
231
3.42M
// ObjCObjectType with this as its base.  In fact, this only ever
232
3.42M
// shows up in an AST as the base type of an ObjCObjectType.
233
3.42M
BUILTIN_TYPE3.42M
(ObjCClass, ObjCBuiltinClassTy)
234
3.42M
235
3.42M
// The primitive Objective C 'SEL' type.  The user-visible 'SEL'
236
3.42M
// type is a typedef of a PointerType to this.
237
3.42M
BUILTIN_TYPE(ObjCSel, ObjCBuiltinSelTy)
238
3.42M
239
3.42M
// OpenCL sampler_t.
240
3.42M
BUILTIN_TYPE3.42M
(OCLSampler, OCLSamplerTy)
241
3.42M
242
3.42M
// OpenCL event_t.
243
3.42M
BUILTIN_TYPE(OCLEvent, OCLEventTy)
244
3.42M
245
3.42M
// OpenCL clk_event_t.
246
3.42M
BUILTIN_TYPE(OCLClkEvent, OCLClkEventTy)
247
3.42M
248
3.42M
// OpenCL queue_t.
249
3.42M
BUILTIN_TYPE(OCLQueue, OCLQueueTy)
250
3.42M
251
3.42M
// OpenCL reserve_id_t.
252
3.42M
BUILTIN_TYPE(OCLReserveID, OCLReserveIDTy)
253
3.42M
254
3.42M
// This represents the type of an expression whose type is
255
3.42M
// totally unknown, e.g. 'T::foo'.  It is permitted for this to
256
3.42M
// appear in situations where the structure of the type is
257
3.42M
// theoretically deducible.
258
3.42M
BUILTIN_TYPE(Dependent, DependentTy)
259
59
260
59
// The type of an unresolved overload set.  A placeholder type.
261
59
// Expressions with this type have one of the following basic
262
59
// forms, with parentheses generally permitted:
263
59
//   foo          # possibly qualified, not if an implicit access
264
59
//   foo          # possibly qualified, not if an implicit access
265
59
//   &foo         # possibly qualified, not if an implicit access
266
59
//   x->foo       # only if might be a static member function
267
59
//   &x->foo      # only if might be a static member function
268
59
//   &Class::foo  # when a pointer-to-member; sub-expr also has this type
269
59
// OverloadExpr::find can be used to analyze the expression.
270
59
//
271
59
// Overload should be the first placeholder type, or else change
272
59
// BuiltinType::isNonOverloadPlaceholderType()
273
59
PLACEHOLDER_TYPE5
(Overload, OverloadTy)
274
5
275
5
// The type of a bound C++ non-static member function.
276
5
// A placeholder type.  Expressions with this type have one of the
277
5
// following basic forms:
278
5
//   foo          # if an implicit access
279
5
//   x->foo       # if only contains non-static members
280
25
PLACEHOLDER_TYPE(BoundMember, BoundMemberTy)
281
25
282
25
// The type of an expression which refers to a pseudo-object,
283
25
// such as those introduced by Objective C's @property or
284
25
// VS.NET's __property declarations.  A placeholder type.  The
285
25
// pseudo-object is actually accessed by emitting a call to
286
25
// some sort of function or method;  typically there is a pair
287
25
// of a setter and a getter, with the setter used if the
288
25
// pseudo-object reference is used syntactically as the
289
25
// left-hand-side of an assignment operator.
290
25
//
291
25
// A pseudo-object reference naming an Objective-C @property is
292
25
// always a dot access with a base of object-pointer type,
293
25
// e.g. 'x.foo'.
294
25
//
295
25
// In VS.NET, a __property declaration creates an implicit
296
25
// member with an associated name, which can then be named
297
25
// in any of the normal ways an ordinary member could be.
298
25
PLACEHOLDER_TYPE5
(PseudoObject, PseudoObjectTy)
299
5
300
5
// __builtin_any_type.  A placeholder type.  Useful for clients
301
5
// like debuggers that don't know what type to give something.
302
5
// Only a small number of operations are valid on expressions of
303
5
// unknown type, most notably explicit casts.
304
5
PLACEHOLDER_TYPE(UnknownAny, UnknownAnyTy)
305
5
306
5
PLACEHOLDER_TYPE(BuiltinFn, BuiltinFnTy)
307
5
308
5
// The type of a cast which, in ARC, would normally require a
309
5
// __bridge, but which might be okay depending on the immediate
310
5
// context.
311
5
PLACEHOLDER_TYPE(ARCUnbridgedCast, ARCUnbridgedCastTy)
312
5
313
5
// A placeholder type for OpenMP array sections.
314
5
PLACEHOLDER_TYPE(OMPArraySection, OMPArraySectionTy)
315
5
316
#ifdef LAST_BUILTIN_TYPE
317
LAST_BUILTIN_TYPE(OMPArraySection)
318
#undef LAST_BUILTIN_TYPE
319
#endif
320
321
5
#undef SHARED_SINGLETON_TYPE
322
5
#undef PLACEHOLDER_TYPE
323
5
#undef FLOATING_TYPE
324
5
#undef SIGNED_TYPE
325
5
#undef UNSIGNED_TYPE
326
5
#undef BUILTIN_TYPE