clang 8.0.0

ASTCommon.cpp
Go to the documentation of this file.
1 //===--- ASTCommon.cpp - Common stuff for ASTReader/ASTWriter----*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines common functions that both ASTReader and ASTWriter use.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #include "ASTCommon.h"
15 #include "clang/AST/DeclCXX.h"
16 #include "clang/AST/DeclObjC.h"
17 #include "clang/Basic/IdentifierTable.h"
18 #include "clang/Serialization/ASTDeserializationListener.h"
19 #include "llvm/Support/DJB.h"
20
21 using namespace clang;
22
23 // Give ASTDeserializationListener's VTable a home.
24 ASTDeserializationListener::~ASTDeserializationListener() { }
25
26 serialization::TypeIdx
27 serialization::TypeIdxFromBuiltin(const BuiltinType *BT) {
28 unsigned ID = 0;
29 switch (BT->getKind()) {
30 case BuiltinType::Void:
31 ID = PREDEF_TYPE_VOID_ID;
32 break;
33 case BuiltinType::Bool:
34 ID = PREDEF_TYPE_BOOL_ID;
35 break;
36 case BuiltinType::Char_U:
37 ID = PREDEF_TYPE_CHAR_U_ID;
38 break;
39 case BuiltinType::UChar:
40 ID = PREDEF_TYPE_UCHAR_ID;
41 break;
42 case BuiltinType::UShort:
43 ID = PREDEF_TYPE_USHORT_ID;
44 break;
45 case BuiltinType::UInt:
46 ID = PREDEF_TYPE_UINT_ID;
47 break;
48 case BuiltinType::ULong:
49 ID = PREDEF_TYPE_ULONG_ID;
50 break;
51 case BuiltinType::ULongLong:
52 ID = PREDEF_TYPE_ULONGLONG_ID;
53 break;
54 case BuiltinType::UInt128:
55 ID = PREDEF_TYPE_UINT128_ID;
56 break;
57 case BuiltinType::Char_S:
58 ID = PREDEF_TYPE_CHAR_S_ID;
59 break;
60 case BuiltinType::SChar:
61 ID = PREDEF_TYPE_SCHAR_ID;
62 break;
63 case BuiltinType::WChar_S:
64 case BuiltinType::WChar_U:
65 ID = PREDEF_TYPE_WCHAR_ID;
66 break;
67 case BuiltinType::Short:
68 ID = PREDEF_TYPE_SHORT_ID;
69 break;
70 case BuiltinType::Int:
71 ID = PREDEF_TYPE_INT_ID;
72 break;
73 case BuiltinType::Long:
74 ID = PREDEF_TYPE_LONG_ID;
75 break;
76 case BuiltinType::LongLong:
77 ID = PREDEF_TYPE_LONGLONG_ID;
78 break;
79 case BuiltinType::Int128:
80 ID = PREDEF_TYPE_INT128_ID;
81 break;
82 case BuiltinType::Half:
83 ID = PREDEF_TYPE_HALF_ID;
84 break;
85 case BuiltinType::Float:
86 ID = PREDEF_TYPE_FLOAT_ID;
87 break;
88 case BuiltinType::Double:
89 ID = PREDEF_TYPE_DOUBLE_ID;
90 break;
91 case BuiltinType::LongDouble:
92 ID = PREDEF_TYPE_LONGDOUBLE_ID;
93 break;
94 case BuiltinType::ShortAccum:
95 ID = PREDEF_TYPE_SHORT_ACCUM_ID;
96 break;
97 case BuiltinType::Accum:
98 ID = PREDEF_TYPE_ACCUM_ID;
99 break;
100 case BuiltinType::LongAccum:
101 ID = PREDEF_TYPE_LONG_ACCUM_ID;
102 break;
103 case BuiltinType::UShortAccum:
104 ID = PREDEF_TYPE_USHORT_ACCUM_ID;
105 break;
106 case BuiltinType::UAccum:
107 ID = PREDEF_TYPE_UACCUM_ID;
108 break;
109 case BuiltinType::ULongAccum:
110 ID = PREDEF_TYPE_ULONG_ACCUM_ID;
111 break;
112 case BuiltinType::ShortFract:
113 ID = PREDEF_TYPE_SHORT_FRACT_ID;
114 break;
115 case BuiltinType::Fract:
116 ID = PREDEF_TYPE_FRACT_ID;
117 break;
118 case BuiltinType::LongFract:
119 ID = PREDEF_TYPE_LONG_FRACT_ID;
120 break;
121 case BuiltinType::UShortFract:
122 ID = PREDEF_TYPE_USHORT_FRACT_ID;
123 break;
124 case BuiltinType::UFract:
125 ID = PREDEF_TYPE_UFRACT_ID;
126 break;
127 case BuiltinType::ULongFract:
128 ID = PREDEF_TYPE_ULONG_FRACT_ID;
129 break;
130 case BuiltinType::SatShortAccum:
131 ID = PREDEF_TYPE_SAT_SHORT_ACCUM_ID;
132 break;
133 case BuiltinType::SatAccum:
134 ID = PREDEF_TYPE_SAT_ACCUM_ID;
135 break;
136 case BuiltinType::SatLongAccum:
137 ID = PREDEF_TYPE_SAT_LONG_ACCUM_ID;
138 break;
139 case BuiltinType::SatUShortAccum:
140 ID = PREDEF_TYPE_SAT_USHORT_ACCUM_ID;
141 break;
142 case BuiltinType::SatUAccum:
143 ID = PREDEF_TYPE_SAT_UACCUM_ID;
144 break;
145 case BuiltinType::SatULongAccum:
146 ID = PREDEF_TYPE_SAT_ULONG_ACCUM_ID;
147 break;
148 case BuiltinType::SatShortFract:
149 ID = PREDEF_TYPE_SAT_SHORT_FRACT_ID;
150 break;
151 case BuiltinType::SatFract:
152 ID = PREDEF_TYPE_SAT_FRACT_ID;
153 break;
154 case BuiltinType::SatLongFract:
155 ID = PREDEF_TYPE_SAT_LONG_FRACT_ID;
156 break;
157 case BuiltinType::SatUShortFract:
158 ID = PREDEF_TYPE_SAT_USHORT_FRACT_ID;
159 break;
160 case BuiltinType::SatUFract:
161 ID = PREDEF_TYPE_SAT_UFRACT_ID;
162 break;
163 case BuiltinType::SatULongFract:
164 ID = PREDEF_TYPE_SAT_ULONG_FRACT_ID;
165 break;
166 case BuiltinType::Float16:
167 ID = PREDEF_TYPE_FLOAT16_ID;
168 break;
169 case BuiltinType::Float128:
170 ID = PREDEF_TYPE_FLOAT128_ID;
171 break;
172 case BuiltinType::NullPtr:
173 ID = PREDEF_TYPE_NULLPTR_ID;
174 break;
175 case BuiltinType::Char8:
176 ID = PREDEF_TYPE_CHAR8_ID;
177 break;
178 case BuiltinType::Char16:
179 ID = PREDEF_TYPE_CHAR16_ID;
180 break;
181 case BuiltinType::Char32:
182 ID = PREDEF_TYPE_CHAR32_ID;
183 break;
184 case BuiltinType::Overload:
185 ID = PREDEF_TYPE_OVERLOAD_ID;
186 break;
187 case BuiltinType::BoundMember:
188 ID = PREDEF_TYPE_BOUND_MEMBER;
189 break;
190 case BuiltinType::PseudoObject:
191 ID = PREDEF_TYPE_PSEUDO_OBJECT;
192 break;
193 case BuiltinType::Dependent:
194 ID = PREDEF_TYPE_DEPENDENT_ID;
195 break;
196 case BuiltinType::UnknownAny:
197 ID = PREDEF_TYPE_UNKNOWN_ANY;
198 break;
199 case BuiltinType::ARCUnbridgedCast:
200 ID = PREDEF_TYPE_ARC_UNBRIDGED_CAST;
201 break;
202 case BuiltinType::ObjCId:
203 ID = PREDEF_TYPE_OBJC_ID;
204 break;
205 case BuiltinType::ObjCClass:
206 ID = PREDEF_TYPE_OBJC_CLASS;
207 break;
208 case BuiltinType::ObjCSel:
209 ID = PREDEF_TYPE_OBJC_SEL;
210 break;
211 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
212 case BuiltinType::Id: \
213 ID = PREDEF_TYPE_##Id##_ID; \
214 break;
215 #include "clang/Basic/OpenCLImageTypes.def"
216 #define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
217 case BuiltinType::Id: \
218 ID = PREDEF_TYPE_##Id##_ID; \
219 break;
220 #include "clang/Basic/OpenCLExtensionTypes.def"
221 case BuiltinType::OCLSampler:
222 ID = PREDEF_TYPE_SAMPLER_ID;
223 break;
224 case BuiltinType::OCLEvent:
225 ID = PREDEF_TYPE_EVENT_ID;
226 break;
227 case BuiltinType::OCLClkEvent:
228 ID = PREDEF_TYPE_CLK_EVENT_ID;
229 break;
230 case BuiltinType::OCLQueue:
231 ID = PREDEF_TYPE_QUEUE_ID;
232 break;
233 case BuiltinType::OCLReserveID:
234 ID = PREDEF_TYPE_RESERVE_ID_ID;
235 break;
236 case BuiltinType::BuiltinFn:
237 ID = PREDEF_TYPE_BUILTIN_FN;
238 break;
239 case BuiltinType::OMPArraySection:
240 ID = PREDEF_TYPE_OMP_ARRAY_SECTION;
241 break;
242 }
243
244 return TypeIdx(ID);
245 }
246
247 unsigned serialization::ComputeHash(Selector Sel) {
248 unsigned N = Sel.getNumArgs();
249 if (N == 0)
250 ++N;
251 unsigned R = 5381;
252 for (unsigned I = 0; I != N; ++I)
253 if (IdentifierInfo *II = Sel.getIdentifierInfoForSlot(I))
254 R = llvm::djbHash(II->getName(), R);
255 return R;
256 }
257
258 const DeclContext *
259 serialization::getDefinitiveDeclContext(const DeclContext *DC) {
260 switch (DC->getDeclKind()) {
261 // These entities may have multiple definitions.
262 case Decl::TranslationUnit:
263 case Decl::ExternCContext:
264 case Decl::Namespace:
265 case Decl::LinkageSpec:
266 case Decl::Export:
267 return nullptr;
268
269 // C/C++ tag types can only be defined in one place.
270 case Decl::Enum:
271 case Decl::Record:
272 if (const TagDecl *Def = cast<TagDecl>(DC)->getDefinition())
273 return Def;
274 return nullptr;
275
276 // FIXME: These can be defined in one place... except special member
277 // functions and out-of-line definitions.
278 case Decl::CXXRecord:
279 case Decl::ClassTemplateSpecialization:
280 case Decl::ClassTemplatePartialSpecialization:
281 return nullptr;
282
283 // Each function, method, and block declaration is its own DeclContext.
284 case Decl::Function:
285 case Decl::CXXMethod:
286 case Decl::CXXConstructor:
287 case Decl::CXXDestructor:
288 case Decl::CXXConversion:
289 case Decl::ObjCMethod:
290 case Decl::Block:
291 case Decl::Captured:
292 // Objective C categories, category implementations, and class
293 // implementations can only be defined in one place.
294 case Decl::ObjCCategory:
295 case Decl::ObjCCategoryImpl:
296 case Decl::ObjCImplementation:
297 return DC;
298
299 case Decl::ObjCProtocol:
300 if (const ObjCProtocolDecl *Def
301 = cast<ObjCProtocolDecl>(DC)->getDefinition())
302 return Def;
303 return nullptr;
304
305 // FIXME: These are defined in one place, but properties in class extensions
306 // end up being back-patched into the main interface. See
307 // Sema::HandlePropertyInClassExtension for the offending code.
308 case Decl::ObjCInterface:
309 return nullptr;
310
311 default:
312 llvm_unreachable("Unhandled DeclContext in AST reader");
313 }
314
315 llvm_unreachable("Unhandled decl kind");
316 }
317
318 bool serialization::isRedeclarableDeclKind(unsigned Kind) {
319 switch (static_cast<Decl::Kind>(Kind)) {
320 case Decl::TranslationUnit:
321 case Decl::ExternCContext:
322 // Special case of a "merged" declaration.
323 return true;
324
325 case Decl::Namespace:
326 case Decl::NamespaceAlias:
327 case Decl::Typedef:
328 case Decl::TypeAlias:
329 case Decl::Enum:
330 case Decl::Record:
331 case Decl::CXXRecord:
332 case Decl::ClassTemplateSpecialization:
333 case Decl::ClassTemplatePartialSpecialization:
334 case Decl::VarTemplateSpecialization:
335 case Decl::VarTemplatePartialSpecialization:
336 case Decl::Function:
337 case Decl::CXXDeductionGuide:
338 case Decl::CXXMethod:
339 case Decl::CXXConstructor:
340 case Decl::CXXDestructor:
341 case Decl::CXXConversion:
342 case Decl::UsingShadow:
343 case Decl::ConstructorUsingShadow:
344 case Decl::Var:
345 case Decl::FunctionTemplate:
346 case Decl::ClassTemplate:
347 case Decl::VarTemplate:
348 case Decl::TypeAliasTemplate:
349 case Decl::ObjCProtocol:
350 case Decl::ObjCInterface:
351 case Decl::Empty:
352 return true;
353
354 // Never redeclarable.
355 case Decl::UsingDirective:
356 case Decl::Label:
357 case Decl::UnresolvedUsingTypename:
358 case Decl::TemplateTypeParm:
359 case Decl::EnumConstant:
360 case Decl::UnresolvedUsingValue:
361 case Decl::IndirectField:
362 case Decl::Field:
363 case Decl::MSProperty:
364 case Decl::ObjCIvar:
365 case Decl::ObjCAtDefsField:
366 case Decl::NonTypeTemplateParm:
367 case Decl::TemplateTemplateParm:
368 case Decl::Using:
369 case Decl::UsingPack:
370 case Decl::ObjCMethod:
371 case Decl::ObjCCategory:
372 case Decl::ObjCCategoryImpl:
373 case Decl::ObjCImplementation:
374 case Decl::ObjCProperty:
375 case Decl::ObjCCompatibleAlias:
376 case Decl::LinkageSpec:
377 case Decl::Export:
378 case Decl::ObjCPropertyImpl:
379 case Decl::PragmaComment:
380 case Decl::PragmaDetectMismatch:
381 case Decl::FileScopeAsm:
382 case Decl::AccessSpec:
383 case Decl::Friend:
384 case Decl::FriendTemplate:
385 case Decl::StaticAssert:
386 case Decl::Block:
387 case Decl::Captured:
388 case Decl::ClassScopeFunctionSpecialization:
389 case Decl::Import:
390 case Decl::OMPThreadPrivate:
391 case Decl::OMPRequires:
392 case Decl::OMPCapturedExpr:
393 case Decl::OMPDeclareReduction:
394 case Decl::BuiltinTemplate:
395 case Decl::Decomposition:
396 case Decl::Binding:
397 return false;
398
399 // These indirectly derive from Redeclarable<T> but are not actually
400 // redeclarable.
401 case Decl::ImplicitParam:
402 case Decl::ParmVar:
403 case Decl::ObjCTypeParam:
404 return false;
405 }
406
407 llvm_unreachable("Unhandled declaration kind");
408 }
409
410 bool serialization::needsAnonymousDeclarationNumber(const NamedDecl *D) {
411 // Friend declarations in dependent contexts aren't anonymous in the usual
412 // sense, but they cannot be found by name lookup in their semantic context
413 // (or indeed in any context), so we treat them as anonymous.
414 //
415 // This doesn't apply to friend tag decls; Sema makes those available to name
416 // lookup in the surrounding context.
417 if (D->getFriendObjectKind() &&
418 D->getLexicalDeclContext()->isDependentContext() && !isa<TagDecl>(D)) {
419 // For function templates and class templates, the template is numbered and
420 // not its pattern.
421 if (auto *FD = dyn_cast<FunctionDecl>(D))
422 return !FD->getDescribedFunctionTemplate();
423 if (auto *RD = dyn_cast<CXXRecordDecl>(D))
424 return !RD->getDescribedClassTemplate();
425 return true;
426 }
427
428 // At block scope, we number everything that we need to deduplicate, since we
429 // can't just use name matching to keep things lined up.
430 // FIXME: This is only necessary for an inline function or a template or
431 // similar.
432 if (D->getLexicalDeclContext()->isFunctionOrMethod()) {
433 if (auto *VD = dyn_cast<VarDecl>(D))
434 return VD->isStaticLocal();
435 // FIXME: What about CapturedDecls (and declarations nested within them)?
436 return isa<TagDecl>(D) || isa<BlockDecl>(D);
437 }
438
439 // Otherwise, we only care about anonymous class members / block-scope decls.
440 // FIXME: We need to handle lambdas and blocks within inline / templated
441 // variables too.
442 if (D->getDeclName() || !isa<CXXRecordDecl>(D->getLexicalDeclContext()))
443 return false;
444 return isa<TagDecl>(D) || isa<FieldDecl>(D);
445 }
clang::Builtin::ID
ID
Definition: Builtins.h:49
clang::serialization::PREDEF_TYPE_OBJC_SEL
The ObjC &#39;SEL&#39; type.
Definition: ASTBitCodes.h:889
clang::serialization::PREDEF_TYPE_UACCUM_ID
The &#39;unsigned _Accum&#39; type.
Definition: ASTBitCodes.h:955
clang::serialization::PREDEF_TYPE_USHORT_FRACT_ID
The &#39;unsigned short _Fract&#39; type.
Definition: ASTBitCodes.h:970
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:673
clang::serialization::isRedeclarableDeclKind
bool isRedeclarableDeclKind(unsigned Kind)
Determine whether the given declaration kind is redeclarable.
Definition: ASTCommon.cpp:318
clang::TagDecl::getDefinition
TagDecl * getDefinition() const
Returns the TagDecl that actually defines this struct/union/class/enum.
Definition: Decl.cpp:3900
clang::serialization::PREDEF_TYPE_FLOAT16_ID
The &#39;_Float16&#39; type.
Definition: ASTBitCodes.h:937
clang::serialization::PREDEF_TYPE_UINT_ID
The &#39;unsigned int&#39; type.
Definition: ASTBitCodes.h:823
clang::serialization::PREDEF_TYPE_LONGLONG_ID
The (signed) &#39;long long&#39; type.
Definition: ASTBitCodes.h:850
ASTDeserializationListener.h
clang::serialization::PREDEF_TYPE_BOOL_ID
The &#39;bool&#39; or &#39;_Bool&#39; type.
Definition: ASTBitCodes.h:811
clang::BuiltinType::getKind
Kind getKind() const
Definition: Type.h:2418
clang::serialization::PREDEF_TYPE_UNKNOWN_ANY
The &#39;unknown any&#39; placeholder type.
Definition: ASTBitCodes.h:892
clang::serialization::PREDEF_TYPE_BUILTIN_FN
The placeholder type for builtin functions.
Definition: ASTBitCodes.h:913
DeclObjC.h
clang::XRayInstrKind::Function
constexpr XRayInstrMask Function
Definition: XRayInstr.h:39
clang::serialization::PREDEF_TYPE_SHORT_FRACT_ID
The &#39;short _Fract&#39; type.
Definition: ASTBitCodes.h:961
clang::serialization::PREDEF_TYPE_FLOAT_ID
The &#39;float&#39; type.
Definition: ASTBitCodes.h:853
clang::serialization::PREDEF_TYPE_ARC_UNBRIDGED_CAST
ARC&#39;s unbridged-cast placeholder type.
Definition: ASTBitCodes.h:907
clang::serialization::PREDEF_TYPE_INT128_ID
The &#39;__int128_t&#39; type.
Definition: ASTBitCodes.h:871
clang::serialization::PREDEF_TYPE_CLK_EVENT_ID
OpenCL clk event type.
Definition: ASTBitCodes.h:919
clang::serialization::PREDEF_TYPE_CHAR32_ID
The C++ &#39;char32_t&#39; type.
Definition: ASTBitCodes.h:880
clang::serialization::getDefinitiveDeclContext
const DeclContext * getDefinitiveDeclContext(const DeclContext *DC)
Retrieve the "definitive" declaration that provides all of the visible entries for the given declarat...
Definition: ASTCommon.cpp:259
clang::NamedDecl::getDeclName
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Definition: Decl.h:298
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:58
clang::serialization::PREDEF_TYPE_CHAR_S_ID
The &#39;char&#39; type, when it is signed.
Definition: ASTBitCodes.h:832
clang::serialization::PREDEF_TYPE_ULONG_ID
The &#39;unsigned long&#39; type.
Definition: ASTBitCodes.h:826
clang::serialization::PREDEF_TYPE_SAT_UACCUM_ID
The &#39;_Sat unsigned _Accum&#39; type.
Definition: ASTBitCodes.h:991
clang::serialization::PREDEF_TYPE_ULONG_FRACT_ID
The &#39;unsigned long _Fract&#39; type.
Definition: ASTBitCodes.h:976
clang::serialization::PREDEF_TYPE_LONG_FRACT_ID
The &#39;long _Fract&#39; type.
Definition: ASTBitCodes.h:967
clang::serialization::PREDEF_TYPE_SHORT_ACCUM_ID
The &#39;short _Accum&#39; type.
Definition: ASTBitCodes.h:943
clang::serialization::PREDEF_TYPE_LONG_ACCUM_ID
The &#39;long _Accum&#39; type.
Definition: ASTBitCodes.h:949
clang::serialization::PREDEF_TYPE_USHORT_ACCUM_ID
The &#39;unsigned short _Accum&#39; type.
Definition: ASTBitCodes.h:952
ASTCommon.h
clang::ObjCProtocolDecl::getDefinition
ObjCProtocolDecl * getDefinition()
Retrieve the definition of this protocol, if any.
Definition: DeclObjC.h:2210
clang::serialization::PREDEF_TYPE_RESERVE_ID_ID
OpenCL reserve_id type.
Definition: ASTBitCodes.h:928
clang::serialization::PREDEF_TYPE_USHORT_ID
The &#39;unsigned short&#39; type.
Definition: ASTBitCodes.h:820
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2064
clang::Decl::getLexicalDeclContext
DeclContext * getLexicalDeclContext()
getLexicalDeclContext - The declaration context where this Decl was lexically declared (LexicalDC)...
Definition: DeclBase.h:821
clang::serialization::PREDEF_TYPE_SAT_SHORT_FRACT_ID
The &#39;_Sat short _Fract&#39; type.
Definition: ASTBitCodes.h:997
clang::serialization::PREDEF_TYPE_ULONG_ACCUM_ID
The &#39;unsigned long _Accum&#39; type.
Definition: ASTBitCodes.h:958
clang::serialization::PREDEF_TYPE_NULLPTR_ID
The type of &#39;nullptr&#39;.
Definition: ASTBitCodes.h:874
clang::serialization::PREDEF_TYPE_SAT_ULONG_FRACT_ID
The &#39;_Sat unsigned long _Fract&#39; type.
Definition: ASTBitCodes.h:1012
clang::serialization::PREDEF_TYPE_OMP_ARRAY_SECTION
The placeholder type for OpenMP array section.
Definition: ASTBitCodes.h:931
clang::serialization::PREDEF_TYPE_UINT128_ID
The &#39;__uint128_t&#39; type.
Definition: ASTBitCodes.h:868
clang::serialization::PREDEF_TYPE_SAMPLER_ID
OpenCL sampler type.
Definition: ASTBitCodes.h:922
clang::serialization::PREDEF_TYPE_CHAR_U_ID
The &#39;char&#39; type, when it is unsigned.
Definition: ASTBitCodes.h:814
Label
std::string Label
Definition: UsingDeclarationsSorter.cpp:70
clang::serialization::PREDEF_TYPE_SAT_LONG_FRACT_ID
The &#39;_Sat long _Fract&#39; type.
Definition: ASTBitCodes.h:1003
clang::serialization::PREDEF_TYPE_OVERLOAD_ID
The placeholder type for overloaded function sets.
Definition: ASTBitCodes.h:862
clang::serialization::PREDEF_TYPE_HALF_ID
The OpenCL &#39;half&#39; / ARM NEON __fp16 type.
Definition: ASTBitCodes.h:904
clang::serialization::PREDEF_TYPE_LONGDOUBLE_ID
The &#39;long double&#39; type.
Definition: ASTBitCodes.h:859
IdentifierTable.h
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
clang::DeclContext::isFunctionOrMethod
bool isFunctionOrMethod() const
Definition: DeclBase.h:1800
clang::DeclContext::isDependentContext
bool isDependentContext() const
Determines whether this context is dependent on a template parameter.
Definition: DeclBase.cpp:1078
clang::Selector::getNumArgs
unsigned getNumArgs() const
Definition: IdentifierTable.cpp:414
clang::Decl::getFriendObjectKind
FriendObjectKind getFriendObjectKind() const
Determines whether this declaration is the object of a friend declaration and, if so...
Definition: DeclBase.h:1104
clang::serialization::PREDEF_TYPE_SAT_ULONG_ACCUM_ID
The &#39;_Sat unsigned long _Accum&#39; type.
Definition: ASTBitCodes.h:994
clang::serialization::PREDEF_TYPE_BOUND_MEMBER
The placeholder type for bound member functions.
Definition: ASTBitCodes.h:895
clang::serialization::PREDEF_TYPE_SAT_SHORT_ACCUM_ID
The &#39;_Sat short _Accum&#39; type.
Definition: ASTBitCodes.h:979
clang::serialization::PREDEF_TYPE_ULONGLONG_ID
The &#39;unsigned long long&#39; type.
Definition: ASTBitCodes.h:829
clang::DeclContext::getDeclKind
Decl::Kind getDeclKind() const
Definition: DeclBase.h:1745
clang::serialization::PREDEF_TYPE_CHAR8_ID
The C++ &#39;char8_t&#39; type.
Definition: ASTBitCodes.h:940
Kind
Kind
Definition: ChrootChecker.cpp:29
clang::Selector::getIdentifierInfoForSlot
IdentifierInfo * getIdentifierInfoForSlot(unsigned argIndex) const
Retrieve the identifier at a given position in the selector.
Definition: IdentifierTable.cpp:425
clang::serialization::PREDEF_TYPE_SAT_UFRACT_ID
The &#39;_Sat unsigned _Fract&#39; type.
Definition: ASTBitCodes.h:1009
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3064
clang::serialization::PREDEF_TYPE_UCHAR_ID
The &#39;unsigned char&#39; type.
Definition: ASTBitCodes.h:817
clang::serialization::PREDEF_TYPE_LONG_ID
The (signed) &#39;long&#39; type.
Definition: ASTBitCodes.h:847
clang::serialization::PREDEF_TYPE_SHORT_ID
The (signed) &#39;short&#39; type.
Definition: ASTBitCodes.h:841
clang::serialization::PREDEF_TYPE_SAT_ACCUM_ID
The &#39;_Sat _Accum&#39; type.
Definition: ASTBitCodes.h:982
clang::serialization::TypeIdxFromBuiltin
TypeIdx TypeIdxFromBuiltin(const BuiltinType *BT)
Definition: ASTCommon.cpp:27
clang::serialization::PREDEF_TYPE_EVENT_ID
OpenCL event type.
Definition: ASTBitCodes.h:916
clang::serialization::PREDEF_TYPE_VOID_ID
The void type.
Definition: ASTBitCodes.h:808
clang::serialization::PREDEF_TYPE_SCHAR_ID
The &#39;signed char&#39; type.
Definition: ASTBitCodes.h:835
clang::serialization::ComputeHash
unsigned ComputeHash(Selector Sel)
Definition: ASTCommon.cpp:247
clang::serialization::PREDEF_TYPE_OBJC_ID
The ObjC &#39;id&#39; type.
Definition: ASTBitCodes.h:883
clang
Dataflow Directional Tag Classes.
Definition: CFGReachabilityAnalysis.h:22
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1262
clang::serialization::PREDEF_TYPE_ACCUM_ID
The &#39;_Accum&#39; type.
Definition: ASTBitCodes.h:946
clang::serialization::PREDEF_TYPE_QUEUE_ID
OpenCL queue type.
Definition: ASTBitCodes.h:925
clang::serialization::PREDEF_TYPE_FRACT_ID
The &#39;_Fract&#39; type.
Definition: ASTBitCodes.h:964
clang::serialization::PREDEF_TYPE_SAT_USHORT_ACCUM_ID
The &#39;_Sat unsigned short _Accum&#39; type.
Definition: ASTBitCodes.h:988
clang::serialization::PREDEF_TYPE_SAT_LONG_ACCUM_ID
The &#39;_Sat long _Accum&#39; type.
Definition: ASTBitCodes.h:985
clang::serialization::PREDEF_TYPE_DEPENDENT_ID
The placeholder type for dependent types.
Definition: ASTBitCodes.h:865
clang::serialization::PREDEF_TYPE_UFRACT_ID
The &#39;unsigned _Fract&#39; type.
Definition: ASTBitCodes.h:973
DeclCXX.h
Defines the C++ Decl subclasses, other than those for templates (found in DeclTemplate.h) and friends (in DeclFriend.h).
clang::serialization::PREDEF_TYPE_CHAR16_ID
The C++ &#39;char16_t&#39; type.
Definition: ASTBitCodes.h:877
clang::serialization::needsAnonymousDeclarationNumber
bool needsAnonymousDeclarationNumber(const NamedDecl *D)
Determine whether the given declaration needs an anonymous declaration number.
Definition: ASTCommon.cpp:410
clang::BuiltinType
This class is used for builtin types like &#39;int&#39;.
Definition: Type.h:2391
clang::serialization::PREDEF_TYPE_DOUBLE_ID
The &#39;double&#39; type.
Definition: ASTBitCodes.h:856
clang::serialization::PREDEF_TYPE_INT_ID
The (signed) &#39;int&#39; type.
Definition: ASTBitCodes.h:844
clang::serialization::PREDEF_TYPE_WCHAR_ID
The C++ &#39;wchar_t&#39; type.
Definition: ASTBitCodes.h:838
clang::serialization::PREDEF_TYPE_OBJC_CLASS
The ObjC &#39;Class&#39; type.
Definition: ASTBitCodes.h:886
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:249
clang::serialization::PREDEF_TYPE_SAT_USHORT_FRACT_ID
The &#39;_Sat unsigned short _Fract&#39; type.
Definition: ASTBitCodes.h:1006
clang::serialization::PREDEF_TYPE_SAT_FRACT_ID
The &#39;_Sat _Fract&#39; type.
Definition: ASTBitCodes.h:1000
clang::ASTDeserializationListener::~ASTDeserializationListener
virtual ~ASTDeserializationListener()
Definition: ASTCommon.cpp:24
clang::serialization::TypeIdx
A type index; the type ID with the qualifier bits removed.
Definition: ASTBitCodes.h:89
clang::serialization::PREDEF_TYPE_PSEUDO_OBJECT
The pseudo-object placeholder type.
Definition: ASTBitCodes.h:910
clang::serialization::PREDEF_TYPE_FLOAT128_ID
The &#39;__float128&#39; type.
Definition: ASTBitCodes.h:934