clang  14.0.0git
ASTContext.h
Go to the documentation of this file.
1 //===- ASTContext.h - Context to hold long-lived AST nodes ------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 /// \file
10 /// Defines the clang::ASTContext interface.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_CLANG_AST_ASTCONTEXT_H
15 #define LLVM_CLANG_AST_ASTCONTEXT_H
16 
18 #include "clang/AST/ASTFwd.h"
22 #include "clang/AST/Decl.h"
23 #include "clang/AST/DeclBase.h"
29 #include "clang/AST/TemplateName.h"
30 #include "clang/AST/Type.h"
32 #include "clang/Basic/AttrKinds.h"
34 #include "clang/Basic/LLVM.h"
36 #include "clang/Basic/Linkage.h"
42 #include "clang/Basic/Specifiers.h"
44 #include "clang/Basic/XRayLists.h"
45 #include "llvm/ADT/APSInt.h"
46 #include "llvm/ADT/ArrayRef.h"
47 #include "llvm/ADT/DenseMap.h"
48 #include "llvm/ADT/DenseSet.h"
49 #include "llvm/ADT/FoldingSet.h"
50 #include "llvm/ADT/IntrusiveRefCntPtr.h"
51 #include "llvm/ADT/MapVector.h"
52 #include "llvm/ADT/None.h"
53 #include "llvm/ADT/Optional.h"
54 #include "llvm/ADT/PointerIntPair.h"
55 #include "llvm/ADT/PointerUnion.h"
56 #include "llvm/ADT/SmallVector.h"
57 #include "llvm/ADT/StringMap.h"
58 #include "llvm/ADT/StringRef.h"
59 #include "llvm/ADT/TinyPtrVector.h"
60 #include "llvm/ADT/Triple.h"
61 #include "llvm/ADT/iterator_range.h"
62 #include "llvm/Support/AlignOf.h"
63 #include "llvm/Support/Allocator.h"
64 #include "llvm/Support/Casting.h"
65 #include "llvm/Support/Compiler.h"
66 #include "llvm/Support/TypeSize.h"
67 #include <cassert>
68 #include <cstddef>
69 #include <cstdint>
70 #include <iterator>
71 #include <memory>
72 #include <string>
73 #include <type_traits>
74 #include <utility>
75 #include <vector>
76 
77 namespace llvm {
78 
79 class APFixedPoint;
80 class FixedPointSemantics;
81 struct fltSemantics;
82 template <typename T, unsigned N> class SmallPtrSet;
83 
84 } // namespace llvm
85 
86 namespace clang {
87 
88 class APValue;
89 class ASTMutationListener;
90 class ASTRecordLayout;
91 class AtomicExpr;
92 class BlockExpr;
93 class BuiltinTemplateDecl;
94 class CharUnits;
95 class ConceptDecl;
96 class CXXABI;
97 class CXXConstructorDecl;
98 class CXXMethodDecl;
99 class CXXRecordDecl;
100 class DiagnosticsEngine;
101 class ParentMapContext;
102 class DynTypedNode;
103 class DynTypedNodeList;
104 class Expr;
105 enum class FloatModeKind;
106 class GlobalDecl;
107 class MangleContext;
108 class MangleNumberingContext;
109 class MemberSpecializationInfo;
110 class Module;
111 struct MSGuidDeclParts;
112 class ObjCCategoryDecl;
113 class ObjCCategoryImplDecl;
114 class ObjCContainerDecl;
115 class ObjCImplDecl;
116 class ObjCImplementationDecl;
117 class ObjCInterfaceDecl;
118 class ObjCIvarDecl;
119 class ObjCMethodDecl;
120 class ObjCPropertyDecl;
121 class ObjCPropertyImplDecl;
122 class ObjCProtocolDecl;
123 class ObjCTypeParamDecl;
124 class OMPTraitInfo;
125 struct ParsedTargetAttr;
126 class Preprocessor;
127 class StoredDeclsMap;
128 class TargetAttr;
129 class TargetInfo;
130 class TemplateDecl;
131 class TemplateParameterList;
132 class TemplateTemplateParmDecl;
133 class TemplateTypeParmDecl;
134 class UnresolvedSetIterator;
135 class UsingShadowDecl;
136 class VarTemplateDecl;
137 class VTableContextBase;
138 struct BlockVarCopyInit;
139 
140 namespace Builtin {
141 
142 class Context;
143 
144 } // namespace Builtin
145 
146 enum BuiltinTemplateKind : int;
147 enum OpenCLTypeKind : uint8_t;
148 
149 namespace comments {
150 
151 class FullComment;
152 
153 } // namespace comments
154 
155 namespace interp {
156 
157 class Context;
158 
159 } // namespace interp
160 
161 namespace serialization {
162 template <class> class AbstractTypeReader;
163 } // namespace serialization
164 
166  /// The alignment was not explicit in code.
167  None,
168 
169  /// The alignment comes from an alignment attribute on a typedef.
171 
172  /// The alignment comes from an alignment attribute on a record type.
174 
175  /// The alignment comes from an alignment attribute on a enum type.
177 };
178 
179 struct TypeInfo {
180  uint64_t Width = 0;
181  unsigned Align = 0;
183 
185  TypeInfo(uint64_t Width, unsigned Align,
190  }
191 };
192 
197 
204  }
205 };
206 
207 /// Holds long-lived AST nodes (such as types and decls) that can be
208 /// referred to throughout the semantic analysis of a file.
209 class ASTContext : public RefCountedBase<ASTContext> {
210  friend class NestedNameSpecifier;
211 
212  mutable SmallVector<Type *, 0> Types;
213  mutable llvm::FoldingSet<ExtQuals> ExtQualNodes;
214  mutable llvm::FoldingSet<ComplexType> ComplexTypes;
215  mutable llvm::FoldingSet<PointerType> PointerTypes;
216  mutable llvm::FoldingSet<AdjustedType> AdjustedTypes;
217  mutable llvm::FoldingSet<BlockPointerType> BlockPointerTypes;
218  mutable llvm::FoldingSet<LValueReferenceType> LValueReferenceTypes;
219  mutable llvm::FoldingSet<RValueReferenceType> RValueReferenceTypes;
220  mutable llvm::FoldingSet<MemberPointerType> MemberPointerTypes;
221  mutable llvm::ContextualFoldingSet<ConstantArrayType, ASTContext &>
222  ConstantArrayTypes;
223  mutable llvm::FoldingSet<IncompleteArrayType> IncompleteArrayTypes;
224  mutable std::vector<VariableArrayType*> VariableArrayTypes;
225  mutable llvm::FoldingSet<DependentSizedArrayType> DependentSizedArrayTypes;
226  mutable llvm::FoldingSet<DependentSizedExtVectorType>
227  DependentSizedExtVectorTypes;
228  mutable llvm::FoldingSet<DependentAddressSpaceType>
229  DependentAddressSpaceTypes;
230  mutable llvm::FoldingSet<VectorType> VectorTypes;
231  mutable llvm::FoldingSet<DependentVectorType> DependentVectorTypes;
232  mutable llvm::FoldingSet<ConstantMatrixType> MatrixTypes;
233  mutable llvm::FoldingSet<DependentSizedMatrixType> DependentSizedMatrixTypes;
234  mutable llvm::FoldingSet<FunctionNoProtoType> FunctionNoProtoTypes;
235  mutable llvm::ContextualFoldingSet<FunctionProtoType, ASTContext&>
236  FunctionProtoTypes;
237  mutable llvm::FoldingSet<DependentTypeOfExprType> DependentTypeOfExprTypes;
238  mutable llvm::FoldingSet<DependentDecltypeType> DependentDecltypeTypes;
239  mutable llvm::FoldingSet<TemplateTypeParmType> TemplateTypeParmTypes;
240  mutable llvm::FoldingSet<ObjCTypeParamType> ObjCTypeParamTypes;
241  mutable llvm::FoldingSet<SubstTemplateTypeParmType>
242  SubstTemplateTypeParmTypes;
243  mutable llvm::FoldingSet<SubstTemplateTypeParmPackType>
244  SubstTemplateTypeParmPackTypes;
245  mutable llvm::ContextualFoldingSet<TemplateSpecializationType, ASTContext&>
246  TemplateSpecializationTypes;
247  mutable llvm::FoldingSet<ParenType> ParenTypes;
248  mutable llvm::FoldingSet<UsingType> UsingTypes;
249  mutable llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
250  mutable llvm::FoldingSet<DependentNameType> DependentNameTypes;
251  mutable llvm::ContextualFoldingSet<DependentTemplateSpecializationType,
252  ASTContext&>
253  DependentTemplateSpecializationTypes;
254  llvm::FoldingSet<PackExpansionType> PackExpansionTypes;
255  mutable llvm::FoldingSet<ObjCObjectTypeImpl> ObjCObjectTypes;
256  mutable llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
257  mutable llvm::FoldingSet<DependentUnaryTransformType>
258  DependentUnaryTransformTypes;
259  mutable llvm::ContextualFoldingSet<AutoType, ASTContext&> AutoTypes;
260  mutable llvm::FoldingSet<DeducedTemplateSpecializationType>
261  DeducedTemplateSpecializationTypes;
262  mutable llvm::FoldingSet<AtomicType> AtomicTypes;
263  llvm::FoldingSet<AttributedType> AttributedTypes;
264  mutable llvm::FoldingSet<PipeType> PipeTypes;
265  mutable llvm::FoldingSet<BitIntType> BitIntTypes;
266  mutable llvm::FoldingSet<DependentBitIntType> DependentBitIntTypes;
267 
268  mutable llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
269  mutable llvm::FoldingSet<DependentTemplateName> DependentTemplateNames;
270  mutable llvm::FoldingSet<SubstTemplateTemplateParmStorage>
271  SubstTemplateTemplateParms;
272  mutable llvm::ContextualFoldingSet<SubstTemplateTemplateParmPackStorage,
273  ASTContext&>
274  SubstTemplateTemplateParmPacks;
275 
276  /// The set of nested name specifiers.
277  ///
278  /// This set is managed by the NestedNameSpecifier class.
279  mutable llvm::FoldingSet<NestedNameSpecifier> NestedNameSpecifiers;
280  mutable NestedNameSpecifier *GlobalNestedNameSpecifier = nullptr;
281 
282  /// A cache mapping from RecordDecls to ASTRecordLayouts.
283  ///
284  /// This is lazily created. This is intentionally not serialized.
285  mutable llvm::DenseMap<const RecordDecl*, const ASTRecordLayout*>
286  ASTRecordLayouts;
287  mutable llvm::DenseMap<const ObjCContainerDecl*, const ASTRecordLayout*>
288  ObjCLayouts;
289 
290  /// A cache from types to size and alignment information.
291  using TypeInfoMap = llvm::DenseMap<const Type *, struct TypeInfo>;
292  mutable TypeInfoMap MemoizedTypeInfo;
293 
294  /// A cache from types to unadjusted alignment information. Only ARM and
295  /// AArch64 targets need this information, keeping it separate prevents
296  /// imposing overhead on TypeInfo size.
297  using UnadjustedAlignMap = llvm::DenseMap<const Type *, unsigned>;
298  mutable UnadjustedAlignMap MemoizedUnadjustedAlign;
299 
300  /// A cache mapping from CXXRecordDecls to key functions.
301  llvm::DenseMap<const CXXRecordDecl*, LazyDeclPtr> KeyFunctions;
302 
303  /// Mapping from ObjCContainers to their ObjCImplementations.
304  llvm::DenseMap<ObjCContainerDecl*, ObjCImplDecl*> ObjCImpls;
305 
306  /// Mapping from ObjCMethod to its duplicate declaration in the same
307  /// interface.
308  llvm::DenseMap<const ObjCMethodDecl*,const ObjCMethodDecl*> ObjCMethodRedecls;
309 
310  /// Mapping from __block VarDecls to BlockVarCopyInit.
311  llvm::DenseMap<const VarDecl *, BlockVarCopyInit> BlockVarCopyInits;
312 
313  /// Mapping from GUIDs to the corresponding MSGuidDecl.
314  mutable llvm::FoldingSet<MSGuidDecl> MSGuidDecls;
315 
316  /// Mapping from APValues to the corresponding TemplateParamObjects.
317  mutable llvm::FoldingSet<TemplateParamObjectDecl> TemplateParamObjectDecls;
318 
319  /// A cache mapping a string value to a StringLiteral object with the same
320  /// value.
321  ///
322  /// This is lazily created. This is intentionally not serialized.
323  mutable llvm::StringMap<StringLiteral *> StringLiteralCache;
324 
325  /// MD5 hash of CUID. It is calculated when first used and cached by this
326  /// data member.
327  mutable std::string CUIDHash;
328 
329  /// Representation of a "canonical" template template parameter that
330  /// is used in canonical template names.
331  class CanonicalTemplateTemplateParm : public llvm::FoldingSetNode {
333 
334  public:
335  CanonicalTemplateTemplateParm(TemplateTemplateParmDecl *Parm)
336  : Parm(Parm) {}
337 
338  TemplateTemplateParmDecl *getParam() const { return Parm; }
339 
340  void Profile(llvm::FoldingSetNodeID &ID, const ASTContext &C) {
341  Profile(ID, C, Parm);
342  }
343 
344  static void Profile(llvm::FoldingSetNodeID &ID,
345  const ASTContext &C,
346  TemplateTemplateParmDecl *Parm);
347  };
348  mutable llvm::ContextualFoldingSet<CanonicalTemplateTemplateParm,
349  const ASTContext&>
350  CanonTemplateTemplateParms;
351 
352  TemplateTemplateParmDecl *
353  getCanonicalTemplateTemplateParmDecl(TemplateTemplateParmDecl *TTP) const;
354 
355  /// The typedef for the __int128_t type.
356  mutable TypedefDecl *Int128Decl = nullptr;
357 
358  /// The typedef for the __uint128_t type.
359  mutable TypedefDecl *UInt128Decl = nullptr;
360 
361  /// The typedef for the target specific predefined
362  /// __builtin_va_list type.
363  mutable TypedefDecl *BuiltinVaListDecl = nullptr;
364 
365  /// The typedef for the predefined \c __builtin_ms_va_list type.
366  mutable TypedefDecl *BuiltinMSVaListDecl = nullptr;
367 
368  /// The typedef for the predefined \c id type.
369  mutable TypedefDecl *ObjCIdDecl = nullptr;
370 
371  /// The typedef for the predefined \c SEL type.
372  mutable TypedefDecl *ObjCSelDecl = nullptr;
373 
374  /// The typedef for the predefined \c Class type.
375  mutable TypedefDecl *ObjCClassDecl = nullptr;
376 
377  /// The typedef for the predefined \c Protocol class in Objective-C.
378  mutable ObjCInterfaceDecl *ObjCProtocolClassDecl = nullptr;
379 
380  /// The typedef for the predefined 'BOOL' type.
381  mutable TypedefDecl *BOOLDecl = nullptr;
382 
383  // Typedefs which may be provided defining the structure of Objective-C
384  // pseudo-builtins
385  QualType ObjCIdRedefinitionType;
386  QualType ObjCClassRedefinitionType;
387  QualType ObjCSelRedefinitionType;
388 
389  /// The identifier 'bool'.
390  mutable IdentifierInfo *BoolName = nullptr;
391 
392  /// The identifier 'NSObject'.
393  mutable IdentifierInfo *NSObjectName = nullptr;
394 
395  /// The identifier 'NSCopying'.
396  IdentifierInfo *NSCopyingName = nullptr;
397 
398  /// The identifier '__make_integer_seq'.
399  mutable IdentifierInfo *MakeIntegerSeqName = nullptr;
400 
401  /// The identifier '__type_pack_element'.
402  mutable IdentifierInfo *TypePackElementName = nullptr;
403 
404  QualType ObjCConstantStringType;
405  mutable RecordDecl *CFConstantStringTagDecl = nullptr;
406  mutable TypedefDecl *CFConstantStringTypeDecl = nullptr;
407 
408  mutable QualType ObjCSuperType;
409 
410  QualType ObjCNSStringType;
411 
412  /// The typedef declaration for the Objective-C "instancetype" type.
413  TypedefDecl *ObjCInstanceTypeDecl = nullptr;
414 
415  /// The type for the C FILE type.
416  TypeDecl *FILEDecl = nullptr;
417 
418  /// The type for the C jmp_buf type.
419  TypeDecl *jmp_bufDecl = nullptr;
420 
421  /// The type for the C sigjmp_buf type.
422  TypeDecl *sigjmp_bufDecl = nullptr;
423 
424  /// The type for the C ucontext_t type.
425  TypeDecl *ucontext_tDecl = nullptr;
426 
427  /// Type for the Block descriptor for Blocks CodeGen.
428  ///
429  /// Since this is only used for generation of debug info, it is not
430  /// serialized.
431  mutable RecordDecl *BlockDescriptorType = nullptr;
432 
433  /// Type for the Block descriptor for Blocks CodeGen.
434  ///
435  /// Since this is only used for generation of debug info, it is not
436  /// serialized.
437  mutable RecordDecl *BlockDescriptorExtendedType = nullptr;
438 
439  /// Declaration for the CUDA cudaConfigureCall function.
440  FunctionDecl *cudaConfigureCallDecl = nullptr;
441 
442  /// Keeps track of all declaration attributes.
443  ///
444  /// Since so few decls have attrs, we keep them in a hash map instead of
445  /// wasting space in the Decl class.
446  llvm::DenseMap<const Decl*, AttrVec*> DeclAttrs;
447 
448  /// A mapping from non-redeclarable declarations in modules that were
449  /// merged with other declarations to the canonical declaration that they were
450  /// merged into.
451  llvm::DenseMap<Decl*, Decl*> MergedDecls;
452 
453  /// A mapping from a defining declaration to a list of modules (other
454  /// than the owning module of the declaration) that contain merged
455  /// definitions of that entity.
456  llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
457 
458  /// Initializers for a module, in order. Each Decl will be either
459  /// something that has a semantic effect on startup (such as a variable with
460  /// a non-constant initializer), or an ImportDecl (which recursively triggers
461  /// initialization of another module).
462  struct PerModuleInitializers {
463  llvm::SmallVector<Decl*, 4> Initializers;
464  llvm::SmallVector<uint32_t, 4> LazyInitializers;
465 
466  void resolve(ASTContext &Ctx);
467  };
468  llvm::DenseMap<Module*, PerModuleInitializers*> ModuleInitializers;
469 
470  ASTContext &this_() { return *this; }
471 
472 public:
473  /// A type synonym for the TemplateOrInstantiation mapping.
475  llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *>;
476 
477 private:
478  friend class ASTDeclReader;
479  friend class ASTReader;
480  friend class ASTWriter;
481  template <class> friend class serialization::AbstractTypeReader;
482  friend class CXXRecordDecl;
483  friend class IncrementalParser;
484 
485  /// A mapping to contain the template or declaration that
486  /// a variable declaration describes or was instantiated from,
487  /// respectively.
488  ///
489  /// For non-templates, this value will be NULL. For variable
490  /// declarations that describe a variable template, this will be a
491  /// pointer to a VarTemplateDecl. For static data members
492  /// of class template specializations, this will be the
493  /// MemberSpecializationInfo referring to the member variable that was
494  /// instantiated or specialized. Thus, the mapping will keep track of
495  /// the static data member templates from which static data members of
496  /// class template specializations were instantiated.
497  ///
498  /// Given the following example:
499  ///
500  /// \code
501  /// template<typename T>
502  /// struct X {
503  /// static T value;
504  /// };
505  ///
506  /// template<typename T>
507  /// T X<T>::value = T(17);
508  ///
509  /// int *x = &X<int>::value;
510  /// \endcode
511  ///
512  /// This mapping will contain an entry that maps from the VarDecl for
513  /// X<int>::value to the corresponding VarDecl for X<T>::value (within the
514  /// class template X) and will be marked TSK_ImplicitInstantiation.
515  llvm::DenseMap<const VarDecl *, TemplateOrSpecializationInfo>
516  TemplateOrInstantiation;
517 
518  /// Keeps track of the declaration from which a using declaration was
519  /// created during instantiation.
520  ///
521  /// The source and target declarations are always a UsingDecl, an
522  /// UnresolvedUsingValueDecl, or an UnresolvedUsingTypenameDecl.
523  ///
524  /// For example:
525  /// \code
526  /// template<typename T>
527  /// struct A {
528  /// void f();
529  /// };
530  ///
531  /// template<typename T>
532  /// struct B : A<T> {
533  /// using A<T>::f;
534  /// };
535  ///
536  /// template struct B<int>;
537  /// \endcode
538  ///
539  /// This mapping will contain an entry that maps from the UsingDecl in
540  /// B<int> to the UnresolvedUsingDecl in B<T>.
541  llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
542 
543  /// Like InstantiatedFromUsingDecl, but for using-enum-declarations. Maps
544  /// from the instantiated using-enum to the templated decl from whence it
545  /// came.
546  /// Note that using-enum-declarations cannot be dependent and
547  /// thus will never be instantiated from an "unresolved"
548  /// version thereof (as with using-declarations), so each mapping is from
549  /// a (resolved) UsingEnumDecl to a (resolved) UsingEnumDecl.
550  llvm::DenseMap<UsingEnumDecl *, UsingEnumDecl *>
551  InstantiatedFromUsingEnumDecl;
552 
553  /// Simlarly maps instantiated UsingShadowDecls to their origin.
554  llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
555  InstantiatedFromUsingShadowDecl;
556 
557  llvm::DenseMap<FieldDecl *, FieldDecl *> InstantiatedFromUnnamedFieldDecl;
558 
559  /// Mapping that stores the methods overridden by a given C++
560  /// member function.
561  ///
562  /// Since most C++ member functions aren't virtual and therefore
563  /// don't override anything, we store the overridden functions in
564  /// this map on the side rather than within the CXXMethodDecl structure.
565  using CXXMethodVector = llvm::TinyPtrVector<const CXXMethodDecl *>;
566  llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector> OverriddenMethods;
567 
568  /// Mapping from each declaration context to its corresponding
569  /// mangling numbering context (used for constructs like lambdas which
570  /// need to be consistently numbered for the mangler).
571  llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
572  MangleNumberingContexts;
573  llvm::DenseMap<const Decl *, std::unique_ptr<MangleNumberingContext>>
574  ExtraMangleNumberingContexts;
575 
576  /// Side-table of mangling numbers for declarations which rarely
577  /// need them (like static local vars).
578  llvm::MapVector<const NamedDecl *, unsigned> MangleNumbers;
579  llvm::MapVector<const VarDecl *, unsigned> StaticLocalNumbers;
580  /// Mapping the associated device lambda mangling number if present.
581  mutable llvm::DenseMap<const CXXRecordDecl *, unsigned>
582  DeviceLambdaManglingNumbers;
583 
584  /// Mapping that stores parameterIndex values for ParmVarDecls when
585  /// that value exceeds the bitfield size of ParmVarDeclBits.ParameterIndex.
586  using ParameterIndexTable = llvm::DenseMap<const VarDecl *, unsigned>;
587  ParameterIndexTable ParamIndices;
588 
589  ImportDecl *FirstLocalImport = nullptr;
590  ImportDecl *LastLocalImport = nullptr;
591 
592  TranslationUnitDecl *TUDecl = nullptr;
593  mutable ExternCContextDecl *ExternCContext = nullptr;
594  mutable BuiltinTemplateDecl *MakeIntegerSeqDecl = nullptr;
595  mutable BuiltinTemplateDecl *TypePackElementDecl = nullptr;
596 
597  /// The associated SourceManager object.
598  SourceManager &SourceMgr;
599 
600  /// The language options used to create the AST associated with
601  /// this ASTContext object.
602  LangOptions &LangOpts;
603 
604  /// NoSanitizeList object that is used by sanitizers to decide which
605  /// entities should not be instrumented.
606  std::unique_ptr<NoSanitizeList> NoSanitizeL;
607 
608  /// Function filtering mechanism to determine whether a given function
609  /// should be imbued with the XRay "always" or "never" attributes.
610  std::unique_ptr<XRayFunctionFilter> XRayFilter;
611 
612  /// ProfileList object that is used by the profile instrumentation
613  /// to decide which entities should be instrumented.
614  std::unique_ptr<ProfileList> ProfList;
615 
616  /// The allocator used to create AST objects.
617  ///
618  /// AST objects are never destructed; rather, all memory associated with the
619  /// AST objects will be released when the ASTContext itself is destroyed.
620  mutable llvm::BumpPtrAllocator BumpAlloc;
621 
622  /// Allocator for partial diagnostics.
624 
625  /// The current C++ ABI.
626  std::unique_ptr<CXXABI> ABI;
627  CXXABI *createCXXABI(const TargetInfo &T);
628 
629  /// The logical -> physical address space map.
630  const LangASMap *AddrSpaceMap = nullptr;
631 
632  /// Address space map mangling must be used with language specific
633  /// address spaces (e.g. OpenCL/CUDA)
634  bool AddrSpaceMapMangling;
635 
636  const TargetInfo *Target = nullptr;
637  const TargetInfo *AuxTarget = nullptr;
639  std::unique_ptr<interp::Context> InterpContext;
640  std::unique_ptr<ParentMapContext> ParentMapCtx;
641 
642  /// Keeps track of the deallocated DeclListNodes for future reuse.
643  DeclListNode *ListNodeFreeList = nullptr;
644 
645 public:
653 
654  /// Returns the clang bytecode interpreter context.
656 
657  /// Returns the dynamic AST node parent map context.
659 
660  // A traversal scope limits the parts of the AST visible to certain analyses.
661  // RecursiveASTVisitor only visits specified children of TranslationUnitDecl.
662  // getParents() will only observe reachable parent edges.
663  //
664  // The scope is defined by a set of "top-level" declarations which will be
665  // visible under the TranslationUnitDecl.
666  // Initially, it is the entire TU, represented by {getTranslationUnitDecl()}.
667  //
668  // After setTraversalScope({foo, bar}), the exposed AST looks like:
669  // TranslationUnitDecl
670  // - foo
671  // - ...
672  // - bar
673  // - ...
674  // All other siblings of foo and bar are pruned from the tree.
675  // (However they are still accessible via TranslationUnitDecl->decls())
676  //
677  // Changing the scope clears the parent cache, which is expensive to rebuild.
678  std::vector<Decl *> getTraversalScope() const { return TraversalScope; }
679  void setTraversalScope(const std::vector<Decl *> &);
680 
681  /// Forwards to get node parents from the ParentMapContext. New callers should
682  /// use ParentMapContext::getParents() directly.
683  template <typename NodeT> DynTypedNodeList getParents(const NodeT &Node);
684 
686  return PrintingPolicy;
687  }
688 
690  PrintingPolicy = Policy;
691  }
692 
693  SourceManager& getSourceManager() { return SourceMgr; }
694  const SourceManager& getSourceManager() const { return SourceMgr; }
695 
696  // Cleans up some of the data structures. This allows us to do cleanup
697  // normally done in the destructor earlier. Renders much of the ASTContext
698  // unusable, mostly the actual AST nodes, so should be called when we no
699  // longer need access to the AST.
700  void cleanup();
701 
702  llvm::BumpPtrAllocator &getAllocator() const {
703  return BumpAlloc;
704  }
705 
706  void *Allocate(size_t Size, unsigned Align = 8) const {
707  return BumpAlloc.Allocate(Size, Align);
708  }
709  template <typename T> T *Allocate(size_t Num = 1) const {
710  return static_cast<T *>(Allocate(Num * sizeof(T), alignof(T)));
711  }
712  void Deallocate(void *Ptr) const {}
713 
714  /// Allocates a \c DeclListNode or returns one from the \c ListNodeFreeList
715  /// pool.
717  if (DeclListNode *Alloc = ListNodeFreeList) {
718  ListNodeFreeList = Alloc->Rest.dyn_cast<DeclListNode*>();
719  Alloc->D = ND;
720  Alloc->Rest = nullptr;
721  return Alloc;
722  }
723  return new (*this) DeclListNode(ND);
724  }
725  /// Deallcates a \c DeclListNode by returning it to the \c ListNodeFreeList
726  /// pool.
728  N->Rest = ListNodeFreeList;
729  ListNodeFreeList = N;
730  }
731 
732  /// Return the total amount of physical memory allocated for representing
733  /// AST nodes and type information.
734  size_t getASTAllocatedMemory() const {
735  return BumpAlloc.getTotalMemory();
736  }
737 
738  /// Return the total memory used for various side tables.
739  size_t getSideTableAllocatedMemory() const;
740 
742  return DiagAllocator;
743  }
744 
745  const TargetInfo &getTargetInfo() const { return *Target; }
746  const TargetInfo *getAuxTargetInfo() const { return AuxTarget; }
747 
748  /// getIntTypeForBitwidth -
749  /// sets integer QualTy according to specified details:
750  /// bitwidth, signed/unsigned.
751  /// Returns empty type if there is no appropriate target types.
752  QualType getIntTypeForBitwidth(unsigned DestWidth,
753  unsigned Signed) const;
754 
755  /// getRealTypeForBitwidth -
756  /// sets floating point QualTy according to specified bitwidth.
757  /// Returns empty type if there is no appropriate target types.
758  QualType getRealTypeForBitwidth(unsigned DestWidth,
759  FloatModeKind ExplicitType) const;
760 
761  bool AtomicUsesUnsupportedLibcall(const AtomicExpr *E) const;
762 
763  const LangOptions& getLangOpts() const { return LangOpts; }
764 
765  // If this condition is false, typo correction must be performed eagerly
766  // rather than delayed in many places, as it makes use of dependent types.
767  // the condition is false for clang's C-only codepath, as it doesn't support
768  // dependent types yet.
769  bool isDependenceAllowed() const {
770  return LangOpts.CPlusPlus || LangOpts.RecoveryAST;
771  }
772 
773  const NoSanitizeList &getNoSanitizeList() const { return *NoSanitizeL; }
774 
776  return *XRayFilter;
777  }
778 
779  const ProfileList &getProfileList() const { return *ProfList; }
780 
782 
784  return FullSourceLoc(Loc,SourceMgr);
785  }
786 
787  /// Return the C++ ABI kind that should be used. The C++ ABI can be overriden
788  /// at compile time with `-fc++-abi=`. If this is not provided, we instead use
789  /// the default ABI set by the target.
791 
792  /// All comments in this translation unit.
794 
795  /// True if comments are already loaded from ExternalASTSource.
796  mutable bool CommentsLoaded = false;
797 
798  /// Mapping from declaration to directly attached comment.
799  ///
800  /// Raw comments are owned by Comments list. This mapping is populated
801  /// lazily.
802  mutable llvm::DenseMap<const Decl *, const RawComment *> DeclRawComments;
803 
804  /// Mapping from canonical declaration to the first redeclaration in chain
805  /// that has a comment attached.
806  ///
807  /// Raw comments are owned by Comments list. This mapping is populated
808  /// lazily.
809  mutable llvm::DenseMap<const Decl *, const Decl *> RedeclChainComments;
810 
811  /// Keeps track of redeclaration chains that don't have any comment attached.
812  /// Mapping from canonical declaration to redeclaration chain that has no
813  /// comments attached to any redeclaration. Specifically it's mapping to
814  /// the last redeclaration we've checked.
815  ///
816  /// Shall not contain declarations that have comments attached to any
817  /// redeclaration in their chain.
818  mutable llvm::DenseMap<const Decl *, const Decl *> CommentlessRedeclChains;
819 
820  /// Mapping from declarations to parsed comments attached to any
821  /// redeclaration.
822  mutable llvm::DenseMap<const Decl *, comments::FullComment *> ParsedComments;
823 
824  /// Attaches \p Comment to \p OriginalD and to its redeclaration chain
825  /// and removes the redeclaration chain from the set of commentless chains.
826  ///
827  /// Don't do anything if a comment has already been attached to \p OriginalD
828  /// or its redeclaration chain.
829  void cacheRawCommentForDecl(const Decl &OriginalD,
830  const RawComment &Comment) const;
831 
832  /// \returns searches \p CommentsInFile for doc comment for \p D.
833  ///
834  /// \p RepresentativeLocForDecl is used as a location for searching doc
835  /// comments. \p CommentsInFile is a mapping offset -> comment of files in the
836  /// same file where \p RepresentativeLocForDecl is.
838  const Decl *D, const SourceLocation RepresentativeLocForDecl,
839  const std::map<unsigned, RawComment *> &CommentsInFile) const;
840 
841  /// Return the documentation comment attached to a given declaration,
842  /// without looking into cache.
844 
845 public:
846  void addComment(const RawComment &RC);
847 
848  /// Return the documentation comment attached to a given declaration.
849  /// Returns nullptr if no comment is attached.
850  ///
851  /// \param OriginalDecl if not nullptr, is set to declaration AST node that
852  /// had the comment, if the comment we found comes from a redeclaration.
853  const RawComment *
855  const Decl **OriginalDecl = nullptr) const;
856 
857  /// Searches existing comments for doc comments that should be attached to \p
858  /// Decls. If any doc comment is found, it is parsed.
859  ///
860  /// Requirement: All \p Decls are in the same file.
861  ///
862  /// If the last comment in the file is already attached we assume
863  /// there are not comments left to be attached to \p Decls.
865  const Preprocessor *PP);
866 
867  /// Return parsed documentation comment attached to a given declaration.
868  /// Returns nullptr if no comment is attached.
869  ///
870  /// \param PP the Preprocessor used with this TU. Could be nullptr if
871  /// preprocessor is not available.
873  const Preprocessor *PP) const;
874 
875  /// Return parsed documentation comment attached to a given declaration.
876  /// Returns nullptr if no comment is attached. Does not look at any
877  /// redeclarations of the declaration.
879 
881  const Decl *D) const;
882 
883 private:
884  mutable comments::CommandTraits CommentCommandTraits;
885 
886  /// Iterator that visits import declarations.
887  class import_iterator {
888  ImportDecl *Import = nullptr;
889 
890  public:
891  using value_type = ImportDecl *;
892  using reference = ImportDecl *;
893  using pointer = ImportDecl *;
894  using difference_type = int;
895  using iterator_category = std::forward_iterator_tag;
896 
897  import_iterator() = default;
898  explicit import_iterator(ImportDecl *Import) : Import(Import) {}
899 
900  reference operator*() const { return Import; }
901  pointer operator->() const { return Import; }
902 
903  import_iterator &operator++() {
904  Import = ASTContext::getNextLocalImport(Import);
905  return *this;
906  }
907 
908  import_iterator operator++(int) {
909  import_iterator Other(*this);
910  ++(*this);
911  return Other;
912  }
913 
914  friend bool operator==(import_iterator X, import_iterator Y) {
915  return X.Import == Y.Import;
916  }
917 
918  friend bool operator!=(import_iterator X, import_iterator Y) {
919  return X.Import != Y.Import;
920  }
921  };
922 
923 public:
925  return CommentCommandTraits;
926  }
927 
928  /// Retrieve the attributes for the given declaration.
929  AttrVec& getDeclAttrs(const Decl *D);
930 
931  /// Erase the attributes corresponding to the given declaration.
932  void eraseDeclAttrs(const Decl *D);
933 
934  /// If this variable is an instantiated static data member of a
935  /// class template specialization, returns the templated static data member
936  /// from which it was instantiated.
937  // FIXME: Remove ?
939  const VarDecl *Var);
940 
941  /// Note that the static data member \p Inst is an instantiation of
942  /// the static data member template \p Tmpl of a class template.
945  SourceLocation PointOfInstantiation = SourceLocation());
946 
949 
952 
953  /// If the given using decl \p Inst is an instantiation of
954  /// another (possibly unresolved) using decl, return it.
956 
957  /// Remember that the using decl \p Inst is an instantiation
958  /// of the using decl \p Pattern of a class template.
959  void setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern);
960 
961  /// If the given using-enum decl \p Inst is an instantiation of
962  /// another using-enum decl, return it.
964 
965  /// Remember that the using enum decl \p Inst is an instantiation
966  /// of the using enum decl \p Pattern of a class template.
968  UsingEnumDecl *Pattern);
969 
972  UsingShadowDecl *Pattern);
973 
975 
977 
978  // Access to the set of methods overridden by the given C++ method.
979  using overridden_cxx_method_iterator = CXXMethodVector::const_iterator;
981  overridden_methods_begin(const CXXMethodDecl *Method) const;
982 
984  overridden_methods_end(const CXXMethodDecl *Method) const;
985 
986  unsigned overridden_methods_size(const CXXMethodDecl *Method) const;
987 
989  llvm::iterator_range<overridden_cxx_method_iterator>;
990 
992 
993  /// Note that the given C++ \p Method overrides the given \p
994  /// Overridden method.
995  void addOverriddenMethod(const CXXMethodDecl *Method,
996  const CXXMethodDecl *Overridden);
997 
998  /// Return C++ or ObjC overridden methods for the given \p Method.
999  ///
1000  /// An ObjC method is considered to override any method in the class's
1001  /// base classes, its protocols, or its categories' protocols, that has
1002  /// the same selector and is of the same kind (class or instance).
1003  /// A method in an implementation is not considered as overriding the same
1004  /// method in the interface or its categories.
1005  void getOverriddenMethods(
1006  const NamedDecl *Method,
1007  SmallVectorImpl<const NamedDecl *> &Overridden) const;
1008 
1009  /// Notify the AST context that a new import declaration has been
1010  /// parsed or implicitly created within this translation unit.
1011  void addedLocalImportDecl(ImportDecl *Import);
1012 
1014  return Import->getNextLocalImport();
1015  }
1016 
1017  using import_range = llvm::iterator_range<import_iterator>;
1018 
1020  return import_range(import_iterator(FirstLocalImport), import_iterator());
1021  }
1022 
1024  Decl *Result = MergedDecls.lookup(D);
1025  return Result ? Result : D;
1026  }
1027  void setPrimaryMergedDecl(Decl *D, Decl *Primary) {
1028  MergedDecls[D] = Primary;
1029  }
1030 
1031  /// Note that the definition \p ND has been merged into module \p M,
1032  /// and should be visible whenever \p M is visible.
1034  bool NotifyListeners = true);
1035 
1036  /// Clean up the merged definition list. Call this if you might have
1037  /// added duplicates into the list.
1039 
1040  /// Get the additional modules in which the definition \p Def has
1041  /// been merged.
1043 
1044  /// Add a declaration to the list of declarations that are initialized
1045  /// for a module. This will typically be a global variable (with internal
1046  /// linkage) that runs module initializers, such as the iostream initializer,
1047  /// or an ImportDecl nominating another module that has initializers.
1048  void addModuleInitializer(Module *M, Decl *Init);
1049 
1051 
1052  /// Get the initializations to perform when importing a module, if any.
1054 
1056  return TUDecl->getMostRecentDecl();
1057  }
1059  assert(!TUDecl || TUKind == TU_Incremental);
1061  if (TraversalScope.empty() || TraversalScope.back() == TUDecl)
1062  TraversalScope = {NewTUDecl};
1063  if (TUDecl)
1064  NewTUDecl->setPreviousDecl(TUDecl);
1065  TUDecl = NewTUDecl;
1066  }
1067 
1071 
1072  // Builtin Types.
1076  CanQualType WCharTy; // [C++ 3.9.1p5].
1077  CanQualType WideCharTy; // Same as WCharTy in C++, integer type in C99.
1078  CanQualType WIntTy; // [C99 7.24.1], integer type unchanged by default promotions.
1079  CanQualType Char8Ty; // [C++20 proposal]
1080  CanQualType Char16Ty; // [C++0x 3.9.1p5], integer type in C99.
1081  CanQualType Char32Ty; // [C++0x 3.9.1p5], integer type in C99.
1087  LongAccumTy; // ISO/IEC JTC1 SC22 WG14 N1169 Extension
1097  CanQualType HalfTy; // [OpenCL 6.1.1.1], ARM NEON
1099  CanQualType Float16Ty; // C11 extension ISO/IEC TS 18661-3
1106 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \
1107  CanQualType SingletonId;
1108 #include "clang/Basic/OpenCLImageTypes.def"
1113 #define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \
1114  CanQualType Id##Ty;
1115 #include "clang/Basic/OpenCLExtensionTypes.def"
1116 #define SVE_TYPE(Name, Id, SingletonId) \
1117  CanQualType SingletonId;
1118 #include "clang/Basic/AArch64SVEACLETypes.def"
1119 #define PPC_VECTOR_TYPE(Name, Id, Size) \
1120  CanQualType Id##Ty;
1121 #include "clang/Basic/PPCTypes.def"
1122 #define RVV_TYPE(Name, Id, SingletonId) \
1123  CanQualType SingletonId;
1124 #include "clang/Basic/RISCVVTypes.def"
1125 
1126  // Types for deductions in C++0x [stmt.ranged]'s desugaring. Built on demand.
1127  mutable QualType AutoDeductTy; // Deduction against 'auto'.
1128  mutable QualType AutoRRefDeductTy; // Deduction against 'auto &&'.
1129 
1130  // Decl used to help define __builtin_va_list for some targets.
1131  // The decl is built when constructing 'BuiltinVaListDecl'.
1132  mutable Decl *VaListTagDecl = nullptr;
1133 
1134  // Implicitly-declared type 'struct _GUID'.
1135  mutable TagDecl *MSGuidTagDecl = nullptr;
1136 
1137  /// Keep track of CUDA/HIP device-side variables ODR-used by host code.
1139 
1141  SelectorTable &sels, Builtin::Context &builtins,
1143  ASTContext(const ASTContext &) = delete;
1144  ASTContext &operator=(const ASTContext &) = delete;
1145  ~ASTContext();
1146 
1147  /// Attach an external AST source to the AST context.
1148  ///
1149  /// The external AST source provides the ability to load parts of
1150  /// the abstract syntax tree as needed from some external storage,
1151  /// e.g., a precompiled header.
1153 
1154  /// Retrieve a pointer to the external AST source associated
1155  /// with this AST context, if any.
1157  return ExternalSource.get();
1158  }
1159 
1160  /// Attach an AST mutation listener to the AST context.
1161  ///
1162  /// The AST mutation listener provides the ability to track modifications to
1163  /// the abstract syntax tree entities committed after they were initially
1164  /// created.
1166  this->Listener = Listener;
1167  }
1168 
1169  /// Retrieve a pointer to the AST mutation listener associated
1170  /// with this AST context, if any.
1172 
1173  void PrintStats() const;
1174  const SmallVectorImpl<Type *>& getTypes() const { return Types; }
1175 
1177  const IdentifierInfo *II) const;
1178 
1179  /// Create a new implicit TU-level CXXRecordDecl or RecordDecl
1180  /// declaration.
1181  RecordDecl *buildImplicitRecord(StringRef Name,
1182  RecordDecl::TagKind TK = TTK_Struct) const;
1183 
1184  /// Create a new implicit TU-level typedef declaration.
1185  TypedefDecl *buildImplicitTypedef(QualType T, StringRef Name) const;
1186 
1187  /// Retrieve the declaration for the 128-bit signed integer type.
1188  TypedefDecl *getInt128Decl() const;
1189 
1190  /// Retrieve the declaration for the 128-bit unsigned integer type.
1191  TypedefDecl *getUInt128Decl() const;
1192 
1193  //===--------------------------------------------------------------------===//
1194  // Type Constructors
1195  //===--------------------------------------------------------------------===//
1196 
1197 private:
1198  /// Return a type with extended qualifiers.
1199  QualType getExtQualType(const Type *Base, Qualifiers Quals) const;
1200 
1201  QualType getTypeDeclTypeSlow(const TypeDecl *Decl) const;
1202 
1203  QualType getPipeType(QualType T, bool ReadOnly) const;
1204 
1205 public:
1206  /// Return the uniqued reference to the type for an address space
1207  /// qualified type with the specified type and address space.
1208  ///
1209  /// The resulting type has a union of the qualifiers from T and the address
1210  /// space. If T already has an address space specifier, it is silently
1211  /// replaced.
1212  QualType getAddrSpaceQualType(QualType T, LangAS AddressSpace) const;
1213 
1214  /// Remove any existing address space on the type and returns the type
1215  /// with qualifiers intact (or that's the idea anyway)
1216  ///
1217  /// The return type should be T with all prior qualifiers minus the address
1218  /// space.
1220 
1221  /// Apply Objective-C protocol qualifiers to the given type.
1222  /// \param allowOnPointerType specifies if we can apply protocol
1223  /// qualifiers on ObjCObjectPointerType. It can be set to true when
1224  /// constructing the canonical type of a Objective-C type parameter.
1226  ArrayRef<ObjCProtocolDecl *> protocols, bool &hasError,
1227  bool allowOnPointerType = false) const;
1228 
1229  /// Return the uniqued reference to the type for an Objective-C
1230  /// gc-qualified type.
1231  ///
1232  /// The resulting type has a union of the qualifiers from T and the gc
1233  /// attribute.
1235 
1236  /// Remove the existing address space on the type if it is a pointer size
1237  /// address space and return the type with qualifiers intact.
1239 
1240  /// Return the uniqued reference to the type for a \c restrict
1241  /// qualified type.
1242  ///
1243  /// The resulting type has a union of the qualifiers from \p T and
1244  /// \c restrict.
1247  }
1248 
1249  /// Return the uniqued reference to the type for a \c volatile
1250  /// qualified type.
1251  ///
1252  /// The resulting type has a union of the qualifiers from \p T and
1253  /// \c volatile.
1256  }
1257 
1258  /// Return the uniqued reference to the type for a \c const
1259  /// qualified type.
1260  ///
1261  /// The resulting type has a union of the qualifiers from \p T and \c const.
1262  ///
1263  /// It can be reasonably expected that this will always be equivalent to
1264  /// calling T.withConst().
1265  QualType getConstType(QualType T) const { return T.withConst(); }
1266 
1267  /// Change the ExtInfo on a function type.
1268  const FunctionType *adjustFunctionType(const FunctionType *Fn,
1269  FunctionType::ExtInfo EInfo);
1270 
1271  /// Adjust the given function result type.
1273 
1274  /// Change the result type of a function type once it is deduced.
1276 
1277  /// Get a function type and produce the equivalent function type with the
1278  /// specified exception specification. Type sugar that can be present on a
1279  /// declaration of a function with an exception specification is permitted
1280  /// and preserved. Other type sugar (for instance, typedefs) is not.
1283 
1284  /// Determine whether two function types are the same, ignoring
1285  /// exception specifications in cases where they're part of the type.
1287 
1288  /// Change the exception specification on a function once it is
1289  /// delay-parsed, instantiated, or computed.
1292  bool AsWritten = false);
1293 
1294  /// Get a function type and produce the equivalent function type where
1295  /// pointer size address spaces in the return type and parameter tyeps are
1296  /// replaced with the default address space.
1298 
1299  /// Determine whether two function types are the same, ignoring pointer sizes
1300  /// in the return type and parameter types.
1302 
1303  /// Return the uniqued reference to the type for a complex
1304  /// number with the specified element type.
1305  QualType getComplexType(QualType T) const;
1308  }
1309 
1310  /// Return the uniqued reference to the type for a pointer to
1311  /// the specified type.
1312  QualType getPointerType(QualType T) const;
1315  }
1316 
1317  /// Return the uniqued reference to a type adjusted from the original
1318  /// type to a new type.
1319  QualType getAdjustedType(QualType Orig, QualType New) const;
1322  getAdjustedType((QualType)Orig, (QualType)New));
1323  }
1324 
1325  /// Return the uniqued reference to the decayed version of the given
1326  /// type. Can only be called on array and function types which decay to
1327  /// pointer types.
1328  QualType getDecayedType(QualType T) const;
1331  }
1332 
1333  /// Return the uniqued reference to the atomic type for the specified
1334  /// type.
1335  QualType getAtomicType(QualType T) const;
1336 
1337  /// Return the uniqued reference to the type for a block of the
1338  /// specified type.
1340 
1341  /// Gets the struct used to keep track of the descriptor for pointer to
1342  /// blocks.
1344 
1345  /// Return a read_only pipe type for the specified type.
1347 
1348  /// Return a write_only pipe type for the specified type.
1350 
1351  /// Return a bit-precise integer type with the specified signedness and bit
1352  /// count.
1353  QualType getBitIntType(bool Unsigned, unsigned NumBits) const;
1354 
1355  /// Return a dependent bit-precise integer type with the specified signedness
1356  /// and bit count.
1357  QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const;
1358 
1359  /// Gets the struct used to keep track of the extended descriptor for
1360  /// pointer to blocks.
1362 
1363  /// Map an AST Type to an OpenCLTypeKind enum value.
1364  OpenCLTypeKind getOpenCLTypeKind(const Type *T) const;
1365 
1366  /// Get address space for OpenCL type.
1367  LangAS getOpenCLTypeAddrSpace(const Type *T) const;
1368 
1369  /// Returns default address space based on OpenCL version and enabled features
1371  return LangOpts.OpenCLGenericAddressSpace ? LangAS::opencl_generic
1373  }
1374 
1376  cudaConfigureCallDecl = FD;
1377  }
1378 
1380  return cudaConfigureCallDecl;
1381  }
1382 
1383  /// Returns true iff we need copy/dispose helpers for the given type.
1384  bool BlockRequiresCopying(QualType Ty, const VarDecl *D);
1385 
1386  /// Returns true, if given type has a known lifetime. HasByrefExtendedLayout
1387  /// is set to false in this case. If HasByrefExtendedLayout returns true,
1388  /// byref variable has extended lifetime.
1389  bool getByrefLifetime(QualType Ty,
1390  Qualifiers::ObjCLifetime &Lifetime,
1391  bool &HasByrefExtendedLayout) const;
1392 
1393  /// Return the uniqued reference to the type for an lvalue reference
1394  /// to the specified type.
1395  QualType getLValueReferenceType(QualType T, bool SpelledAsLValue = true)
1396  const;
1397 
1398  /// Return the uniqued reference to the type for an rvalue reference
1399  /// to the specified type.
1401 
1402  /// Return the uniqued reference to the type for a member pointer to
1403  /// the specified type in the specified class.
1404  ///
1405  /// The class \p Cls is a \c Type because it could be a dependent name.
1406  QualType getMemberPointerType(QualType T, const Type *Cls) const;
1407 
1408  /// Return a non-unique reference to the type for a variable array of
1409  /// the specified element type.
1410  QualType getVariableArrayType(QualType EltTy, Expr *NumElts,
1412  unsigned IndexTypeQuals,
1413  SourceRange Brackets) const;
1414 
1415  /// Return a non-unique reference to the type for a dependently-sized
1416  /// array of the specified element type.
1417  ///
1418  /// FIXME: We will need these to be uniqued, or at least comparable, at some
1419  /// point.
1422  unsigned IndexTypeQuals,
1423  SourceRange Brackets) const;
1424 
1425  /// Return a unique reference to the type for an incomplete array of
1426  /// the specified element type.
1429  unsigned IndexTypeQuals) const;
1430 
1431  /// Return the unique reference to the type for a constant array of
1432  /// the specified element type.
1433  QualType getConstantArrayType(QualType EltTy, const llvm::APInt &ArySize,
1434  const Expr *SizeExpr,
1436  unsigned IndexTypeQuals) const;
1437 
1438  /// Return a type for a constant array for a string literal of the
1439  /// specified element type and length.
1440  QualType getStringLiteralArrayType(QualType EltTy, unsigned Length) const;
1441 
1442  /// Returns a vla type where known sizes are replaced with [*].
1444 
1445  // Convenience struct to return information about a builtin vector type.
1448  llvm::ElementCount EC;
1449  unsigned NumVectors;
1451  unsigned NumVectors)
1453  };
1454 
1455  /// Returns the element type, element count and number of vectors
1456  /// (in case of tuple) for a builtin vector type.
1457  BuiltinVectorTypeInfo
1458  getBuiltinVectorTypeInfo(const BuiltinType *VecTy) const;
1459 
1460  /// Return the unique reference to a scalable vector type of the specified
1461  /// element type and scalable number of elements.
1462  ///
1463  /// \pre \p EltTy must be a built-in type.
1464  QualType getScalableVectorType(QualType EltTy, unsigned NumElts) const;
1465 
1466  /// Return the unique reference to a vector type of the specified
1467  /// element type and size.
1468  ///
1469  /// \pre \p VectorType must be a built-in type.
1470  QualType getVectorType(QualType VectorType, unsigned NumElts,
1471  VectorType::VectorKind VecKind) const;
1472  /// Return the unique reference to the type for a dependently sized vector of
1473  /// the specified element type.
1475  SourceLocation AttrLoc,
1476  VectorType::VectorKind VecKind) const;
1477 
1478  /// Return the unique reference to an extended vector type
1479  /// of the specified element type and size.
1480  ///
1481  /// \pre \p VectorType must be a built-in type.
1482  QualType getExtVectorType(QualType VectorType, unsigned NumElts) const;
1483 
1484  /// \pre Return a non-unique reference to the type for a dependently-sized
1485  /// vector of the specified element type.
1486  ///
1487  /// FIXME: We will need these to be uniqued, or at least comparable, at some
1488  /// point.
1490  Expr *SizeExpr,
1491  SourceLocation AttrLoc) const;
1492 
1493  /// Return the unique reference to the matrix type of the specified element
1494  /// type and size
1495  ///
1496  /// \pre \p ElementType must be a valid matrix element type (see
1497  /// MatrixType::isValidElementType).
1498  QualType getConstantMatrixType(QualType ElementType, unsigned NumRows,
1499  unsigned NumColumns) const;
1500 
1501  /// Return the unique reference to the matrix type of the specified element
1502  /// type and size
1503  QualType getDependentSizedMatrixType(QualType ElementType, Expr *RowExpr,
1504  Expr *ColumnExpr,
1505  SourceLocation AttrLoc) const;
1506 
1508  Expr *AddrSpaceExpr,
1509  SourceLocation AttrLoc) const;
1510 
1511  /// Return a K&R style C function type like 'int()'.
1513  const FunctionType::ExtInfo &Info) const;
1514 
1516  return getFunctionNoProtoType(ResultTy, FunctionType::ExtInfo());
1517  }
1518 
1519  /// Return a normal function type with a typed argument list.
1521  const FunctionProtoType::ExtProtoInfo &EPI) const {
1522  return getFunctionTypeInternal(ResultTy, Args, EPI, false);
1523  }
1524 
1526 
1527 private:
1528  /// Return a normal function type with a typed argument list.
1529  QualType getFunctionTypeInternal(QualType ResultTy, ArrayRef<QualType> Args,
1531  bool OnlyWantCanonical) const;
1532  QualType
1533  getAutoTypeInternal(QualType DeducedType, AutoTypeKeyword Keyword,
1534  bool IsDependent, bool IsPack = false,
1535  ConceptDecl *TypeConstraintConcept = nullptr,
1536  ArrayRef<TemplateArgument> TypeConstraintArgs = {},
1537  bool IsCanon = false) const;
1538 
1539 public:
1540  /// Return the unique reference to the type for the specified type
1541  /// declaration.
1543  const TypeDecl *PrevDecl = nullptr) const {
1544  assert(Decl && "Passed null for Decl param");
1545  if (Decl->TypeForDecl) return QualType(Decl->TypeForDecl, 0);
1546 
1547  if (PrevDecl) {
1548  assert(PrevDecl->TypeForDecl && "previous decl has no TypeForDecl");
1549  Decl->TypeForDecl = PrevDecl->TypeForDecl;
1550  return QualType(PrevDecl->TypeForDecl, 0);
1551  }
1552 
1553  return getTypeDeclTypeSlow(Decl);
1554  }
1555 
1556  QualType getUsingType(const UsingShadowDecl *Found,
1557  QualType Underlying) const;
1558 
1559  /// Return the unique reference to the type for the specified
1560  /// typedef-name decl.
1562  QualType Underlying = QualType()) const;
1563 
1564  QualType getRecordType(const RecordDecl *Decl) const;
1565 
1566  QualType getEnumType(const EnumDecl *Decl) const;
1567 
1568  QualType
1570 
1572 
1574  QualType modifiedType,
1575  QualType equivalentType);
1576 
1578  QualType Replacement) const;
1580  const TemplateTypeParmType *Replaced,
1581  const TemplateArgument &ArgPack);
1582 
1583  QualType
1584  getTemplateTypeParmType(unsigned Depth, unsigned Index,
1585  bool ParameterPack,
1586  TemplateTypeParmDecl *ParmDecl = nullptr) const;
1587 
1590  QualType Canon = QualType()) const;
1591 
1592  QualType
1594  ArrayRef<TemplateArgument> Args) const;
1595 
1597  const TemplateArgumentListInfo &Args,
1598  QualType Canon = QualType()) const;
1599 
1600  TypeSourceInfo *
1602  const TemplateArgumentListInfo &Args,
1603  QualType Canon = QualType()) const;
1604 
1605  QualType getParenType(QualType NamedType) const;
1606 
1608  const IdentifierInfo *MacroII) const;
1609 
1611  NestedNameSpecifier *NNS, QualType NamedType,
1612  TagDecl *OwnedTagDecl = nullptr) const;
1614  NestedNameSpecifier *NNS,
1615  const IdentifierInfo *Name,
1616  QualType Canon = QualType()) const;
1617 
1619  NestedNameSpecifier *NNS,
1620  const IdentifierInfo *Name,
1621  const TemplateArgumentListInfo &Args) const;
1624  const IdentifierInfo *Name, ArrayRef<TemplateArgument> Args) const;
1625 
1627 
1628  /// Get a template argument list with one argument per template parameter
1629  /// in a template parameter list, such as for the injected class name of
1630  /// a class template.
1633 
1634  /// Form a pack expansion type with the given pattern.
1635  /// \param NumExpansions The number of expansions for the pack, if known.
1636  /// \param ExpectPackInType If \c false, we should not expect \p Pattern to
1637  /// contain an unexpanded pack. This only makes sense if the pack
1638  /// expansion is used in a context where the arity is inferred from
1639  /// elsewhere, such as if the pattern contains a placeholder type or
1640  /// if this is the canonical type of another pack expansion type.
1642  Optional<unsigned> NumExpansions,
1643  bool ExpectPackInType = true);
1644 
1646  ObjCInterfaceDecl *PrevDecl = nullptr) const;
1647 
1648  /// Legacy interface: cannot provide type arguments or __kindof.
1650  ObjCProtocolDecl * const *Protocols,
1651  unsigned NumProtocols) const;
1652 
1654  ArrayRef<QualType> typeArgs,
1655  ArrayRef<ObjCProtocolDecl *> protocols,
1656  bool isKindOf) const;
1657 
1659  ArrayRef<ObjCProtocolDecl *> protocols) const;
1661  ObjCTypeParamDecl *New) const;
1662 
1664 
1665  /// QIdProtocolsAdoptObjCObjectProtocols - Checks that protocols in
1666  /// QT's qualified-id protocol list adopt all protocols in IDecl's list
1667  /// of protocols.
1669  ObjCInterfaceDecl *IDecl);
1670 
1671  /// Return a ObjCObjectPointerType type for the given ObjCObjectType.
1673 
1674  /// GCC extension.
1675  QualType getTypeOfExprType(Expr *e) const;
1676  QualType getTypeOfType(QualType t) const;
1677 
1678  QualType getReferenceQualifiedType(const Expr *e) const;
1679 
1680  /// C++11 decltype.
1681  QualType getDecltypeType(Expr *e, QualType UnderlyingType) const;
1682 
1683  /// Unary type transforms
1684  QualType getUnaryTransformType(QualType BaseType, QualType UnderlyingType,
1685  UnaryTransformType::UTTKind UKind) const;
1686 
1687  /// C++11 deduced auto type.
1689  bool IsDependent, bool IsPack = false,
1690  ConceptDecl *TypeConstraintConcept = nullptr,
1691  ArrayRef<TemplateArgument> TypeConstraintArgs ={}) const;
1692 
1693  /// C++11 deduction pattern for 'auto' type.
1694  QualType getAutoDeductType() const;
1695 
1696  /// C++11 deduction pattern for 'auto &&' type.
1697  QualType getAutoRRefDeductType() const;
1698 
1699  /// C++17 deduced class template specialization type.
1700  QualType getDeducedTemplateSpecializationType(TemplateName Template,
1701  QualType DeducedType,
1702  bool IsDependent) const;
1703 
1704  /// Return the unique reference to the type for the specified TagDecl
1705  /// (struct/union/class/enum) decl.
1706  QualType getTagDeclType(const TagDecl *Decl) const;
1707 
1708  /// Return the unique type for "size_t" (C99 7.17), defined in
1709  /// <stddef.h>.
1710  ///
1711  /// The sizeof operator requires this (C99 6.5.3.4p4).
1712  CanQualType getSizeType() const;
1713 
1714  /// Return the unique signed counterpart of
1715  /// the integer type corresponding to size_t.
1717 
1718  /// Return the unique type for "intmax_t" (C99 7.18.1.5), defined in
1719  /// <stdint.h>.
1720  CanQualType getIntMaxType() const;
1721 
1722  /// Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in
1723  /// <stdint.h>.
1724  CanQualType getUIntMaxType() const;
1725 
1726  /// Return the unique wchar_t type available in C++ (and available as
1727  /// __wchar_t as a Microsoft extension).
1728  QualType getWCharType() const { return WCharTy; }
1729 
1730  /// Return the type of wide characters. In C++, this returns the
1731  /// unique wchar_t type. In C99, this returns a type compatible with the type
1732  /// defined in <stddef.h> as defined by the target.
1734 
1735  /// Return the type of "signed wchar_t".
1736  ///
1737  /// Used when in C++, as a GCC extension.
1738  QualType getSignedWCharType() const;
1739 
1740  /// Return the type of "unsigned wchar_t".
1741  ///
1742  /// Used when in C++, as a GCC extension.
1744 
1745  /// In C99, this returns a type compatible with the type
1746  /// defined in <stddef.h> as defined by the target.
1747  QualType getWIntType() const { return WIntTy; }
1748 
1749  /// Return a type compatible with "intptr_t" (C99 7.18.1.4),
1750  /// as defined by the target.
1751  QualType getIntPtrType() const;
1752 
1753  /// Return a type compatible with "uintptr_t" (C99 7.18.1.4),
1754  /// as defined by the target.
1755  QualType getUIntPtrType() const;
1756 
1757  /// Return the unique type for "ptrdiff_t" (C99 7.17) defined in
1758  /// <stddef.h>. Pointer - pointer requires this (C99 6.5.6p9).
1759  QualType getPointerDiffType() const;
1760 
1761  /// Return the unique unsigned counterpart of "ptrdiff_t"
1762  /// integer type. The standard (C11 7.21.6.1p7) refers to this type
1763  /// in the definition of %tu format specifier.
1765 
1766  /// Return the unique type for "pid_t" defined in
1767  /// <sys/types.h>. We need this to compute the correct type for vfork().
1768  QualType getProcessIDType() const;
1769 
1770  /// Return the C structure type used to represent constant CFStrings.
1772 
1773  /// Returns the C struct type for objc_super
1774  QualType getObjCSuperType() const;
1775  void setObjCSuperType(QualType ST) { ObjCSuperType = ST; }
1776 
1777  /// Get the structure type used to representation CFStrings, or NULL
1778  /// if it hasn't yet been built.
1780  if (CFConstantStringTypeDecl)
1781  return getTypedefType(CFConstantStringTypeDecl);
1782  return QualType();
1783  }
1787 
1788  // This setter/getter represents the ObjC type for an NSConstantString.
1791  return ObjCConstantStringType;
1792  }
1793 
1795  return ObjCNSStringType;
1796  }
1797 
1799  ObjCNSStringType = T;
1800  }
1801 
1802  /// Retrieve the type that \c id has been defined to, which may be
1803  /// different from the built-in \c id if \c id has been typedef'd.
1805  if (ObjCIdRedefinitionType.isNull())
1806  return getObjCIdType();
1807  return ObjCIdRedefinitionType;
1808  }
1809 
1810  /// Set the user-written type that redefines \c id.
1812  ObjCIdRedefinitionType = RedefType;
1813  }
1814 
1815  /// Retrieve the type that \c Class has been defined to, which may be
1816  /// different from the built-in \c Class if \c Class has been typedef'd.
1818  if (ObjCClassRedefinitionType.isNull())
1819  return getObjCClassType();
1820  return ObjCClassRedefinitionType;
1821  }
1822 
1823  /// Set the user-written type that redefines 'SEL'.
1825  ObjCClassRedefinitionType = RedefType;
1826  }
1827 
1828  /// Retrieve the type that 'SEL' has been defined to, which may be
1829  /// different from the built-in 'SEL' if 'SEL' has been typedef'd.
1831  if (ObjCSelRedefinitionType.isNull())
1832  return getObjCSelType();
1833  return ObjCSelRedefinitionType;
1834  }
1835 
1836  /// Set the user-written type that redefines 'SEL'.
1838  ObjCSelRedefinitionType = RedefType;
1839  }
1840 
1841  /// Retrieve the identifier 'NSObject'.
1843  if (!NSObjectName) {
1844  NSObjectName = &Idents.get("NSObject");
1845  }
1846 
1847  return NSObjectName;
1848  }
1849 
1850  /// Retrieve the identifier 'NSCopying'.
1852  if (!NSCopyingName) {
1853  NSCopyingName = &Idents.get("NSCopying");
1854  }
1855 
1856  return NSCopyingName;
1857  }
1858 
1860 
1861  CanQualType getNSIntegerType() const;
1862 
1863  /// Retrieve the identifier 'bool'.
1865  if (!BoolName)
1866  BoolName = &Idents.get("bool");
1867  return BoolName;
1868  }
1869 
1871  if (!MakeIntegerSeqName)
1872  MakeIntegerSeqName = &Idents.get("__make_integer_seq");
1873  return MakeIntegerSeqName;
1874  }
1875 
1877  if (!TypePackElementName)
1878  TypePackElementName = &Idents.get("__type_pack_element");
1879  return TypePackElementName;
1880  }
1881 
1882  /// Retrieve the Objective-C "instancetype" type, if already known;
1883  /// otherwise, returns a NULL type;
1886  }
1887 
1888  /// Retrieve the typedef declaration corresponding to the Objective-C
1889  /// "instancetype" type.
1891 
1892  /// Set the type for the C FILE type.
1893  void setFILEDecl(TypeDecl *FILEDecl) { this->FILEDecl = FILEDecl; }
1894 
1895  /// Retrieve the C FILE type.
1897  if (FILEDecl)
1898  return getTypeDeclType(FILEDecl);
1899  return QualType();
1900  }
1901 
1902  /// Set the type for the C jmp_buf type.
1903  void setjmp_bufDecl(TypeDecl *jmp_bufDecl) {
1904  this->jmp_bufDecl = jmp_bufDecl;
1905  }
1906 
1907  /// Retrieve the C jmp_buf type.
1909  if (jmp_bufDecl)
1910  return getTypeDeclType(jmp_bufDecl);
1911  return QualType();
1912  }
1913 
1914  /// Set the type for the C sigjmp_buf type.
1915  void setsigjmp_bufDecl(TypeDecl *sigjmp_bufDecl) {
1916  this->sigjmp_bufDecl = sigjmp_bufDecl;
1917  }
1918 
1919  /// Retrieve the C sigjmp_buf type.
1921  if (sigjmp_bufDecl)
1922  return getTypeDeclType(sigjmp_bufDecl);
1923  return QualType();
1924  }
1925 
1926  /// Set the type for the C ucontext_t type.
1927  void setucontext_tDecl(TypeDecl *ucontext_tDecl) {
1928  this->ucontext_tDecl = ucontext_tDecl;
1929  }
1930 
1931  /// Retrieve the C ucontext_t type.
1933  if (ucontext_tDecl)
1934  return getTypeDeclType(ucontext_tDecl);
1935  return QualType();
1936  }
1937 
1938  /// The result type of logical operations, '<', '>', '!=', etc.
1940  return getLangOpts().CPlusPlus ? BoolTy : IntTy;
1941  }
1942 
1943  /// Emit the Objective-CC type encoding for the given type \p T into
1944  /// \p S.
1945  ///
1946  /// If \p Field is specified then record field names are also encoded.
1948  const FieldDecl *Field=nullptr,
1949  QualType *NotEncodedT=nullptr) const;
1950 
1951  /// Emit the Objective-C property type encoding for the given
1952  /// type \p T into \p S.
1954 
1955  void getLegacyIntegralTypeEncoding(QualType &t) const;
1956 
1957  /// Put the string version of the type qualifiers \p QT into \p S.
1959  std::string &S) const;
1960 
1961  /// Emit the encoded type for the function \p Decl into \p S.
1962  ///
1963  /// This is in the same format as Objective-C method encodings.
1964  ///
1965  /// \returns true if an error occurred (e.g., because one of the parameter
1966  /// types is incomplete), false otherwise.
1968 
1969  /// Emit the encoded type for the method declaration \p Decl into
1970  /// \p S.
1972  bool Extended = false) const;
1973 
1974  /// Return the encoded type for this block declaration.
1976 
1977  /// getObjCEncodingForPropertyDecl - Return the encoded type for
1978  /// this method declaration. If non-NULL, Container must be either
1979  /// an ObjCCategoryImplDecl or ObjCImplementationDecl; it should
1980  /// only be NULL when getting encodings for protocol properties.
1982  const Decl *Container) const;
1983 
1985  ObjCProtocolDecl *rProto) const;
1986 
1988  const ObjCPropertyDecl *PD,
1989  const Decl *Container) const;
1990 
1991  /// Return the size of type \p T for Objective-C encoding purpose,
1992  /// in characters.
1994 
1995  /// Retrieve the typedef corresponding to the predefined \c id type
1996  /// in Objective-C.
1997  TypedefDecl *getObjCIdDecl() const;
1998 
1999  /// Represents the Objective-CC \c id type.
2000  ///
2001  /// This is set up lazily, by Sema. \c id is always a (typedef for a)
2002  /// pointer type, a pointer to a struct.
2004  return getTypeDeclType(getObjCIdDecl());
2005  }
2006 
2007  /// Retrieve the typedef corresponding to the predefined 'SEL' type
2008  /// in Objective-C.
2009  TypedefDecl *getObjCSelDecl() const;
2010 
2011  /// Retrieve the type that corresponds to the predefined Objective-C
2012  /// 'SEL' type.
2014  return getTypeDeclType(getObjCSelDecl());
2015  }
2016 
2017  /// Retrieve the typedef declaration corresponding to the predefined
2018  /// Objective-C 'Class' type.
2019  TypedefDecl *getObjCClassDecl() const;
2020 
2021  /// Represents the Objective-C \c Class type.
2022  ///
2023  /// This is set up lazily, by Sema. \c Class is always a (typedef for a)
2024  /// pointer type, a pointer to a struct.
2027  }
2028 
2029  /// Retrieve the Objective-C class declaration corresponding to
2030  /// the predefined \c Protocol class.
2032 
2033  /// Retrieve declaration of 'BOOL' typedef
2035  return BOOLDecl;
2036  }
2037 
2038  /// Save declaration of 'BOOL' typedef
2040  BOOLDecl = TD;
2041  }
2042 
2043  /// type of 'BOOL' type.
2045  return getTypeDeclType(getBOOLDecl());
2046  }
2047 
2048  /// Retrieve the type of the Objective-C \c Protocol class.
2051  }
2052 
2053  /// Retrieve the C type declaration corresponding to the predefined
2054  /// \c __builtin_va_list type.
2056 
2057  /// Retrieve the type of the \c __builtin_va_list type.
2060  }
2061 
2062  /// Retrieve the C type declaration corresponding to the predefined
2063  /// \c __va_list_tag type used to help define the \c __builtin_va_list type
2064  /// for some targets.
2065  Decl *getVaListTagDecl() const;
2066 
2067  /// Retrieve the C type declaration corresponding to the predefined
2068  /// \c __builtin_ms_va_list type.
2070 
2071  /// Retrieve the type of the \c __builtin_ms_va_list type.
2074  }
2075 
2076  /// Retrieve the implicitly-predeclared 'struct _GUID' declaration.
2078 
2079  /// Retrieve the implicitly-predeclared 'struct _GUID' type.
2081  assert(MSGuidTagDecl && "asked for GUID type but MS extensions disabled");
2082  return getTagDeclType(MSGuidTagDecl);
2083  }
2084 
2085  /// Return whether a declaration to a builtin is allowed to be
2086  /// overloaded/redeclared.
2087  bool canBuiltinBeRedeclared(const FunctionDecl *) const;
2088 
2089  /// Return a type with additional \c const, \c volatile, or
2090  /// \c restrict qualifiers.
2091  QualType getCVRQualifiedType(QualType T, unsigned CVR) const {
2092  return getQualifiedType(T, Qualifiers::fromCVRMask(CVR));
2093  }
2094 
2095  /// Un-split a SplitQualType.
2097  return getQualifiedType(split.Ty, split.Quals);
2098  }
2099 
2100  /// Return a type with additional qualifiers.
2102  if (!Qs.hasNonFastQualifiers())
2103  return T.withFastQualifiers(Qs.getFastQualifiers());
2104  QualifierCollector Qc(Qs);
2105  const Type *Ptr = Qc.strip(T);
2106  return getExtQualType(Ptr, Qc);
2107  }
2108 
2109  /// Return a type with additional qualifiers.
2111  if (!Qs.hasNonFastQualifiers())
2112  return QualType(T, Qs.getFastQualifiers());
2113  return getExtQualType(T, Qs);
2114  }
2115 
2116  /// Return a type with the given lifetime qualifier.
2117  ///
2118  /// \pre Neither type.ObjCLifetime() nor \p lifetime may be \c OCL_None.
2120  Qualifiers::ObjCLifetime lifetime) {
2121  assert(type.getObjCLifetime() == Qualifiers::OCL_None);
2122  assert(lifetime != Qualifiers::OCL_None);
2123 
2124  Qualifiers qs;
2125  qs.addObjCLifetime(lifetime);
2126  return getQualifiedType(type, qs);
2127  }
2128 
2129  /// getUnqualifiedObjCPointerType - Returns version of
2130  /// Objective-C pointer type with lifetime qualifier removed.
2132  if (!type.getTypePtr()->isObjCObjectPointerType() ||
2133  !type.getQualifiers().hasObjCLifetime())
2134  return type;
2135  Qualifiers Qs = type.getQualifiers();
2136  Qs.removeObjCLifetime();
2137  return getQualifiedType(type.getUnqualifiedType(), Qs);
2138  }
2139 
2140  unsigned char getFixedPointScale(QualType Ty) const;
2141  unsigned char getFixedPointIBits(QualType Ty) const;
2142  llvm::FixedPointSemantics getFixedPointSemantics(QualType Ty) const;
2143  llvm::APFixedPoint getFixedPointMax(QualType Ty) const;
2144  llvm::APFixedPoint getFixedPointMin(QualType Ty) const;
2145 
2147  SourceLocation NameLoc) const;
2148 
2150  UnresolvedSetIterator End) const;
2152 
2154  bool TemplateKeyword,
2155  TemplateDecl *Template) const;
2156 
2158  const IdentifierInfo *Name) const;
2160  OverloadedOperatorKind Operator) const;
2162  TemplateName replacement) const;
2164  const TemplateArgument &ArgPack) const;
2165 
2167  /// No error
2169 
2170  /// Missing a type
2172 
2173  /// Missing a type from <stdio.h>
2175 
2176  /// Missing a type from <setjmp.h>
2178 
2179  /// Missing a type from <ucontext.h>
2181  };
2182 
2183  QualType DecodeTypeStr(const char *&Str, const ASTContext &Context,
2185  bool &RequireICE, bool AllowTypeModifiers) const;
2186 
2187  /// Return the type for the specified builtin.
2188  ///
2189  /// If \p IntegerConstantArgs is non-null, it is filled in with a bitmask of
2190  /// arguments to the builtin that are required to be integer constant
2191  /// expressions.
2192  QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error,
2193  unsigned *IntegerConstantArgs = nullptr) const;
2194 
2195  /// Types and expressions required to build C++2a three-way comparisons
2196  /// using operator<=>, including the values return by builtin <=> operators.
2198 
2199 private:
2200  CanQualType getFromTargetType(unsigned Type) const;
2201  TypeInfo getTypeInfoImpl(const Type *T) const;
2202 
2203  //===--------------------------------------------------------------------===//
2204  // Type Predicates.
2205  //===--------------------------------------------------------------------===//
2206 
2207 public:
2208  /// Return one of the GCNone, Weak or Strong Objective-C garbage
2209  /// collection attributes.
2211 
2212  /// Return true if the given vector types are of the same unqualified
2213  /// type or if they are equivalent to the same GCC vector type.
2214  ///
2215  /// \note This ignores whether they are target-specific (AltiVec or Neon)
2216  /// types.
2217  bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec);
2218 
2219  /// Return true if the given types are an SVE builtin and a VectorType that
2220  /// is a fixed-length representation of the SVE builtin for a specific
2221  /// vector-length.
2222  bool areCompatibleSveTypes(QualType FirstType, QualType SecondType);
2223 
2224  /// Return true if the given vector types are lax-compatible SVE vector types,
2225  /// false otherwise.
2226  bool areLaxCompatibleSveTypes(QualType FirstType, QualType SecondType);
2227 
2228  /// Return true if the type has been explicitly qualified with ObjC ownership.
2229  /// A type may be implicitly qualified with ownership under ObjC ARC, and in
2230  /// some cases the compiler treats these differently.
2231  bool hasDirectOwnershipQualifier(QualType Ty) const;
2232 
2233  /// Return true if this is an \c NSObject object with its \c NSObject
2234  /// attribute set.
2235  static bool isObjCNSObjectType(QualType Ty) {
2236  return Ty->isObjCNSObjectType();
2237  }
2238 
2239  //===--------------------------------------------------------------------===//
2240  // Type Sizing and Analysis
2241  //===--------------------------------------------------------------------===//
2242 
2243  /// Return the APFloat 'semantics' for the specified scalar floating
2244  /// point type.
2245  const llvm::fltSemantics &getFloatTypeSemantics(QualType T) const;
2246 
2247  /// Get the size and alignment of the specified complete type in bits.
2248  TypeInfo getTypeInfo(const Type *T) const;
2250 
2251  /// Get default simd alignment of the specified complete type in bits.
2252  unsigned getOpenMPDefaultSimdAlign(QualType T) const;
2253 
2254  /// Return the size of the specified (complete) type \p T, in bits.
2255  uint64_t getTypeSize(QualType T) const { return getTypeInfo(T).Width; }
2256  uint64_t getTypeSize(const Type *T) const { return getTypeInfo(T).Width; }
2257 
2258  /// Return the size of the character type, in bits.
2259  uint64_t getCharWidth() const {
2260  return getTypeSize(CharTy);
2261  }
2262 
2263  /// Convert a size in bits to a size in characters.
2264  CharUnits toCharUnitsFromBits(int64_t BitSize) const;
2265 
2266  /// Convert a size in characters to a size in bits.
2267  int64_t toBits(CharUnits CharSize) const;
2268 
2269  /// Return the size of the specified (complete) type \p T, in
2270  /// characters.
2272  CharUnits getTypeSizeInChars(const Type *T) const;
2273 
2275  if (Ty->isIncompleteType() || Ty->isDependentType())
2276  return None;
2277  return getTypeSizeInChars(Ty);
2278  }
2279 
2281  return getTypeSizeInCharsIfKnown(QualType(Ty, 0));
2282  }
2283 
2284  /// Return the ABI-specified alignment of a (complete) type \p T, in
2285  /// bits.
2286  unsigned getTypeAlign(QualType T) const { return getTypeInfo(T).Align; }
2287  unsigned getTypeAlign(const Type *T) const { return getTypeInfo(T).Align; }
2288 
2289  /// Return the ABI-specified natural alignment of a (complete) type \p T,
2290  /// before alignment adjustments, in bits.
2291  ///
2292  /// This alignment is curently used only by ARM and AArch64 when passing
2293  /// arguments of a composite type.
2294  unsigned getTypeUnadjustedAlign(QualType T) const {
2295  return getTypeUnadjustedAlign(T.getTypePtr());
2296  }
2297  unsigned getTypeUnadjustedAlign(const Type *T) const;
2298 
2299  /// Return the alignment of a type, in bits, or 0 if
2300  /// the type is incomplete and we cannot determine the alignment (for
2301  /// example, from alignment attributes). The returned alignment is the
2302  /// Preferred alignment if NeedsPreferredAlignment is true, otherwise is the
2303  /// ABI alignment.
2304  unsigned getTypeAlignIfKnown(QualType T,
2305  bool NeedsPreferredAlignment = false) const;
2306 
2307  /// Return the ABI-specified alignment of a (complete) type \p T, in
2308  /// characters.
2310  CharUnits getTypeAlignInChars(const Type *T) const;
2311 
2312  /// Return the PreferredAlignment of a (complete) type \p T, in
2313  /// characters.
2316  }
2317 
2318  /// getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type,
2319  /// in characters, before alignment adjustments. This method does not work on
2320  /// incomplete types.
2323 
2324  // getTypeInfoDataSizeInChars - Return the size of a type, in chars. If the
2325  // type is a record, its data size is returned.
2327 
2328  TypeInfoChars getTypeInfoInChars(const Type *T) const;
2330 
2331  /// Determine if the alignment the type has was required using an
2332  /// alignment attribute.
2333  bool isAlignmentRequired(const Type *T) const;
2334  bool isAlignmentRequired(QualType T) const;
2335 
2336  /// Return the "preferred" alignment of the specified type \p T for
2337  /// the current target, in bits.
2338  ///
2339  /// This can be different than the ABI alignment in cases where it is
2340  /// beneficial for performance or backwards compatibility preserving to
2341  /// overalign a data type. (Note: despite the name, the preferred alignment
2342  /// is ABI-impacting, and not an optimization.)
2343  unsigned getPreferredTypeAlign(QualType T) const {
2344  return getPreferredTypeAlign(T.getTypePtr());
2345  }
2346  unsigned getPreferredTypeAlign(const Type *T) const;
2347 
2348  /// Return the default alignment for __attribute__((aligned)) on
2349  /// this target, to be used if no alignment value is specified.
2351 
2352  /// Return the alignment in bits that should be given to a
2353  /// global variable with type \p T.
2354  unsigned getAlignOfGlobalVar(QualType T) const;
2355 
2356  /// Return the alignment in characters that should be given to a
2357  /// global variable with type \p T.
2359 
2360  /// Return a conservative estimate of the alignment of the specified
2361  /// decl \p D.
2362  ///
2363  /// \pre \p D must not be a bitfield type, as bitfields do not have a valid
2364  /// alignment.
2365  ///
2366  /// If \p ForAlignof, references are treated like their underlying type
2367  /// and large arrays don't get any special treatment. If not \p ForAlignof
2368  /// it computes the value expected by CodeGen: references are treated like
2369  /// pointers and large arrays get extra alignment.
2370  CharUnits getDeclAlign(const Decl *D, bool ForAlignof = false) const;
2371 
2372  /// Return the alignment (in bytes) of the thrown exception object. This is
2373  /// only meaningful for targets that allocate C++ exceptions in a system
2374  /// runtime, such as those using the Itanium C++ ABI.
2376 
2377  /// Get or compute information about the layout of the specified
2378  /// record (struct/union/class) \p D, which indicates its size and field
2379  /// position information.
2380  const ASTRecordLayout &getASTRecordLayout(const RecordDecl *D) const;
2381 
2382  /// Get or compute information about the layout of the specified
2383  /// Objective-C interface.
2385  const;
2386 
2387  void DumpRecordLayout(const RecordDecl *RD, raw_ostream &OS,
2388  bool Simple = false) const;
2389 
2390  /// Get or compute information about the layout of the specified
2391  /// Objective-C implementation.
2392  ///
2393  /// This may differ from the interface if synthesized ivars are present.
2394  const ASTRecordLayout &
2396 
2397  /// Get our current best idea for the key function of the
2398  /// given record decl, or nullptr if there isn't one.
2399  ///
2400  /// The key function is, according to the Itanium C++ ABI section 5.2.3:
2401  /// ...the first non-pure virtual function that is not inline at the
2402  /// point of class definition.
2403  ///
2404  /// Other ABIs use the same idea. However, the ARM C++ ABI ignores
2405  /// virtual functions that are defined 'inline', which means that
2406  /// the result of this computation can change.
2408 
2409  /// Observe that the given method cannot be a key function.
2410  /// Checks the key-function cache for the method's class and clears it
2411  /// if matches the given declaration.
2412  ///
2413  /// This is used in ABIs where out-of-line definitions marked
2414  /// inline are not considered to be key functions.
2415  ///
2416  /// \param method should be the declaration from the class definition
2417  void setNonKeyFunction(const CXXMethodDecl *method);
2418 
2419  /// Loading virtual member pointers using the virtual inheritance model
2420  /// always results in an adjustment using the vbtable even if the index is
2421  /// zero.
2422  ///
2423  /// This is usually OK because the first slot in the vbtable points
2424  /// backwards to the top of the MDC. However, the MDC might be reusing a
2425  /// vbptr from an nv-base. In this case, the first slot in the vbtable
2426  /// points to the start of the nv-base which introduced the vbptr and *not*
2427  /// the MDC. Modify the NonVirtualBaseAdjustment to account for this.
2429 
2430  /// Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
2431  uint64_t getFieldOffset(const ValueDecl *FD) const;
2432 
2433  /// Get the offset of an ObjCIvarDecl in bits.
2434  uint64_t lookupFieldBitOffset(const ObjCInterfaceDecl *OID,
2435  const ObjCImplementationDecl *ID,
2436  const ObjCIvarDecl *Ivar) const;
2437 
2438  /// Find the 'this' offset for the member path in a pointer-to-member
2439  /// APValue.
2441 
2442  bool isNearlyEmpty(const CXXRecordDecl *RD) const;
2443 
2445 
2446  /// If \p T is null pointer, assume the target in ASTContext.
2447  MangleContext *createMangleContext(const TargetInfo *T = nullptr);
2448 
2449  /// Creates a device mangle context to correctly mangle lambdas in a mixed
2450  /// architecture compile by setting the lambda mangling number source to the
2451  /// DeviceLambdaManglingNumber. Currently this asserts that the TargetInfo
2452  /// (from the AuxTargetInfo) is a an itanium target.
2454 
2455  void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass,
2457 
2458  unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI) const;
2459  void CollectInheritedProtocols(const Decl *CDecl,
2461 
2462  /// Return true if the specified type has unique object representations
2463  /// according to (C++17 [meta.unary.prop]p9)
2465 
2466  //===--------------------------------------------------------------------===//
2467  // Type Operators
2468  //===--------------------------------------------------------------------===//
2469 
2470  /// Return the canonical (structural) type corresponding to the
2471  /// specified potentially non-canonical type \p T.
2472  ///
2473  /// The non-canonical version of a type may have many "decorated" versions of
2474  /// types. Decorators can include typedefs, 'typeof' operators, etc. The
2475  /// returned type is guaranteed to be free of any of these, allowing two
2476  /// canonical types to be compared for exact equality with a simple pointer
2477  /// comparison.
2480  }
2481 
2482  const Type *getCanonicalType(const Type *T) const {
2483  return T->getCanonicalTypeInternal().getTypePtr();
2484  }
2485 
2486  /// Return the canonical parameter type corresponding to the specific
2487  /// potentially non-canonical one.
2488  ///
2489  /// Qualifiers are stripped off, functions are turned into function
2490  /// pointers, and arrays decay one level into pointers.
2492 
2493  /// Determine whether the given types \p T1 and \p T2 are equivalent.
2494  bool hasSameType(QualType T1, QualType T2) const {
2495  return getCanonicalType(T1) == getCanonicalType(T2);
2496  }
2497  bool hasSameType(const Type *T1, const Type *T2) const {
2498  return getCanonicalType(T1) == getCanonicalType(T2);
2499  }
2500 
2501  /// Return this type as a completely-unqualified array type,
2502  /// capturing the qualifiers in \p Quals.
2503  ///
2504  /// This will remove the minimal amount of sugaring from the types, similar
2505  /// to the behavior of QualType::getUnqualifiedType().
2506  ///
2507  /// \param T is the qualified type, which may be an ArrayType
2508  ///
2509  /// \param Quals will receive the full set of qualifiers that were
2510  /// applied to the array.
2511  ///
2512  /// \returns if this is an array type, the completely unqualified array type
2513  /// that corresponds to it. Otherwise, returns T.getUnqualifiedType().
2515 
2516  /// Determine whether the given types are equivalent after
2517  /// cvr-qualifiers have been removed.
2519  return getCanonicalType(T1).getTypePtr() ==
2521  }
2522 
2524  bool IsParam) const {
2525  auto SubTnullability = SubT->getNullability(*this);
2526  auto SuperTnullability = SuperT->getNullability(*this);
2527  if (SubTnullability.hasValue() == SuperTnullability.hasValue()) {
2528  // Neither has nullability; return true
2529  if (!SubTnullability)
2530  return true;
2531  // Both have nullability qualifier.
2532  if (*SubTnullability == *SuperTnullability ||
2533  *SubTnullability == NullabilityKind::Unspecified ||
2534  *SuperTnullability == NullabilityKind::Unspecified)
2535  return true;
2536 
2537  if (IsParam) {
2538  // Ok for the superclass method parameter to be "nonnull" and the subclass
2539  // method parameter to be "nullable"
2540  return (*SuperTnullability == NullabilityKind::NonNull &&
2541  *SubTnullability == NullabilityKind::Nullable);
2542  }
2543  // For the return type, it's okay for the superclass method to specify
2544  // "nullable" and the subclass method specify "nonnull"
2545  return (*SuperTnullability == NullabilityKind::Nullable &&
2546  *SubTnullability == NullabilityKind::NonNull);
2547  }
2548  return true;
2549  }
2550 
2551  bool ObjCMethodsAreEqual(const ObjCMethodDecl *MethodDecl,
2552  const ObjCMethodDecl *MethodImp);
2553 
2554  bool UnwrapSimilarTypes(QualType &T1, QualType &T2,
2555  bool AllowPiMismatch = true);
2557  bool AllowPiMismatch = true);
2558 
2559  /// Determine if two types are similar, according to the C++ rules. That is,
2560  /// determine if they are the same other than qualifiers on the initial
2561  /// sequence of pointer / pointer-to-member / array (and in Clang, object
2562  /// pointer) types and their element types.
2563  ///
2564  /// Clang offers a number of qualifiers in addition to the C++ qualifiers;
2565  /// those qualifiers are also ignored in the 'similarity' check.
2566  bool hasSimilarType(QualType T1, QualType T2);
2567 
2568  /// Determine if two types are similar, ignoring only CVR qualifiers.
2569  bool hasCvrSimilarType(QualType T1, QualType T2);
2570 
2571  /// Retrieves the "canonical" nested name specifier for a
2572  /// given nested name specifier.
2573  ///
2574  /// The canonical nested name specifier is a nested name specifier
2575  /// that uniquely identifies a type or namespace within the type
2576  /// system. For example, given:
2577  ///
2578  /// \code
2579  /// namespace N {
2580  /// struct S {
2581  /// template<typename T> struct X { typename T* type; };
2582  /// };
2583  /// }
2584  ///
2585  /// template<typename T> struct Y {
2586  /// typename N::S::X<T>::type member;
2587  /// };
2588  /// \endcode
2589  ///
2590  /// Here, the nested-name-specifier for N::S::X<T>:: will be
2591  /// S::X<template-param-0-0>, since 'S' and 'X' are uniquely defined
2592  /// by declarations in the type system and the canonical type for
2593  /// the template type parameter 'T' is template-param-0-0.
2596 
2597  /// Retrieves the default calling convention for the current target.
2598  CallingConv getDefaultCallingConvention(bool IsVariadic,
2599  bool IsCXXMethod,
2600  bool IsBuiltin = false) const;
2601 
2602  /// Retrieves the "canonical" template name that refers to a
2603  /// given template.
2604  ///
2605  /// The canonical template name is the simplest expression that can
2606  /// be used to refer to a given template. For most templates, this
2607  /// expression is just the template declaration itself. For example,
2608  /// the template std::vector can be referred to via a variety of
2609  /// names---std::vector, \::std::vector, vector (if vector is in
2610  /// scope), etc.---but all of these names map down to the same
2611  /// TemplateDecl, which is used to form the canonical template name.
2612  ///
2613  /// Dependent template names are more interesting. Here, the
2614  /// template name could be something like T::template apply or
2615  /// std::allocator<T>::template rebind, where the nested name
2616  /// specifier itself is dependent. In this case, the canonical
2617  /// template name uses the shortest form of the dependent
2618  /// nested-name-specifier, which itself contains all canonical
2619  /// types, values, and templates.
2621 
2622  /// Determine whether the given template names refer to the same
2623  /// template.
2625 
2626  /// Retrieve the "canonical" template argument.
2627  ///
2628  /// The canonical template argument is the simplest template argument
2629  /// (which may be a type, value, expression, or declaration) that
2630  /// expresses the value of the argument.
2632  const;
2633 
2634  /// Type Query functions. If the type is an instance of the specified class,
2635  /// return the Type pointer for the underlying maximally pretty type. This
2636  /// is a member of ASTContext because this may need to do some amount of
2637  /// canonicalization, e.g. to move type qualifiers into the element type.
2638  const ArrayType *getAsArrayType(QualType T) const;
2640  return dyn_cast_or_null<ConstantArrayType>(getAsArrayType(T));
2641  }
2643  return dyn_cast_or_null<VariableArrayType>(getAsArrayType(T));
2644  }
2646  return dyn_cast_or_null<IncompleteArrayType>(getAsArrayType(T));
2647  }
2649  const {
2650  return dyn_cast_or_null<DependentSizedArrayType>(getAsArrayType(T));
2651  }
2652 
2653  /// Return the innermost element type of an array type.
2654  ///
2655  /// For example, will return "int" for int[m][n]
2656  QualType getBaseElementType(const ArrayType *VAT) const;
2657 
2658  /// Return the innermost element type of a type (which needn't
2659  /// actually be an array type).
2661 
2662  /// Return number of constant array elements.
2663  uint64_t getConstantArrayElementCount(const ConstantArrayType *CA) const;
2664 
2665  /// Perform adjustment on the parameter type of a function.
2666  ///
2667  /// This routine adjusts the given parameter type @p T to the actual
2668  /// parameter type used by semantic analysis (C99 6.7.5.3p[7,8],
2669  /// C++ [dcl.fct]p3). The adjusted parameter type is returned.
2671 
2672  /// Retrieve the parameter type as adjusted for use in the signature
2673  /// of a function, decaying array and function types and removing top-level
2674  /// cv-qualifiers.
2676 
2678 
2679  /// Return the properly qualified result of decaying the specified
2680  /// array type to a pointer.
2681  ///
2682  /// This operation is non-trivial when handling typedefs etc. The canonical
2683  /// type of \p T must be an array type, this returns a pointer to a properly
2684  /// qualified element of the array.
2685  ///
2686  /// See C99 6.7.5.3p7 and C99 6.3.2.1p3.
2688 
2689  /// Return the type that \p PromotableType will promote to: C99
2690  /// 6.3.1.1p2, assuming that \p PromotableType is a promotable integer type.
2691  QualType getPromotedIntegerType(QualType PromotableType) const;
2692 
2693  /// Recurses in pointer/array types until it finds an Objective-C
2694  /// retainable type and returns its ownership.
2696 
2697  /// Whether this is a promotable bitfield reference according
2698  /// to C99 6.3.1.1p2, bullet 2 (and GCC extensions).
2699  ///
2700  /// \returns the type this bit-field will promote to, or NULL if no
2701  /// promotion occurs.
2703 
2704  /// Return the highest ranked integer type, see C99 6.3.1.8p1.
2705  ///
2706  /// If \p LHS > \p RHS, returns 1. If \p LHS == \p RHS, returns 0. If
2707  /// \p LHS < \p RHS, return -1.
2708  int getIntegerTypeOrder(QualType LHS, QualType RHS) const;
2709 
2710  /// Compare the rank of the two specified floating point types,
2711  /// ignoring the domain of the type (i.e. 'double' == '_Complex double').
2712  ///
2713  /// If \p LHS > \p RHS, returns 1. If \p LHS == \p RHS, returns 0. If
2714  /// \p LHS < \p RHS, return -1.
2715  int getFloatingTypeOrder(QualType LHS, QualType RHS) const;
2716 
2717  /// Compare the rank of two floating point types as above, but compare equal
2718  /// if both types have the same floating-point semantics on the target (i.e.
2719  /// long double and double on AArch64 will return 0).
2720  int getFloatingTypeSemanticOrder(QualType LHS, QualType RHS) const;
2721 
2722  /// Return a real floating point or a complex type (based on
2723  /// \p typeDomain/\p typeSize).
2724  ///
2725  /// \param typeDomain a real floating point or complex type.
2726  /// \param typeSize a real floating point or complex type.
2728  QualType typeDomain) const;
2729 
2730  unsigned getTargetAddressSpace(QualType T) const;
2731 
2732  unsigned getTargetAddressSpace(Qualifiers Q) const;
2733 
2734  unsigned getTargetAddressSpace(LangAS AS) const;
2735 
2736  LangAS getLangASForBuiltinAddressSpace(unsigned AS) const;
2737 
2738  /// Get target-dependent integer value for null pointer which is used for
2739  /// constant folding.
2740  uint64_t getTargetNullPointerValue(QualType QT) const;
2741 
2743  return AddrSpaceMapMangling || isTargetAddressSpace(AS);
2744  }
2745 
2746 private:
2747  // Helper for integer ordering
2748  unsigned getIntegerRank(const Type *T) const;
2749 
2750 public:
2751  //===--------------------------------------------------------------------===//
2752  // Type Compatibility Predicates
2753  //===--------------------------------------------------------------------===//
2754 
2755  /// Compatibility predicates used to check assignment expressions.
2756  bool typesAreCompatible(QualType T1, QualType T2,
2757  bool CompareUnqualified = false); // C99 6.2.7p1
2758 
2761 
2762  bool isObjCIdType(QualType T) const {
2763  return T == getObjCIdType();
2764  }
2765 
2766  bool isObjCClassType(QualType T) const {
2767  return T == getObjCClassType();
2768  }
2769 
2770  bool isObjCSelType(QualType T) const {
2771  return T == getObjCSelType();
2772  }
2773 
2775  const ObjCObjectPointerType *RHS,
2776  bool ForCompare);
2777 
2779  const ObjCObjectPointerType *RHS);
2780 
2781  // Check the safety of assignment from LHS to RHS
2783  const ObjCObjectPointerType *RHSOPT);
2784  bool canAssignObjCInterfaces(const ObjCObjectType *LHS,
2785  const ObjCObjectType *RHS);
2787  const ObjCObjectPointerType *LHSOPT,
2788  const ObjCObjectPointerType *RHSOPT,
2789  bool BlockReturnType);
2792  const ObjCObjectPointerType *RHSOPT);
2793  bool canBindObjCObjectType(QualType To, QualType From);
2794 
2795  // Functions for calculating composite types
2796  QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false,
2797  bool Unqualified = false, bool BlockReturnType = false);
2798  QualType mergeFunctionTypes(QualType, QualType, bool OfBlockPointer=false,
2799  bool Unqualified = false, bool AllowCXX = false);
2801  bool OfBlockPointer = false,
2802  bool Unqualified = false);
2804  bool OfBlockPointer=false,
2805  bool Unqualified = false);
2806 
2808 
2809  /// This function merges the ExtParameterInfo lists of two functions. It
2810  /// returns true if the lists are compatible. The merged list is returned in
2811  /// NewParamInfos.
2812  ///
2813  /// \param FirstFnType The type of the first function.
2814  ///
2815  /// \param SecondFnType The type of the second function.
2816  ///
2817  /// \param CanUseFirst This flag is set to true if the first function's
2818  /// ExtParameterInfo list can be used as the composite list of
2819  /// ExtParameterInfo.
2820  ///
2821  /// \param CanUseSecond This flag is set to true if the second function's
2822  /// ExtParameterInfo list can be used as the composite list of
2823  /// ExtParameterInfo.
2824  ///
2825  /// \param NewParamInfos The composite list of ExtParameterInfo. The list is
2826  /// empty if none of the flags are set.
2827  ///
2828  bool mergeExtParameterInfo(
2829  const FunctionProtoType *FirstFnType,
2830  const FunctionProtoType *SecondFnType,
2831  bool &CanUseFirst, bool &CanUseSecond,
2833 
2834  void ResetObjCLayout(const ObjCContainerDecl *CD);
2835 
2836  //===--------------------------------------------------------------------===//
2837  // Integer Predicates
2838  //===--------------------------------------------------------------------===//
2839 
2840  // The width of an integer, as defined in C99 6.2.6.2. This is the number
2841  // of bits in an integer type excluding any padding bits.
2842  unsigned getIntWidth(QualType T) const;
2843 
2844  // Per C99 6.2.5p6, for every signed integer type, there is a corresponding
2845  // unsigned integer type. This method takes a signed type, and returns the
2846  // corresponding unsigned integer type.
2847  // With the introduction of fixed point types in ISO N1169, this method also
2848  // accepts fixed point types and returns the corresponding unsigned type for
2849  // a given fixed point type.
2851 
2852  // Per C99 6.2.5p6, for every signed integer type, there is a corresponding
2853  // unsigned integer type. This method takes an unsigned type, and returns the
2854  // corresponding signed integer type.
2855  // With the introduction of fixed point types in ISO N1169, this method also
2856  // accepts fixed point types and returns the corresponding signed type for
2857  // a given fixed point type.
2859 
2860  // Per ISO N1169, this method accepts fixed point types and returns the
2861  // corresponding saturated type for a given fixed point type.
2863 
2864  // This method accepts fixed point types and returns the corresponding signed
2865  // type. Unlike getCorrespondingUnsignedType(), this only accepts unsigned
2866  // fixed point types because there are unsigned integer types like bool and
2867  // char8_t that don't have signed equivalents.
2869 
2870  //===--------------------------------------------------------------------===//
2871  // Integer Values
2872  //===--------------------------------------------------------------------===//
2873 
2874  /// Make an APSInt of the appropriate width and signedness for the
2875  /// given \p Value and integer \p Type.
2877  // If Type is a signed integer type larger than 64 bits, we need to be sure
2878  // to sign extend Res appropriately.
2880  Res = Value;
2881  unsigned Width = getIntWidth(Type);
2882  if (Width != Res.getBitWidth())
2883  return Res.extOrTrunc(Width);
2884  return Res;
2885  }
2886 
2887  bool isSentinelNullExpr(const Expr *E);
2888 
2889  /// Get the implementation of the ObjCInterfaceDecl \p D, or nullptr if
2890  /// none exists.
2892 
2893  /// Get the implementation of the ObjCCategoryDecl \p D, or nullptr if
2894  /// none exists.
2896 
2897  /// Return true if there is at least one \@implementation in the TU.
2899  return !ObjCImpls.empty();
2900  }
2901 
2902  /// Set the implementation of ObjCInterfaceDecl.
2904  ObjCImplementationDecl *ImplD);
2905 
2906  /// Set the implementation of ObjCCategoryDecl.
2908  ObjCCategoryImplDecl *ImplD);
2909 
2910  /// Get the duplicate declaration of a ObjCMethod in the same
2911  /// interface, or null if none exists.
2912  const ObjCMethodDecl *
2913  getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const;
2914 
2916  const ObjCMethodDecl *Redecl);
2917 
2918  /// Returns the Objective-C interface that \p ND belongs to if it is
2919  /// an Objective-C method/property/ivar etc. that is part of an interface,
2920  /// otherwise returns null.
2921  const ObjCInterfaceDecl *getObjContainingInterface(const NamedDecl *ND) const;
2922 
2923  /// Set the copy initialization expression of a block var decl. \p CanThrow
2924  /// indicates whether the copy expression can throw or not.
2925  void setBlockVarCopyInit(const VarDecl* VD, Expr *CopyExpr, bool CanThrow);
2926 
2927  /// Get the copy initialization expression of the VarDecl \p VD, or
2928  /// nullptr if none exists.
2929  BlockVarCopyInit getBlockVarCopyInit(const VarDecl* VD) const;
2930 
2931  /// Allocate an uninitialized TypeSourceInfo.
2932  ///
2933  /// The caller should initialize the memory held by TypeSourceInfo using
2934  /// the TypeLoc wrappers.
2935  ///
2936  /// \param T the type that will be the basis for type source info. This type
2937  /// should refer to how the declarator was written in source code, not to
2938  /// what type semantic analysis resolved the declarator to.
2939  ///
2940  /// \param Size the size of the type info to create, or 0 if the size
2941  /// should be calculated based on the type.
2942  TypeSourceInfo *CreateTypeSourceInfo(QualType T, unsigned Size = 0) const;
2943 
2944  /// Allocate a TypeSourceInfo where all locations have been
2945  /// initialized to a given location, which defaults to the empty
2946  /// location.
2947  TypeSourceInfo *
2949  SourceLocation Loc = SourceLocation()) const;
2950 
2951  /// Add a deallocation callback that will be invoked when the
2952  /// ASTContext is destroyed.
2953  ///
2954  /// \param Callback A callback function that will be invoked on destruction.
2955  ///
2956  /// \param Data Pointer data that will be provided to the callback function
2957  /// when it is called.
2958  void AddDeallocation(void (*Callback)(void *), void *Data) const;
2959 
2960  /// If T isn't trivially destructible, calls AddDeallocation to register it
2961  /// for destruction.
2962  template <typename T> void addDestruction(T *Ptr) const {
2963  if (!std::is_trivially_destructible<T>::value) {
2964  auto DestroyPtr = [](void *V) { static_cast<T *>(V)->~T(); };
2965  AddDeallocation(DestroyPtr, Ptr);
2966  }
2967  }
2968 
2971 
2972  /// Determines if the decl can be CodeGen'ed or deserialized from PCH
2973  /// lazily, only when used; this is only relevant for function or file scoped
2974  /// var definitions.
2975  ///
2976  /// \returns true if the function/var must be CodeGen'ed/deserialized even if
2977  /// it is not used.
2978  bool DeclMustBeEmitted(const Decl *D);
2979 
2980  /// Visits all versions of a multiversioned function with the passed
2981  /// predicate.
2983  const FunctionDecl *FD,
2984  llvm::function_ref<void(FunctionDecl *)> Pred) const;
2985 
2986  const CXXConstructorDecl *
2988 
2990  CXXConstructorDecl *CD);
2991 
2993 
2995 
2997 
2999 
3000  void setManglingNumber(const NamedDecl *ND, unsigned Number);
3001  unsigned getManglingNumber(const NamedDecl *ND) const;
3002 
3003  void setStaticLocalNumber(const VarDecl *VD, unsigned Number);
3004  unsigned getStaticLocalNumber(const VarDecl *VD) const;
3005 
3006  /// Retrieve the context for computing mangling numbers in the given
3007  /// DeclContext.
3011  const Decl *D);
3012 
3013  std::unique_ptr<MangleNumberingContext> createMangleNumberingContext() const;
3014 
3015  /// Used by ParmVarDecl to store on the side the
3016  /// index of the parameter when it exceeds the size of the normal bitfield.
3017  void setParameterIndex(const ParmVarDecl *D, unsigned index);
3018 
3019  /// Used by ParmVarDecl to retrieve on the side the
3020  /// index of the parameter when it exceeds the size of the normal bitfield.
3021  unsigned getParameterIndex(const ParmVarDecl *D) const;
3022 
3023  /// Return a string representing the human readable name for the specified
3024  /// function declaration or file name. Used by SourceLocExpr and
3025  /// PredefinedExpr to cache evaluated results.
3026  StringLiteral *getPredefinedStringLiteralFromCache(StringRef Key) const;
3027 
3028  /// Return a declaration for the global GUID object representing the given
3029  /// GUID value.
3031 
3032  /// Return the template parameter object of the given type with the given
3033  /// value.
3035  const APValue &V) const;
3036 
3037  /// Parses the target attributes passed in, and returns only the ones that are
3038  /// valid feature names.
3039  ParsedTargetAttr filterFunctionTargetAttrs(const TargetAttr *TD) const;
3040 
3041  void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
3042  const FunctionDecl *) const;
3043  void getFunctionFeatureMap(llvm::StringMap<bool> &FeatureMap,
3044  GlobalDecl GD) const;
3045 
3046  //===--------------------------------------------------------------------===//
3047  // Statistics
3048  //===--------------------------------------------------------------------===//
3049 
3050  /// The number of implicitly-declared default constructors.
3052 
3053  /// The number of implicitly-declared default constructors for
3054  /// which declarations were built.
3056 
3057  /// The number of implicitly-declared copy constructors.
3059 
3060  /// The number of implicitly-declared copy constructors for
3061  /// which declarations were built.
3063 
3064  /// The number of implicitly-declared move constructors.
3066 
3067  /// The number of implicitly-declared move constructors for
3068  /// which declarations were built.
3070 
3071  /// The number of implicitly-declared copy assignment operators.
3073 
3074  /// The number of implicitly-declared copy assignment operators for
3075  /// which declarations were built.
3077 
3078  /// The number of implicitly-declared move assignment operators.
3080 
3081  /// The number of implicitly-declared move assignment operators for
3082  /// which declarations were built.
3084 
3085  /// The number of implicitly-declared destructors.
3087 
3088  /// The number of implicitly-declared destructors for which
3089  /// declarations were built.
3091 
3092 public:
3093  /// Initialize built-in types.
3094  ///
3095  /// This routine may only be invoked once for a given ASTContext object.
3096  /// It is normally invoked after ASTContext construction.
3097  ///
3098  /// \param Target The target
3099  void InitBuiltinTypes(const TargetInfo &Target,
3100  const TargetInfo *AuxTarget = nullptr);
3101 
3102 private:
3103  void InitBuiltinType(CanQualType &R, BuiltinType::Kind K);
3104 
3105  class ObjCEncOptions {
3106  unsigned Bits;
3107 
3108  ObjCEncOptions(unsigned Bits) : Bits(Bits) {}
3109 
3110  public:
3111  ObjCEncOptions() : Bits(0) {}
3112  ObjCEncOptions(const ObjCEncOptions &RHS) : Bits(RHS.Bits) {}
3113 
3114 #define OPT_LIST(V) \
3115  V(ExpandPointedToStructures, 0) \
3116  V(ExpandStructures, 1) \
3117  V(IsOutermostType, 2) \
3118  V(EncodingProperty, 3) \
3119  V(IsStructField, 4) \
3120  V(EncodeBlockParameters, 5) \
3121  V(EncodeClassNames, 6) \
3122 
3123 #define V(N,I) ObjCEncOptions& set##N() { Bits |= 1 << I; return *this; }
3124 OPT_LIST(V)
3125 #undef V
3126 
3127 #define V(N,I) bool N() const { return Bits & 1 << I; }
3128 OPT_LIST(V)
3129 #undef V
3130 
3131 #undef OPT_LIST
3132 
3133  LLVM_NODISCARD ObjCEncOptions keepingOnly(ObjCEncOptions Mask) const {
3134  return Bits & Mask.Bits;
3135  }
3136 
3137  LLVM_NODISCARD ObjCEncOptions forComponentType() const {
3138  ObjCEncOptions Mask = ObjCEncOptions()
3139  .setIsOutermostType()
3140  .setIsStructField();
3141  return Bits & ~Mask.Bits;
3142  }
3143  };
3144 
3145  // Return the Objective-C type encoding for a given type.
3146  void getObjCEncodingForTypeImpl(QualType t, std::string &S,
3147  ObjCEncOptions Options,
3148  const FieldDecl *Field,
3149  QualType *NotEncodedT = nullptr) const;
3150 
3151  // Adds the encoding of the structure's members.
3152  void getObjCEncodingForStructureImpl(RecordDecl *RD, std::string &S,
3153  const FieldDecl *Field,
3154  bool includeVBases = true,
3155  QualType *NotEncodedT=nullptr) const;
3156 
3157 public:
3158  // Adds the encoding of a method parameter or return type.
3160  QualType T, std::string& S,
3161  bool Extended) const;
3162 
3163  /// Returns true if this is an inline-initialized static data member
3164  /// which is treated as a definition for MSVC compatibility.
3165  bool isMSStaticDataMemberInlineDefinition(const VarDecl *VD) const;
3166 
3168  /// Not an inline variable.
3169  None,
3170 
3171  /// Weak definition of inline variable.
3172  Weak,
3173 
3174  /// Weak for now, might become strong later in this TU.
3175  WeakUnknown,
3176 
3177  /// Strong definition.
3178  Strong
3179  };
3180 
3181  /// Determine whether a definition of this inline variable should
3182  /// be treated as a weak or strong definition. For compatibility with
3183  /// C++14 and before, for a constexpr static data member, if there is an
3184  /// out-of-line declaration of the member, we may promote it from weak to
3185  /// strong.
3187  getInlineVariableDefinitionKind(const VarDecl *VD) const;
3188 
3189 private:
3190  friend class DeclarationNameTable;
3191  friend class DeclContext;
3192 
3193  const ASTRecordLayout &
3194  getObjCLayout(const ObjCInterfaceDecl *D,
3195  const ObjCImplementationDecl *Impl) const;
3196 
3197  /// A set of deallocations that should be performed when the
3198  /// ASTContext is destroyed.
3199  // FIXME: We really should have a better mechanism in the ASTContext to
3200  // manage running destructors for types which do variable sized allocation
3201  // within the AST. In some places we thread the AST bump pointer allocator
3202  // into the datastructures which avoids this mess during deallocation but is
3203  // wasteful of memory, and here we require a lot of error prone book keeping
3204  // in order to track and run destructors while we're tearing things down.
3206  llvm::SmallVector<std::pair<void (*)(void *), void *>, 16>;
3207  mutable DeallocationFunctionsAndArguments Deallocations;
3208 
3209  // FIXME: This currently contains the set of StoredDeclMaps used
3210  // by DeclContext objects. This probably should not be in ASTContext,
3211  // but we include it here so that ASTContext can quickly deallocate them.
3212  llvm::PointerIntPair<StoredDeclsMap *, 1> LastSDM;
3213 
3214  std::vector<Decl *> TraversalScope;
3215 
3216  std::unique_ptr<VTableContextBase> VTContext;
3217 
3218  void ReleaseDeclContextMaps();
3219 
3220 public:
3221  enum PragmaSectionFlag : unsigned {
3223  PSF_Read = 0x1,
3224  PSF_Write = 0x2,
3228  PSF_Invalid = 0x80000000U,
3229  };
3230 
3231  struct SectionInfo {
3235 
3236  SectionInfo() = default;
3238  int SectionFlags)
3241  };
3242 
3243  llvm::StringMap<SectionInfo> SectionInfos;
3244 
3245  /// Return a new OMPTraitInfo object owned by this context.
3247 
3248  /// Whether a C++ static variable may be externalized.
3249  bool mayExternalizeStaticVar(const Decl *D) const;
3250 
3251  /// Whether a C++ static variable should be externalized.
3252  bool shouldExternalizeStaticVar(const Decl *D) const;
3253 
3254  StringRef getCUIDHash() const;
3255 
3256 private:
3257  /// All OMPTraitInfo objects live in this collection, one per
3258  /// `pragma omp [begin] declare variant` directive.
3259  SmallVector<std::unique_ptr<OMPTraitInfo>, 4> OMPTraitInfoVector;
3260 };
3261 
3262 /// Insertion operator for diagnostics.
3264  const ASTContext::SectionInfo &Section);
3265 
3266 /// Utility function for constructing a nullary selector.
3267 inline Selector GetNullarySelector(StringRef name, ASTContext &Ctx) {
3268  IdentifierInfo* II = &Ctx.Idents.get(name);
3269  return Ctx.Selectors.getSelector(0, &II);
3270 }
3271 
3272 /// Utility function for constructing an unary selector.
3273 inline Selector GetUnarySelector(StringRef name, ASTContext &Ctx) {
3274  IdentifierInfo* II = &Ctx.Idents.get(name);
3275  return Ctx.Selectors.getSelector(1, &II);
3276 }
3277 
3278 } // namespace clang
3279 
3280 // operator new and delete aren't allowed inside namespaces.
3281 
3282 /// Placement new for using the ASTContext's allocator.
3283 ///
3284 /// This placement form of operator new uses the ASTContext's allocator for
3285 /// obtaining memory.
3286 ///
3287 /// IMPORTANT: These are also declared in clang/AST/ASTContextAllocate.h!
3288 /// Any changes here need to also be made there.
3289 ///
3290 /// We intentionally avoid using a nothrow specification here so that the calls
3291 /// to this operator will not perform a null check on the result -- the
3292 /// underlying allocator never returns null pointers.
3293 ///
3294 /// Usage looks like this (assuming there's an ASTContext 'Context' in scope):
3295 /// @code
3296 /// // Default alignment (8)
3297 /// IntegerLiteral *Ex = new (Context) IntegerLiteral(arguments);
3298 /// // Specific alignment
3299 /// IntegerLiteral *Ex2 = new (Context, 4) IntegerLiteral(arguments);
3300 /// @endcode
3301 /// Memory allocated through this placement new operator does not need to be
3302 /// explicitly freed, as ASTContext will free all of this memory when it gets
3303 /// destroyed. Please note that you cannot use delete on the pointer.
3304 ///
3305 /// @param Bytes The number of bytes to allocate. Calculated by the compiler.
3306 /// @param C The ASTContext that provides the allocator.
3307 /// @param Alignment The alignment of the allocated memory (if the underlying
3308 /// allocator supports it).
3309 /// @return The allocated memory. Could be nullptr.
3310 inline void *operator new(size_t Bytes, const clang::ASTContext &C,
3311  size_t Alignment /* = 8 */) {
3312  return C.Allocate(Bytes, Alignment);
3313 }
3314 
3315 /// Placement delete companion to the new above.
3316 ///
3317 /// This operator is just a companion to the new above. There is no way of
3318 /// invoking it directly; see the new operator for more details. This operator
3319 /// is called implicitly by the compiler if a placement new expression using
3320 /// the ASTContext throws in the object constructor.
3321 inline void operator delete(void *Ptr, const clang::ASTContext &C, size_t) {
3322  C.Deallocate(Ptr);
3323 }
3324 
3325 /// This placement form of operator new[] uses the ASTContext's allocator for
3326 /// obtaining memory.
3327 ///
3328 /// We intentionally avoid using a nothrow specification here so that the calls
3329 /// to this operator will not perform a null check on the result -- the
3330 /// underlying allocator never returns null pointers.
3331 ///
3332 /// Usage looks like this (assuming there's an ASTContext 'Context' in scope):
3333 /// @code
3334 /// // Default alignment (8)
3335 /// char *data = new (Context) char[10];
3336 /// // Specific alignment
3337 /// char *data = new (Context, 4) char[10];
3338 /// @endcode
3339 /// Memory allocated through this placement new[] operator does not need to be
3340 /// explicitly freed, as ASTContext will free all of this memory when it gets
3341 /// destroyed. Please note that you cannot use delete on the pointer.
3342 ///
3343 /// @param Bytes The number of bytes to allocate. Calculated by the compiler.
3344 /// @param C The ASTContext that provides the allocator.
3345 /// @param Alignment The alignment of the allocated memory (if the underlying
3346 /// allocator supports it).
3347 /// @return The allocated memory. Could be nullptr.
3348 inline void *operator new[](size_t Bytes, const clang::ASTContext& C,
3349  size_t Alignment /* = 8 */) {
3350  return C.Allocate(Bytes, Alignment);
3351 }
3352 
3353 /// Placement delete[] companion to the new[] above.
3354 ///
3355 /// This operator is just a companion to the new[] above. There is no way of
3356 /// invoking it directly; see the new[] operator for more details. This operator
3357 /// is called implicitly by the compiler if a placement new[] expression using
3358 /// the ASTContext throws in the object constructor.
3359 inline void operator delete[](void *Ptr, const clang::ASTContext &C, size_t) {
3360  C.Deallocate(Ptr);
3361 }
3362 
3363 /// Create the representation of a LazyGenerationalUpdatePtr.
3364 template <typename Owner, typename T,
3365  void (clang::ExternalASTSource::*Update)(Owner)>
3368  const clang::ASTContext &Ctx, T Value) {
3369  // Note, this is implemented here so that ExternalASTSource.h doesn't need to
3370  // include ASTContext.h. We explicitly instantiate it for all relevant types
3371  // in ASTContext.cpp.
3372  if (auto *Source = Ctx.getExternalSource())
3373  return new (Ctx) LazyData(Source, Value);
3374  return Value;
3375 }
3376 
3377 #endif // LLVM_CLANG_AST_ASTCONTEXT_H
clang::QualifierCollector::strip
const Type * strip(QualType type)
Collect any qualifiers on the given type and return an unqualified type.
Definition: Type.h:6397
clang::BuiltinType
This class is used for builtin types like 'int'.
Definition: Type.h:2494
clang::ASTContext::areCommonBaseCompatible
QualType areCommonBaseCompatible(const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
Definition: ASTContext.cpp:9346
clang::operator!=
bool operator!=(CanQual< T > x, CanQual< U > y)
Definition: CanonicalType.h:207
clang::ElaboratedTypeKeyword
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
Definition: Type.h:5353
clang::ASTContext::getInjectedTemplateArg
TemplateArgument getInjectedTemplateArg(NamedDecl *ParamDecl)
Definition: ASTContext.cpp:5066
clang::ASTContext::getAutoType
QualType getAutoType(QualType DeducedType, AutoTypeKeyword Keyword, bool IsDependent, bool IsPack=false, ConceptDecl *TypeConstraintConcept=nullptr, ArrayRef< TemplateArgument > TypeConstraintArgs={}) const
C++11 deduced auto type.
Definition: ASTContext.cpp:5690
clang::ASTContext::setObjCImplementation
void setObjCImplementation(ObjCInterfaceDecl *IFaceD, ObjCImplementationDecl *ImplD)
Set the implementation of ObjCInterfaceDecl.
Definition: ASTContext.cpp:2882
clang::ASTContext::getBuiltinVaListDecl
TypedefDecl * getBuiltinVaListDecl() const
Retrieve the C type declaration corresponding to the predefined __builtin_va_list type.
Definition: ASTContext.cpp:8529
clang::ObjCInterfaceDecl
Represents an ObjC class declaration.
Definition: DeclObjC.h:1150
clang::ASTContext::adjustDeducedFunctionResultType
void adjustDeducedFunctionResultType(FunctionDecl *FD, QualType ResultType)
Change the result type of a function type once it is deduced.
Definition: ASTContext.cpp:3115
clang::ASTContext::SatUnsignedLongFractTy
CanQualType SatUnsignedLongFractTy
Definition: ASTContext.h:1096
clang::ASTContext::getTypeSizeInChars
CharUnits getTypeSizeInChars(QualType T) const
Return the size of the specified (complete) type T, in characters.
Definition: ASTContext.cpp:2453
clang::ASTContext::OCLEventTy
CanQualType OCLEventTy
Definition: ASTContext.h:1109
clang::isTargetAddressSpace
bool isTargetAddressSpace(LangAS AS)
Definition: AddressSpaces.h:71
clang::ASTContext::getObjCEncodingForPropertyDecl
std::string getObjCEncodingForPropertyDecl(const ObjCPropertyDecl *PD, const Decl *Container) const
getObjCEncodingForPropertyDecl - Return the encoded type for this method declaration.
Definition: ASTContext.cpp:7280
clang::ASTContext::LongDoubleTy
CanQualType LongDoubleTy
Definition: ASTContext.h:1085
clang::ASTContext::NumImplicitDestructorsDeclared
unsigned NumImplicitDestructorsDeclared
The number of implicitly-declared destructors for which declarations were built.
Definition: ASTContext.h:3090
clang::ASTContext::getCFConstantStringTagDecl
RecordDecl * getCFConstantStringTagDecl() const
Definition: ASTContext.cpp:6776
clang::Type::getNullability
Optional< NullabilityKind > getNullability(const ASTContext &context) const
Determine the nullability of the given type.
Definition: Type.cpp:4056
clang::ASTContext::getRawCommentForDeclNoCacheImpl
RawComment * getRawCommentForDeclNoCacheImpl(const Decl *D, const SourceLocation RepresentativeLocForDecl, const std::map< unsigned, RawComment * > &CommentsInFile) const
Definition: ASTContext.cpp:206
clang::ASTContext::getTypePackElementName
IdentifierInfo * getTypePackElementName() const
Definition: ASTContext.h:1876
clang::ASTContext::getQualifiedType
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
Definition: ASTContext.h:2096
clang::ASTContext::getTypedefType
QualType getTypedefType(const TypedefNameDecl *Decl, QualType Underlying=QualType()) const
Return the unique reference to the type for the specified typedef-name decl.
Definition: ASTContext.cpp:4583
clang::ASTContext::~ASTContext
~ASTContext()
Definition: ASTContext.cpp:1032
clang::AtomicExpr
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load,...
Definition: Expr.h:6235
clang::ASTContext::NumImplicitMoveConstructorsDeclared
unsigned NumImplicitMoveConstructorsDeclared
The number of implicitly-declared move constructors for which declarations were built.
Definition: ASTContext.h:3069
clang::ASTContext::getASTObjCImplementationLayout
const ASTRecordLayout & getASTObjCImplementationLayout(const ObjCImplementationDecl *D) const
Get or compute information about the layout of the specified Objective-C implementation.
Definition: ASTContext.cpp:2966
clang::LangAS::opencl_private
@ opencl_private
clang::ASTContext::areLaxCompatibleSveTypes
bool areLaxCompatibleSveTypes(QualType FirstType, QualType SecondType)
Return true if the given vector types are lax-compatible SVE vector types, false otherwise.
Definition: ASTContext.cpp:8876
clang::ASTContext::getASTMutationListener
ASTMutationListener * getASTMutationListener() const
Retrieve a pointer to the AST mutation listener associated with this AST context, if any.
Definition: ASTContext.h:1171
clang::ASTContext::getDeclaratorForUnnamedTagDecl
DeclaratorDecl * getDeclaratorForUnnamedTagDecl(const TagDecl *TD)
Definition: ASTContext.cpp:11441
clang::ASTContext::getIntegerTypeOrder
int getIntegerTypeOrder(QualType LHS, QualType RHS) const
Return the highest ranked integer type, see C99 6.3.1.8p1.
Definition: ASTContext.cpp:6647
clang::ASTContext::GetGVALinkageForVariable
GVALinkage GetGVALinkageForVariable(const VarDecl *VD)
Definition: ASTContext.cpp:11065
clang::DynTypedNodeList
Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode.
Definition: ParentMapContext.h:92
clang::ASTContext::getObjCInstanceTypeDecl
TypedefDecl * getObjCInstanceTypeDecl()
Retrieve the typedef declaration corresponding to the Objective-C "instancetype" type.
Definition: ASTContext.cpp:7001
clang::ASTContext::IncompleteMatrixIdxTy
CanQualType IncompleteMatrixIdxTy
Definition: ASTContext.h:1111
clang::ASTContext::isAlignmentRequired
bool isAlignmentRequired(const Type *T) const
Determine if the alignment the type has was required using an alignment attribute.
Definition: ASTContext.cpp:1886
clang::ASTContext::getBlockDescriptorExtendedType
QualType getBlockDescriptorExtendedType() const
Gets the struct used to keep track of the extended descriptor for pointer to blocks.
Definition: ASTContext.cpp:6839
clang::ASTContext::BuiltinVectorTypeInfo::NumVectors
unsigned NumVectors
Definition: ASTContext.h:1449
llvm
YAML serialization mapping.
Definition: Dominators.h:30
clang::CXXConstructorDecl
Represents a C++ constructor within a class.
Definition: DeclCXX.h:2400
clang::ASTContext::getTypeDeclType
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
Definition: ASTContext.h:1542
clang::ASTContext::getOpenMPDefaultSimdAlign
unsigned getOpenMPDefaultSimdAlign(QualType T) const
Get default simd alignment of the specified complete type in bits.
Definition: ASTContext.cpp:2436
clang::ASTContext::getInt128Decl
TypedefDecl * getInt128Decl() const
Retrieve the declaration for the 128-bit signed integer type.
Definition: ASTContext.cpp:1261
clang::TypeInfoChars::AlignRequirement
AlignRequirementKind AlignRequirement
Definition: ASTContext.h:196
clang::ASTContext::mergeTypes
QualType mergeTypes(QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false, bool BlockReturnType=false)
Definition: ASTContext.cpp:9811
clang::ASTContext::getBOOLType
QualType getBOOLType() const
type of 'BOOL' type.
Definition: ASTContext.h:2044
clang::ASTContext::getFILEType
QualType getFILEType() const
Retrieve the C FILE type.
Definition: ASTContext.h:1896
clang::ExternCContextDecl
Declaration context for names declared as extern "C" in C++.
Definition: Decl.h:220
clang::ASTContext::hasDirectOwnershipQualifier
bool hasDirectOwnershipQualifier(QualType Ty) const
Return true if the type has been explicitly qualified with ObjC ownership.
Definition: ASTContext.cpp:8928
clang::ASTContext::BFloat16Ty
CanQualType BFloat16Ty
Definition: ASTContext.h:1098
Specifiers.h
ASTContextAllocate.h
clang::interp::APInt
llvm::APInt APInt
Definition: Integral.h:27
clang::ast_matchers::blockExpr
const internal::VariadicDynCastAllOfMatcher< Stmt, BlockExpr > blockExpr
Matches a reference to a block.
Definition: ASTMatchersInternal.cpp:893
clang::MSGuidDeclParts
Parts of a decomposed MSGuidDecl.
Definition: DeclCXX.h:4115
clang::ASTContext::getNSIntegerType
CanQualType getNSIntegerType() const
Definition: ASTContext.cpp:6992
clang::ASTContext::OCLReserveIDTy
CanQualType OCLReserveIDTy
Definition: ASTContext.h:1110
clang::ASTContext::getTemplateParamObjectDecl
TemplateParamObjectDecl * getTemplateParamObjectDecl(QualType T, const APValue &V) const
Return the template parameter object of the given type with the given value.
Definition: ASTContext.cpp:11499
clang::ASTContext::canAssignObjCInterfacesInBlockPointer
bool canAssignObjCInterfacesInBlockPointer(const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT, bool BlockReturnType)
canAssignObjCInterfacesInBlockPointer - This routine is specifically written for providing type-safet...
Definition: ASTContext.cpp:9156
clang::ASTContext::getCharWidth
uint64_t getCharWidth() const
Return the size of the character type, in bits.
Definition: ASTContext.h:2259
clang::ASTContext::UnsignedShortTy
CanQualType UnsignedShortTy
Definition: ASTContext.h:1083
clang::ASTContext::GetGVALinkageForFunction
GVALinkage GetGVALinkageForFunction(const FunctionDecl *FD) const
Definition: ASTContext.cpp:10982
clang::ASTContext::getObjCInstanceType
QualType getObjCInstanceType()
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;.
Definition: ASTContext.h:1884
clang::ASTContext::ResetObjCLayout
void ResetObjCLayout(const ObjCContainerDecl *CD)
Definition: ASTContext.cpp:10210
type
clang::ASTContext::getNSObjectName
IdentifierInfo * getNSObjectName() const
Retrieve the identifier 'NSObject'.
Definition: ASTContext.h:1842
clang::ASTContext::hasSameType
bool hasSameType(const Type *T1, const Type *T2) const
Definition: ASTContext.h:2497
clang::MemberSpecializationInfo
Provides information a specialization of a member of a class template, which may be a member function...
Definition: DeclTemplate.h:620
clang::ASTContext::getBitIntType
QualType getBitIntType(bool Unsigned, unsigned NumBits) const
Return a bit-precise integer type with the specified signedness and bit count.
Definition: ASTContext.cpp:4488
clang::FullSourceLoc
A SourceLocation and its associated SourceManager.
Definition: SourceLocation.h:368
clang::ASTContext::buildImplicitRecord
RecordDecl * buildImplicitRecord(StringRef Name, RecordDecl::TagKind TK=TTK_Struct) const
Create a new implicit TU-level CXXRecordDecl or RecordDecl declaration.
Definition: ASTContext.cpp:1235
clang::ASTContext::getTemplateSpecializationTypeInfo
TypeSourceInfo * getTemplateSpecializationTypeInfo(TemplateName T, SourceLocation TLoc, const TemplateArgumentListInfo &Args, QualType Canon=QualType()) const
Definition: ASTContext.cpp:4771
clang::ASTContext::GE_Missing_setjmp
@ GE_Missing_setjmp
Missing a type from <setjmp.h>
Definition: ASTContext.h:2177
clang::SourceRange
A trivial tuple used to represent a source range.
Definition: SourceLocation.h:210
clang::ASTContext::CountNonClassIvars
unsigned CountNonClassIvars(const ObjCInterfaceDecl *OI) const
Definition: ASTContext.cpp:2829
string
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} 0 ${PATH_LIB_START} PATH_HEAD) string(SUBSTRING $
Definition: CMakeLists.txt:22
clang::DeclContext
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
Definition: DeclBase.h:1341
clang::ASTContext::getFunctionFeatureMap
void getFunctionFeatureMap(llvm::StringMap< bool > &FeatureMap, const FunctionDecl *) const
Definition: ASTContext.cpp:11806
clang::ASTContext::getDependentNameType
QualType getDependentNameType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, const IdentifierInfo *Name, QualType Canon=QualType()) const
Definition: ASTContext.cpp:4980
clang::ASTContext::GetBuiltinType
QualType GetBuiltinType(unsigned ID, GetBuiltinTypeError &Error, unsigned *IntegerConstantArgs=nullptr) const
Return the type for the specified builtin.
Definition: ASTContext.cpp:10803
clang::ASTContext::createMangleNumberingContext
std::unique_ptr< MangleNumberingContext > createMangleNumberingContext() const
Definition: ASTContext.cpp:11409
clang::Qualifiers::fromCVRMask
static Qualifiers fromCVRMask(unsigned CVR)
Definition: Type.h:239
clang::ObjCImplementationDecl
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
Definition: DeclObjC.h:2545
clang::ASTContext::InlineVariableDefinitionKind::Strong
@ Strong
Strong definition.
clang::ConstantArrayType
Represents the canonical version of C arrays with a specified constant size.
Definition: Type.h:2930
clang::ASTContext::BuiltinVectorTypeInfo::ElementType
QualType ElementType
Definition: ASTContext.h:1447
clang::ASTContext::getRawCommentForDeclNoCache
RawComment * getRawCommentForDeclNoCache(const Decl *D) const
Return the documentation comment attached to a given declaration, without looking into cache.
Definition: ASTContext.cpp:284
clang::ASTContext::NumImplicitDefaultConstructors
unsigned NumImplicitDefaultConstructors
The number of implicitly-declared default constructors.
Definition: ASTContext.h:3051
clang::ASTContext::ExternalSource
IntrusiveRefCntPtr< ExternalASTSource > ExternalSource
Definition: ASTContext.h:651
clang::ASTContext::getParents
DynTypedNodeList getParents(const NodeT &Node)
Forwards to get node parents from the ParentMapContext.
Definition: ParentMapContext.h:133
clang::ASTContext::getMacroQualifiedType
QualType getMacroQualifiedType(QualType UnderlyingTy, const IdentifierInfo *MacroII) const
Definition: ASTContext.cpp:4968
clang::ASTContext::UnsignedAccumTy
CanQualType UnsignedAccumTy
Definition: ASTContext.h:1088
clang::ASTContext::setcudaConfigureCallDecl
void setcudaConfigureCallDecl(FunctionDecl *FD)
Definition: ASTContext.h:1375
clang::ASTContext::shouldExternalizeStaticVar
bool shouldExternalizeStaticVar(const Decl *D) const
Whether a C++ static variable should be externalized.
Definition: ASTContext.cpp:11891
clang::serialization::AbstractTypeReader
Definition: ASTContext.h:162
clang::ASTContext::VoidTy
CanQualType VoidTy
Definition: ASTContext.h:1073
llvm::SmallVector
Definition: LLVM.h:38
clang::ASTContext::operator=
ASTContext & operator=(const ASTContext &)=delete
clang::ASTContext::getParameterIndex
unsigned getParameterIndex(const ParmVarDecl *D) const
Used by ParmVarDecl to retrieve on the side the index of the parameter when it exceeds the size of th...
Definition: ASTContext.cpp:11449
clang::ASTContext::getAtomicType
QualType getAtomicType(QualType T) const
Return the uniqued reference to the atomic type for the specified type.
Definition: ASTContext.cpp:5727
clang::IdentifierTable::get
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
Definition: IdentifierTable.h:592
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
clang::ASTContext::getManglingNumberContext
MangleNumberingContext & getManglingNumberContext(const DeclContext *DC)
Retrieve the context for computing mangling numbers in the given DeclContext.
Definition: ASTContext.cpp:11390
clang::ASTContext::hasSameFunctionTypeIgnoringExceptionSpec
bool hasSameFunctionTypeIgnoringExceptionSpec(QualType T, QualType U)
Determine whether two function types are the same, ignoring exception specifications in cases where t...
Definition: ASTContext.cpp:3163
clang::BuiltinType::Kind
Kind
Definition: Type.h:2496
clang::ASTContext::getTemplateSpecializationType
QualType getTemplateSpecializationType(TemplateName T, ArrayRef< TemplateArgument > Args, QualType Canon=QualType()) const
Definition: ASTContext.cpp:4817
clang::ASTContext::getQualifiedType
QualType getQualifiedType(QualType T, Qualifiers Qs) const
Return a type with additional qualifiers.
Definition: ASTContext.h:2101
clang::ASTContext::getObjCNSStringType
QualType getObjCNSStringType() const
Definition: ASTContext.h:1794
clang::ASTContext::getIntWidth
unsigned getIntWidth(QualType T) const
Definition: ASTContext.cpp:10293
clang::ASTContext::DeallocateDeclListNode
void DeallocateDeclListNode(DeclListNode *N)
Deallcates a DeclListNode by returning it to the ListNodeFreeList pool.
Definition: ASTContext.h:727
clang::ASTContext::getVariableArrayDecayedType
QualType getVariableArrayDecayedType(QualType Ty) const
Returns a vla type where known sizes are replaced with [*].
Definition: ASTContext.cpp:3531
clang::TTK_Struct
@ TTK_Struct
The "struct" keyword.
Definition: Type.h:5336
clang::Qualifiers::addObjCLifetime
void addObjCLifetime(ObjCLifetime type)
Definition: Type.h:343
clang::NamedDecl
This represents a decl that may have a name.
Definition: Decl.h:247
clang::ASTContext::getWritePipeType
QualType getWritePipeType(QualType T) const
Return a write_only pipe type for the specified type.
Definition: ASTContext.cpp:4484
clang::ASTContext::OMPArraySectionTy
CanQualType OMPArraySectionTy
Definition: ASTContext.h:1112
clang::ASTContext::BuiltinInfo
Builtin::Context & BuiltinInfo
Definition: ASTContext.h:648
clang::ASTContext::getInnerObjCOwnership
Qualifiers::ObjCLifetime getInnerObjCOwnership(QualType T) const
Recurses in pointer/array types until it finds an Objective-C retainable type and returns its ownersh...
Definition: ASTContext.cpp:6619
clang::ASTContext::CUDADeviceVarODRUsedByHost
llvm::DenseSet< const VarDecl * > CUDADeviceVarODRUsedByHost
Keep track of CUDA/HIP device-side variables ODR-used by host code.
Definition: ASTContext.h:1138
clang::MultiVersionKind::Target
@ Target
clang::Qualifiers::GC
GC
Definition: Type.h:155
clang::ASTContext::setFILEDecl
void setFILEDecl(TypeDecl *FILEDecl)
Set the type for the C FILE type.
Definition: ASTContext.h:1893
clang::ASTContext::getAdjustedParameterType
QualType getAdjustedParameterType(QualType T) const
Perform adjustment on the parameter type of a function.
Definition: ASTContext.cpp:6319
clang::ASTContext::NeedExtraManglingDecl_t
NeedExtraManglingDecl_t
Definition: ASTContext.h:3009
clang::ParsedTargetAttr
Contains information gathered from parsing the contents of TargetAttr.
Definition: Attr.h:351
clang::ASTContext::PseudoObjectTy
CanQualType PseudoObjectTy
Definition: ASTContext.h:1103
clang::ASTContext::GE_Missing_ucontext
@ GE_Missing_ucontext
Missing a type from <ucontext.h>
Definition: ASTContext.h:2180
clang::ASTContext::DeclarationNames
DeclarationNameTable DeclarationNames
Definition: ASTContext.h:650
clang::ASTContext::getObjCClassDecl
TypedefDecl * getObjCClassDecl() const
Retrieve the typedef declaration corresponding to the predefined Objective-C 'Class' type.
Definition: ASTContext.cpp:8117
clang::ASTContext::AnyObjCImplementation
bool AnyObjCImplementation()
Return true if there is at least one @implementation in the TU.
Definition: ASTContext.h:2898
clang::ASTContext::getObjCSelRedefinitionType
QualType getObjCSelRedefinitionType() const
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if '...
Definition: ASTContext.h:1830
clang::ASTContext::getObjCEncodingForFunctionDecl
std::string getObjCEncodingForFunctionDecl(const FunctionDecl *Decl) const
Emit the encoded type for the function Decl into S.
Definition: ASTContext.cpp:7125
clang::LazyGenerationalUpdatePtr::LazyData
A cache of the value of this pointer, in the most recent generation in which we queried it.
Definition: ExternalASTSource.h:391
clang::ASTContext::getFullLoc
FullSourceLoc getFullLoc(SourceLocation Loc) const
Definition: ASTContext.h:783
clang::ASTContext::cacheRawCommentForDecl
void cacheRawCommentForDecl(const Decl &OriginalD, const RawComment &Comment) const
Attaches Comment to OriginalD and to its redeclaration chain and removes the redeclaration chain from...
Definition: ASTContext.cpp:455
clang::OMPTraitInfo
Helper data structure representing the traits in a match clause of an declare variant or metadirectiv...
Definition: OpenMPClause.h:8697
clang::QualType
A (possibly-)qualified type.
Definition: Type.h:674
clang::ASTContext::getTargetAddressSpace
unsigned getTargetAddressSpace(QualType T) const
Definition: ASTContext.cpp:11578
clang::ArrayType::ArraySizeModifier
ArraySizeModifier
Capture whether this is a normal array (e.g.
Definition: Type.h:2890
clang::ASTContext::CommentlessRedeclChains
llvm::DenseMap< const Decl *, const Decl * > CommentlessRedeclChains
Keeps track of redeclaration chains that don't have any comment attached.
Definition: ASTContext.h:818
AttributeLangSupport::C
@ C
Definition: SemaDeclAttr.cpp:54
clang::NestedNameSpecifier
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
Definition: NestedNameSpecifier.h:50
clang::ASTContext::getWCharType
QualType getWCharType() const
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension)...
Definition: ASTContext.h:1728
clang::ASTContext::SatLongAccumTy
CanQualType SatLongAccumTy
Definition: ASTContext.h:1091
clang::ASTContext::getDependentTemplateName
TemplateName getDependentTemplateName(NestedNameSpecifier *NNS, const IdentifierInfo *Name) const
Retrieve the template name that represents a dependent template name such as MetaFun::template apply.
Definition: ASTContext.cpp:8624
clang::ASTContext::getCommentForDecl
comments::FullComment * getCommentForDecl(const Decl *D, const Preprocessor *PP) const
Return parsed documentation comment attached to a given declaration.
Definition: ASTContext.cpp:557
clang::GVALinkage
GVALinkage
A more specific kind of linkage than enum Linkage.
Definition: Linkage.h:73
clang::ASTContext::Comments
RawCommentList Comments
All comments in this translation unit.
Definition: ASTContext.h:793
clang::ASTContext::getFloatTypeSemantics
const llvm::fltSemantics & getFloatTypeSemantics(QualType T) const
Return the APFloat 'semantics' for the specified scalar floating point type.
Definition: ASTContext.cpp:1703
clang::UnresolvedSetIterator
The iterator over UnresolvedSets.
Definition: UnresolvedSet.h:32
clang::ASTContext::getUnresolvedUsingType
QualType getUnresolvedUsingType(const UnresolvedUsingTypenameDecl *Decl) const
Definition: ASTContext.cpp:4644
clang::QualType::getCanonicalType
QualType getCanonicalType() const
Definition: Type.h:6489
clang::ASTContext::SatShortAccumTy
CanQualType SatShortAccumTy
Definition: ASTContext.h:1091
clang::FieldDecl
Represents a member of a struct/union/class.
Definition: Decl.h:2838
clang::DiagnosticsEngine
Concrete class used by the front-end to report problems and issues.
Definition: Diagnostic.h:191
clang::TypeInfoChars::isAlignRequired
bool isAlignRequired()
Definition: ASTContext.h:202
clang::ASTContext::getBaseElementType
QualType getBaseElementType(const ArrayType *VAT) const
Return the innermost element type of an array type.
Definition: ASTContext.cpp:6372
clang::Qualifiers
The collection of all-type qualifiers we support.
Definition: Type.h:146
clang::ast_matchers::type
const internal::VariadicAllOfMatcher< Type > type
Matches Types in the clang AST.
Definition: ASTMatchersInternal.cpp:773
clang::ParmVarDecl
Represents a parameter to a function.
Definition: Decl.h:1663
clang::ASTContext::TUKind
const TranslationUnitKind TUKind
Definition: ASTContext.h:649
clang::TargetInfo
Exposes information about the current target.
Definition: TargetInfo.h:186
clang::CanQual< Type >::CreateUnsafe
static CanQual< Type > CreateUnsafe(QualType Other)
Builds a canonical type from a QualType.
Definition: CanonicalType.h:642
int
__device__ int
Definition: __clang_hip_libdevice_declares.h:63
clang::ASTContext::getAuxTargetInfo
const TargetInfo * getAuxTargetInfo() const
Definition: ASTContext.h:746
clang::TypeInfo::Width
uint64_t Width
Definition: ASTContext.h:180
clang::ASTContext::getUnsignedWCharType
QualType getUnsignedWCharType() const
Return the type of "unsigned wchar_t".
Definition: ASTContext.cpp:5813
clang::ASTContext::BlockRequiresCopying
bool BlockRequiresCopying(QualType Ty, const VarDecl *D)
Returns true iff we need copy/dispose helpers for the given type.
Definition: ASTContext.cpp:6921
clang::ASTContext::getFunctionType
QualType getFunctionType(QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
Return a normal function type with a typed argument list.
Definition: ASTContext.h:1520
clang::ASTContext::addComment
void addComment(const RawComment &RC)
Definition: ASTContext.cpp:308
clang::AlignRequirementKind::RequiredByEnum
@ RequiredByEnum
The alignment comes from an alignment attribute on a enum type.
clang::ASTContext::getBOOLDecl
TypedefDecl * getBOOLDecl() const
Retrieve declaration of 'BOOL' typedef.
Definition: ASTContext.h:2034
clang::ASTContext::eraseDeclAttrs
void eraseDeclAttrs(const Decl *D)
Erase the attributes corresponding to the given declaration.
Definition: ASTContext.cpp:1514
clang::ASTContext::getInstantiatedFromUsingEnumDecl
UsingEnumDecl * getInstantiatedFromUsingEnumDecl(UsingEnumDecl *Inst)
If the given using-enum decl Inst is an instantiation of another using-enum decl, return it.
Definition: ASTContext.cpp:1582
clang::UsingShadowDecl
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
Definition: DeclCXX.h:3186
clang::ASTContext::PSF_Execute
@ PSF_Execute
Definition: ASTContext.h:3225
clang::ASTContext::PSF_Write
@ PSF_Write
Definition: ASTContext.h:3224
clang::ASTContext::getObjCEncodingTypeSize
CharUnits getObjCEncodingTypeSize(QualType T) const
Return the size of type T for Objective-C encoding purpose, in characters.
Definition: ASTContext.cpp:7020
clang::ASTContext::setObjCNSStringType
void setObjCNSStringType(QualType T)
Definition: ASTContext.h:1798
clang::ASTContext::getCorrespondingSignedFixedPointType
QualType getCorrespondingSignedFixedPointType(QualType Ty) const
Definition: ASTContext.cpp:11761
clang::ASTContext::createMangleContext
MangleContext * createMangleContext(const TargetInfo *T=nullptr)
If T is null pointer, assume the target in ASTContext.
Definition: ASTContext.cpp:11265
clang::ObjCPropertyImplDecl
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Definition: DeclObjC.h:2750
ProfileList.h
clang::ASTContext::NumImplicitCopyConstructorsDeclared
unsigned NumImplicitCopyConstructorsDeclared
The number of implicitly-declared copy constructors for which declarations were built.
Definition: ASTContext.h:3062
clang::ASTContext::OverloadTy
CanQualType OverloadTy
Definition: ASTContext.h:1101
clang::QualType::withFastQualifiers
QualType withFastQualifiers(unsigned TQs) const
Definition: Type.h:889
llvm::Optional< unsigned >
clang::ASTContext::getObjCMethodRedeclaration
const ObjCMethodDecl * getObjCMethodRedeclaration(const ObjCMethodDecl *MD) const
Get the duplicate declaration of a ObjCMethod in the same interface, or null if none exists.
Definition: ASTContext.cpp:2896
clang::ASTContext::getManglingNumber
unsigned getManglingNumber(const NamedDecl *ND) const
Definition: ASTContext.cpp:11374
clang::ASTContext::getScalableVectorType
QualType getScalableVectorType(QualType EltTy, unsigned NumElts) const
Return the unique reference to a scalable vector type of the specified element type and scalable numb...
Definition: ASTContext.cpp:3932
llvm::SmallPtrSet
Definition: ASTContext.h:82
clang::ASTContext::SectionInfo::SectionFlags
int SectionFlags
Definition: ASTContext.h:3234
clang::ASTContext::mayExternalizeStaticVar
bool mayExternalizeStaticVar(const Decl *D) const
Whether a C++ static variable may be externalized.
Definition: ASTContext.cpp:11878
clang::NoSanitizeList
Definition: NoSanitizeList.h:29
clang::ASTContext::getUnqualifiedObjCPointerType
QualType getUnqualifiedObjCPointerType(QualType type) const
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier r...
Definition: ASTContext.h:2131
clang::ASTContext::PSF_None
@ PSF_None
Definition: ASTContext.h:3222
clang::interp::Context
Holds all information required to evaluate constexpr code in a module.
Definition: Context.h:36
clang::ASTContext::canBindObjCObjectType
bool canBindObjCObjectType(QualType To, QualType From)
Definition: ASTContext.cpp:9543
clang::ASTContext::cloneFullComment
comments::FullComment * cloneFullComment(comments::FullComment *FC, const Decl *D) const
Definition: ASTContext.cpp:537
clang::ASTContext::getWIntType
QualType getWIntType() const
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target.
Definition: ASTContext.h:1747
clang::AlignRequirementKind
AlignRequirementKind
Definition: ASTContext.h:165
clang::ASTContext::getTargetDefaultAlignForAttributeAligned
unsigned getTargetDefaultAlignForAttributeAligned() const
Return the default alignment for attribute((aligned)) on this target, to be used if no alignment valu...
Definition: ASTContext.cpp:2538
clang::ASTContext::UnwrapSimilarArrayTypes
void UnwrapSimilarArrayTypes(QualType &T1, QualType &T2, bool AllowPiMismatch=true)
Attempt to unwrap two types that may both be array types with the same bound (or both be array types ...
Definition: ASTContext.cpp:5929
clang::ASTContext::Char8Ty
CanQualType Char8Ty
Definition: ASTContext.h:1079
clang::ASTContext::mergeTransparentUnionType
QualType mergeTransparentUnionType(QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
mergeTransparentUnionType - if T is a transparent union type and a member of T is compatible with Sub...
Definition: ASTContext.cpp:9572
clang::tooling::X
static ToolExecutorPluginRegistry::Add< AllTUsToolExecutorPlugin > X("all-TUs", "Runs FrontendActions on all TUs in the compilation database. " "Tool results are stored in memory.")
clang::ASTContext::getObjCIdRedefinitionType
QualType getObjCIdRedefinitionType() const
Retrieve the type that id has been defined to, which may be different from the built-in id if id has ...
Definition: ASTContext.h:1804
clang::PrintingPolicy
Describes how types, statements, expressions, and declarations should be printed.
Definition: PrettyPrinter.h:57
clang::ASTContext::Ibm128Ty
CanQualType Ibm128Ty
Definition: ASTContext.h:1085
clang::ASTContext::getCurrentKeyFunction
const CXXMethodDecl * getCurrentKeyFunction(const CXXRecordDecl *RD)
Get our current best idea for the key function of the given record decl, or nullptr if there isn't on...
Definition: RecordLayoutBuilder.cpp:3355
clang::ASTContext::getUnsignedPointerDiffType
QualType getUnsignedPointerDiffType() const
Return the unique unsigned counterpart of "ptrdiff_t" integer type.
Definition: ASTContext.cpp:5835
clang::ASTContext::getPackExpansionType
QualType getPackExpansionType(QualType Pattern, Optional< unsigned > NumExpansions, bool ExpectPackInType=true)
Form a pack expansion type with the given pattern.
Definition: ASTContext.cpp:5114
clang::ASTContext::getFixedPointMax
llvm::APFixedPoint getFixedPointMax(QualType Ty) const
Definition: ASTContext.cpp:11751
clang::FunctionType
FunctionType - C99 6.7.5.3 - Function Declarators.
Definition: Type.h:3547
clang::ASTContext::getUsingType
QualType getUsingType(const UsingShadowDecl *Found, QualType Underlying) const
Definition: ASTContext.cpp:4597
clang::ASTContext::applyObjCProtocolQualifiers
QualType applyObjCProtocolQualifiers(QualType type, ArrayRef< ObjCProtocolDecl * > protocols, bool &hasError, bool allowOnPointerType=false) const
Apply Objective-C protocol qualifiers to the given type.
Definition: ASTContext.cpp:5268
clang::ASTContext::getNSCopyingName
IdentifierInfo * getNSCopyingName()
Retrieve the identifier 'NSCopying'.
Definition: ASTContext.h:1851
clang::ASTContext::getLocalCommentForDeclUncached
comments::FullComment * getLocalCommentForDeclUncached(const Decl *D) const
Return parsed documentation comment attached to a given declaration.
Definition: ASTContext.cpp:552
clang::ASTContext::setCFConstantStringType
void setCFConstantStringType(QualType T)
Definition: ASTContext.cpp:6796
clang::ASTContext::getDependentBitIntType
QualType getDependentBitIntType(bool Unsigned, Expr *BitsExpr) const
Return a dependent bit-precise integer type with the specified signedness and bit count.
Definition: ASTContext.cpp:4502
ASTFwd.h
clang::ASTContext::toBits
int64_t toBits(CharUnits CharSize) const
Convert a size in characters to a size in bits.
Definition: ASTContext.cpp:2447
clang::ASTContext::getAutoRRefDeductType
QualType getAutoRRefDeductType() const
C++11 deduction pattern for 'auto &&' type.
Definition: ASTContext.cpp:5765
TemplateName.h
clang::DeclarationName
The name of a declaration.
Definition: DeclarationName.h:143
End
SourceLocation End
Definition: USRLocFinder.cpp:167
clang::ASTContext::getDeducedTemplateSpecializationType
QualType getDeducedTemplateSpecializationType(TemplateName Template, QualType DeducedType, bool IsDependent) const
C++17 deduced class template specialization type.
Definition: ASTContext.cpp:5704
clang::ASTContext::getSourceManager
SourceManager & getSourceManager()
Definition: ASTContext.h:693
clang::ASTContext::getDecayedType
QualType getDecayedType(QualType T) const
Return the uniqued reference to the decayed version of the given type.
Definition: ASTContext.cpp:3299
clang::ASTContext::getTranslationUnitDecl
TranslationUnitDecl * getTranslationUnitDecl() const
Definition: ASTContext.h:1055
clang::TargetCXXABI::Kind
Kind
The basic C++ ABI kind.
Definition: TargetCXXABI.h:31
clang::ASTContext::Char16Ty
CanQualType Char16Ty
Definition: ASTContext.h:1080
clang::ASTContext::AtomicUsesUnsupportedLibcall
bool AtomicUsesUnsupportedLibcall(const AtomicExpr *E) const
Definition: ASTContext.cpp:11519
clang::ASTContext::hasSameTemplateName
bool hasSameTemplateName(TemplateName X, TemplateName Y)
Determine whether the given template names refer to the same template.
Definition: ASTContext.cpp:6144
clang::ASTContext::getcudaConfigureCallDecl
FunctionDecl * getcudaConfigureCallDecl()
Definition: ASTContext.h:1379
clang::ASTContext::getFixedPointScale
unsigned char getFixedPointScale(QualType Ty) const
Definition: ASTContext.cpp:11648
clang::ASTContext::NumImplicitCopyConstructors
unsigned NumImplicitCopyConstructors
The number of implicitly-declared copy constructors.
Definition: ASTContext.h:3058
clang::Qualifiers::Restrict
@ Restrict
Definition: Type.h:150
clang::TypeInfo::AlignRequirement
AlignRequirementKind AlignRequirement
Definition: ASTContext.h:182
clang::ASTContext::mergeExtParameterInfo
bool mergeExtParameterInfo(const FunctionProtoType *FirstFnType, const FunctionProtoType *SecondFnType, bool &CanUseFirst, bool &CanUseSecond, SmallVectorImpl< FunctionProtoType::ExtParameterInfo > &NewParamInfos)
This function merges the ExtParameterInfo lists of two functions.
Definition: ASTContext.cpp:10163
clang::ASTContext::CommentsLoaded
bool CommentsLoaded
True if comments are already loaded from ExternalASTSource.
Definition: ASTContext.h:796
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:626
clang::ASTContext::InlineVariableDefinitionKind::WeakUnknown
@ WeakUnknown
Weak for now, might become strong later in this TU.
clang::ASTContext::getRawCFConstantStringType
QualType getRawCFConstantStringType() const
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built.
Definition: ASTContext.h:1779
clang::EnumDecl
Represents an enum.
Definition: Decl.h:3593
clang::ASTContext::getCanonicalFunctionResultType
CanQualType getCanonicalFunctionResultType(QualType ResultType) const
Adjust the given function result type.
Definition: ASTContext.cpp:4260
clang::ASTContext::getObjCEncodingForMethodDecl
std::string getObjCEncodingForMethodDecl(const ObjCMethodDecl *Decl, bool Extended=false) const
Emit the encoded type for the method declaration Decl into S.
Definition: ASTContext.cpp:7183
clang::ASTContext::OMPIteratorTy
CanQualType OMPIteratorTy
Definition: ASTContext.h:1112
clang::Type
The base class of the type hierarchy.
Definition: Type.h:1491
llvm::RefCountedBase
Definition: LLVM.h:49
Decl.h
clang::ASTContext::ARCUnbridgedCastTy
CanQualType ARCUnbridgedCastTy
Definition: ASTContext.h:1103
clang::ObjCObjectType
Represents a class type in Objective C.
Definition: Type.h:5842
clang::ASTContext::setParameterIndex
void setParameterIndex(const ParmVarDecl *D, unsigned index)
Used by ParmVarDecl to store on the side the index of the parameter when it exceeds the size of the n...
Definition: ASTContext.cpp:11445
clang::ASTContext::SectionInfo::SectionInfo
SectionInfo(NamedDecl *Decl, SourceLocation PragmaSectionLocation, int SectionFlags)
Definition: ASTContext.h:3237
clang::ASTContext::getObjCGCQualType
QualType getObjCGCQualType(QualType T, Qualifiers::GC gcAttr) const
Return the uniqued reference to the type for an Objective-C gc-qualified type.
Definition: ASTContext.cpp:3059
RawCommentList.h
clang::ASTContext::getAttributedType
QualType getAttributedType(attr::Kind attrKind, QualType modifiedType, QualType equivalentType)
Definition: ASTContext.cpp:4660
AddressSpaces.h
clang::ASTContext::getObjCSelDecl
TypedefDecl * getObjCSelDecl() const
Retrieve the typedef corresponding to the predefined 'SEL' type in Objective-C.
Definition: ASTContext.cpp:8109
clang::ASTContext::getAsDependentSizedArrayType
const DependentSizedArrayType * getAsDependentSizedArrayType(QualType T) const
Definition: ASTContext.h:2648
clang::GlobalDecl
GlobalDecl - represents a global declaration.
Definition: GlobalDecl.h:56
clang::ASTContext::local_imports
import_range local_imports() const
Definition: ASTContext.h:1019
clang::ASTContext::getAlignOfGlobalVar
unsigned getAlignOfGlobalVar(QualType T) const
Return the alignment in bits that should be given to a global variable with type T.
Definition: ASTContext.cpp:2544
clang::ASTContext::typesAreCompatible
bool typesAreCompatible(QualType T1, QualType T2, bool CompareUnqualified=false)
Compatibility predicates used to check assignment expressions.
Definition: ASTContext.cpp:9553
clang::ASTContext::getBlockPointerType
QualType getBlockPointerType(QualType T) const
Return the uniqued reference to the type for a block of the specified type.
Definition: ASTContext.cpp:3340
clang::ASTContext::BoundMemberTy
CanQualType BoundMemberTy
Definition: ASTContext.h:1101
clang::RawCommentList
This class represents all comments included in the translation unit, sorted in order of appearance in...
Definition: RawCommentList.h:180
clang::FloatModeKind
FloatModeKind
Definition: TargetInfo.h:53
size_t
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
Definition: opencl-c-base.h:102
clang::ASTContext::ObjCBuiltinBoolTy
CanQualType ObjCBuiltinBoolTy
Definition: ASTContext.h:1105
clang::ASTContext::UnsignedShortFractTy
CanQualType UnsignedShortFractTy
Definition: ASTContext.h:1090
clang::ASTContext::PSF_ZeroInit
@ PSF_ZeroInit
Definition: ASTContext.h:3227
clang::ASTContext::getFixedPointMin
llvm::APFixedPoint getFixedPointMin(QualType Ty) const
Definition: ASTContext.cpp:11756
clang::ASTContext::getTypeAlignInChars
CharUnits getTypeAlignInChars(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in characters.
Definition: ASTContext.cpp:2462
PrettyPrinter.h
clang::CanQual::getTypePtr
const T * getTypePtr() const
Retrieve the underlying type pointer, which refers to a canonical type.
Definition: CanonicalType.h:83
clang::ASTContext::getAssumedTemplateName
TemplateName getAssumedTemplateName(DeclarationName Name) const
Retrieve a template name representing an unqualified-id that has been assumed to name a template for ...
Definition: ASTContext.cpp:8592
APSInt
llvm::APSInt APSInt
Definition: ByteCodeEmitter.cpp:19
clang::Redeclarable::setPreviousDecl
void setPreviousDecl(decl_type *PrevDecl)
Set the previous declaration.
Definition: Decl.h:4605
U
clang::ASTContext::Allocate
void * Allocate(size_t Size, unsigned Align=8) const
Definition: ASTContext.h:706
clang::UnresolvedUsingTypenameDecl
Represents a dependent using declaration which was marked with typename.
Definition: DeclCXX.h:3808
clang::ASTContext::UnsignedShortAccumTy
CanQualType UnsignedShortAccumTy
Definition: ASTContext.h:1088
clang::Qualifiers::hasNonFastQualifiers
bool hasNonFastQualifiers() const
Return true if the set contains any qualifiers which require an ExtQuals node to be allocated.
Definition: Type.h:415
clang::ASTContext::getReferenceQualifiedType
QualType getReferenceQualifiedType(const Expr *e) const
getReferenceQualifiedType - Given an expr, will return the type for that expression,...
Definition: ASTContext.cpp:5549
clang::ASTContext::setTraversalScope
void setTraversalScope(const std::vector< Decl * > &)
Definition: ASTContext.cpp:1034
clang::ASTContext::ProtocolCompatibleWithProtocol
bool ProtocolCompatibleWithProtocol(ObjCProtocolDecl *lProto, ObjCProtocolDecl *rProto) const
ProtocolCompatibleWithProtocol - return 'true' if 'lProto' is in the inheritance hierarchy of 'rProto...
Definition: ASTContext.cpp:8957
clang::ASTContext::getObjCIdType
QualType getObjCIdType() const
Represents the Objective-CC id type.
Definition: ASTContext.h:2003
clang::TypeInfo
Definition: ASTContext.h:179
clang::ASTContext::setNonKeyFunction
void setNonKeyFunction(const CXXMethodDecl *method)
Observe that the given method cannot be a key function.
Definition: RecordLayoutBuilder.cpp:3378
clang::ASTContext::getUIntPtrType
QualType getUIntPtrType() const
Return a type compatible with "uintptr_t" (C99 7.18.1.4), as defined by the target.
Definition: ASTContext.cpp:5822
V
#define V(N, I)
Definition: ASTContext.h:3127
clang::ASTContext::getSubstTemplateTypeParmPackType
QualType getSubstTemplateTypeParmPackType(const TemplateTypeParmType *Replaced, const TemplateArgument &ArgPack)
Retrieve a.
Definition: ASTContext.cpp:4704
clang::ASTContext::getIntMaxType
CanQualType getIntMaxType() const
Return the unique type for "intmax_t" (C99 7.18.1.5), defined in <stdint.h>.
Definition: ASTContext.cpp:5795
clang::ASTContext::CollectInheritedProtocols
void CollectInheritedProtocols(const Decl *CDecl, llvm::SmallPtrSet< ObjCProtocolDecl *, 8 > &Protocols)
CollectInheritedProtocols - Collect all protocols in current class and those inherited by it.
Definition: ASTContext.cpp:2608
clang::ASTContext::getExternalSource
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any.
Definition: ASTContext.h:1156
clang::ASTContext::getSubstTemplateTemplateParm
TemplateName getSubstTemplateTemplateParm(TemplateTemplateParmDecl *param, TemplateName replacement) const
Definition: ASTContext.cpp:8695
clang::ASTContext::getObjCIdDecl
TypedefDecl * getObjCIdDecl() const
Retrieve the typedef corresponding to the predefined id type in Objective-C.
Definition: ASTContext.cpp:8100
clang::TranslationUnitDecl
The top declaration context.
Definition: Decl.h:80
clang::ASTContext::getExtVectorType
QualType getExtVectorType(QualType VectorType, unsigned NumElts) const
Return the unique reference to an extended vector type of the specified element type and size.
Definition: ASTContext.cpp:4043
clang::ASTContext::getExnObjectAlignment
CharUnits getExnObjectAlignment() const
Return the alignment (in bytes) of the thrown exception object.
Definition: ASTContext.cpp:1830
clang::ASTContext::SatLongFractTy
CanQualType SatLongFractTy
Definition: ASTContext.h:1094
clang::MangleContext
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
Definition: Mangle.h:44
clang::Module
Describes a module or submodule.
Definition: Module.h:96
clang::Type::isSignedIntegerOrEnumerationType
bool isSignedIntegerOrEnumerationType() const
Determines whether this is an integer type that is signed or an enumeration types whose underlying ty...
Definition: Type.cpp:2034
clang::ASTContext::removeAddrSpaceQualType
QualType removeAddrSpaceQualType(QualType T) const
Remove any existing address space on the type and returns the type with qualifiers intact (or that's ...
Definition: ASTContext.cpp:3025
clang::ASTContext::areCompatibleSveTypes
bool areCompatibleSveTypes(QualType FirstType, QualType SecondType)
Return true if the given types are an SVE builtin and a VectorType that is a fixed-length representat...
Definition: ASTContext.cpp:8847
clang::ASTContext::getOffsetOfBaseWithVBPtr
CharUnits getOffsetOfBaseWithVBPtr(const CXXRecordDecl *RD) const
Loading virtual member pointers using the virtual inheritance model always results in an adjustment u...
Definition: ASTContext.cpp:2556
clang::ASTContext::WideCharTy
CanQualType WideCharTy
Definition: ASTContext.h:1077
clang::ASTContext::NumImplicitMoveAssignmentOperators
unsigned NumImplicitMoveAssignmentOperators
The number of implicitly-declared move assignment operators.
Definition: ASTContext.h:3079
clang::TemplateArgumentListInfo
A convenient class for passing around template argument information.
Definition: TemplateBase.h:563
clang::ASTContext::AccumTy
CanQualType AccumTy
Definition: ASTContext.h:1086
clang::ASTContext::OCLSamplerTy
CanQualType OCLSamplerTy
Definition: ASTContext.h:1109
clang::ImportDecl
Describes a module import declaration, which makes the contents of the named module visible in the cu...
Definition: Decl.h:4454
clang::ASTContext::getAsConstantArrayType
const ConstantArrayType * getAsConstantArrayType(QualType T) const
Definition: ASTContext.h:2639
clang::ASTContext::getDependentVectorType
QualType getDependentVectorType(QualType VectorType, Expr *SizeExpr, SourceLocation AttrLoc, VectorType::VectorKind VecKind) const
Return the unique reference to the type for a dependently sized vector of the specified element type.
Definition: ASTContext.cpp:4002
clang::ASTContext::WIntTy
CanQualType WIntTy
Definition: ASTContext.h:1078
clang::ASTContext::getTypeOfType
QualType getTypeOfType(QualType t) const
getTypeOfType - Unlike many "get<Type>" functions, we don't unique TypeOfType nodes.
Definition: ASTContext.cpp:5539
clang::LangASMap
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones.
Definition: AddressSpaces.h:67
clang::ASTContext::getNameForTemplate
DeclarationNameInfo getNameForTemplate(TemplateName Name, SourceLocation NameLoc) const
Definition: ASTContext.cpp:6049
clang::TagTypeKind
TagTypeKind
The kind of a tag type.
Definition: Type.h:5334
Node
DynTypedNode Node
Definition: ASTMatchFinder.cpp:67
clang::ASTContext::NumImplicitCopyAssignmentOperators
unsigned NumImplicitCopyAssignmentOperators
The number of implicitly-declared copy assignment operators.
Definition: ASTContext.h:3072
clang::ASTContext::getAsIncompleteArrayType
const IncompleteArrayType * getAsIncompleteArrayType(QualType T) const
Definition: ASTContext.h:2645
clang::ASTContext::getObjCImplementation
ObjCImplementationDecl * getObjCImplementation(ObjCInterfaceDecl *D)
Get the implementation of the ObjCInterfaceDecl D, or nullptr if none exists.
Definition: ASTContext.cpp:2863
clang::ASTContext::getDefaultCallingConvention
CallingConv getDefaultCallingConvention(bool IsVariadic, bool IsCXXMethod, bool IsBuiltin=false) const
Retrieves the default calling convention for the current target.
Definition: ASTContext.cpp:11207
clang::FunctionProtoType::ExceptionSpecInfo
Holds information about the various types of exception specification.
Definition: Type.h:3943
clang::ASTContext::getReadPipeType
QualType getReadPipeType(QualType T) const
Return a read_only pipe type for the specified type.
Definition: ASTContext.cpp:4480
DeclBase.h
clang::ASTContext::getUInt128Decl
TypedefDecl * getUInt128Decl() const
Retrieve the declaration for the 128-bit unsigned integer type.
Definition: ASTContext.cpp:1267
clang::ConceptDecl
Declaration of a C++2a concept.
Definition: DeclTemplate.h:3235
clang::SelectorTable::getSelector
Selector getSelector(unsigned NumArgs, IdentifierInfo **IIV)
Can create any sort of selector.
Definition: IdentifierTable.cpp:701
clang::ASTContext::Float16Ty
CanQualType Float16Ty
Definition: ASTContext.h:1099
clang::ASTContext::Selectors
SelectorTable & Selectors
Definition: ASTContext.h:647
OperatorKinds.h
clang::ASTContext::getAsArrayType
const ArrayType * getAsArrayType(QualType T) const
Type Query functions.
Definition: ASTContext.cpp:6261
clang::ASTContext::getBlockVarCopyInit
BlockVarCopyInit getBlockVarCopyInit(const VarDecl *VD) const
Get the copy initialization expression of the VarDecl VD, or nullptr if none exists.
Definition: ASTContext.cpp:2920
clang::Decl::ObjCDeclQualifier
ObjCDeclQualifier
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declaration...
Definition: DeclBase.h:195
clang::ASTContext::getFunctionTypeWithExceptionSpec
QualType getFunctionTypeWithExceptionSpec(QualType Orig, const FunctionProtoType::ExceptionSpecInfo &ESI)
Get a function type and produce the equivalent function type with the specified exception specificati...
Definition: ASTContext.cpp:3135
clang::ASTContext::getPrimaryMergedDecl
Decl * getPrimaryMergedDecl(Decl *D)
Definition: ASTContext.h:1023
clang::VectorType
Represents a GCC generic vector type.
Definition: Type.h:3230
clang::ASTContext::getTargetNullPointerValue
uint64_t getTargetNullPointerValue(QualType QT) const
Get target-dependent integer value for null pointer which is used for constant folding.
Definition: ASTContext.cpp:11568
clang::ASTContext::PSF_Read
@ PSF_Read
Definition: ASTContext.h:3223
clang::ASTContext::DependentTy
CanQualType DependentTy
Definition: ASTContext.h:1101
clang::TypeInfoChars::TypeInfoChars
TypeInfoChars()
Definition: ASTContext.h:198
clang::ASTContext::getTypeInfoDataSizeInChars
TypeInfoChars getTypeInfoDataSizeInChars(QualType T) const
Definition: ASTContext.cpp:1838
clang::ASTContext
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition: ASTContext.h:209
clang::TU_Incremental
@ TU_Incremental
The translation unit is a is a complete translation unit that we might incrementally extend later.
Definition: LangOptions.h:717
clang::GetUnarySelector
Selector GetUnarySelector(StringRef name, ASTContext &Ctx)
Utility function for constructing an unary selector.
Definition: ASTContext.h:3273
clang::ASTContext::getSizeType
CanQualType getSizeType() const
Return the unique type for "size_t" (C99 7.17), defined in <stddef.h>.
Definition: ASTContext.cpp:5784
clang::ComparisonCategories
Definition: ComparisonCategories.h:173
clang::ASTContext::addOverriddenMethod
void addOverriddenMethod(const CXXMethodDecl *Method, const CXXMethodDecl *Overridden)
Note that the given C++ Method overrides the given Overridden method.
Definition: ASTContext.cpp:1657
clang::ASTContext::getTypeAlignIfKnown
unsigned getTypeAlignIfKnown(QualType T, bool NeedsPreferredAlignment=false) const
Return the alignment of a type, in bits, or 0 if the type is incomplete and we cannot determine the a...
Definition: ASTContext.cpp:1894
clang::StreamingDiagnostic
The streaming interface shared between DiagnosticBuilder and PartialDiagnostic.
Definition: Diagnostic.h:1108
clang::ASTContext::getUnaryTransformType
QualType getUnaryTransformType(QualType BaseType, QualType UnderlyingType, UnaryTransformType::UTTKind UKind) const
Unary type transforms.
Definition: ASTContext.cpp:5604
clang::ArrayType
Represents an array type, per C99 6.7.5.2 - Array Declarators.
Definition: Type.h:2884
NestedNameSpecifier.h
clang::ASTContext::getFloatingTypeOrder
int getFloatingTypeOrder(QualType LHS, QualType RHS) const
Compare the rank of the two specified floating point types, ignoring the domain of the type (i....
Definition: ASTContext.cpp:6460
LangOptions.h
clang::ASTContext::SectionInfo::PragmaSectionLocation
SourceLocation PragmaSectionLocation
Definition: ASTContext.h:3233
clang::ASTContext::getCFConstantStringType
QualType getCFConstantStringType() const
Return the C structure type used to represent constant CFStrings.
Definition: ASTContext.cpp:6783
clang::ASTContext::DeepCollectObjCIvars
void DeepCollectObjCIvars(const ObjCInterfaceDecl *OI, bool leafClass, SmallVectorImpl< const ObjCIvarDecl * > &Ivars) const
DeepCollectObjCIvars - This routine first collects all declared, but not synthesized,...
Definition: ASTContext.cpp:2590
Depth
int Depth
Definition: ASTDiff.cpp:191
clang::ASTContext::overridden_method_range
llvm::iterator_range< overridden_cxx_method_iterator > overridden_method_range
Definition: ASTContext.h:989
clang::ASTContext::getConstantArrayElementCount
uint64_t getConstantArrayElementCount(const ConstantArrayType *CA) const
Return number of constant array elements.
Definition: ASTContext.cpp:6392
clang::ASTContext::getRValueReferenceType
QualType getRValueReferenceType(QualType T) const
Return the uniqued reference to the type for an rvalue reference to the specified type.
Definition: ASTContext.cpp:3411
clang::ASTContext::getObjCSuperType
QualType getObjCSuperType() const
Returns the C struct type for objc_super.
Definition: ASTContext.cpp:6787
clang::ASTContext::getAsVariableArrayType
const VariableArrayType * getAsVariableArrayType(QualType T) const
Definition: ASTContext.h:2642
clang::TypeInfo::isAlignRequired
bool isAlignRequired()
Definition: ASTContext.h:188
clang::ASTContext::getDeclAttrs
AttrVec & getDeclAttrs(const Decl *D)
Retrieve the attributes for the given declaration.
Definition: ASTContext.cpp:1503
clang::TemplateArgument
Represents a template argument.
Definition: TemplateBase.h:61
clang::ASTContext::UnsignedFractTy
CanQualType UnsignedFractTy
Definition: ASTContext.h:1090
clang::ASTMutationListener
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
Definition: ASTMutationListener.h:46
clang::ASTContext::getSignatureParameterType
QualType getSignatureParameterType(QualType T) const
Retrieve the parameter type as adjusted for use in the signature of a function, decaying array and fu...
Definition: ASTContext.cpp:6325
clang::ASTContext::BuiltinVectorTypeInfo::EC
llvm::ElementCount EC
Definition: ASTContext.h:1448
clang::LazyGenerationalUpdatePtr
A lazy value (of type T) that is within an AST node of type Owner, where the value might change in la...
Definition: ExternalASTSource.h:388
clang::ASTContext::filterFunctionTargetAttrs
ParsedTargetAttr filterFunctionTargetAttrs(const TargetAttr *TD) const
Parses the target attributes passed in, and returns only the ones that are valid feature names.
Definition: ASTContext.cpp:11796
clang::ASTContext::setInstantiatedFromUsingShadowDecl
void setInstantiatedFromUsingShadowDecl(UsingShadowDecl *Inst, UsingShadowDecl *Pattern)
Definition: ASTContext.cpp:1607
clang::CanQualType
CanQual< Type > CanQualType
Represents a canonical, potentially-qualified type.
Definition: CanonicalType.h:212
clang::ASTContext::WCharTy
CanQualType WCharTy
Definition: ASTContext.h:1076
clang::ASTContext::setExternalSource
void setExternalSource(IntrusiveRefCntPtr< ExternalASTSource > Source)
Attach an external AST source to the AST context.
Definition: ASTContext.cpp:1044
clang::ASTContext::NumImplicitDefaultConstructorsDeclared
unsigned NumImplicitDefaultConstructorsDeclared
The number of implicitly-declared default constructors for which declarations were built.
Definition: ASTContext.h:3055
clang::ASTContext::getObjCInterfaceType
QualType getObjCInterfaceType(const ObjCInterfaceDecl *Decl, ObjCInterfaceDecl *PrevDecl=nullptr) const
getObjCInterfaceType - Return the unique reference to the type for the specified ObjC interface decl.
Definition: ASTContext.cpp:5478
clang::ASTContext::getTemplateTypeParmType
QualType getTemplateTypeParmType(unsigned Depth, unsigned Index, bool ParameterPack, TemplateTypeParmDecl *ParmDecl=nullptr) const
Retrieve the template type parameter type for a template parameter or parameter pack with the given d...
Definition: ASTContext.cpp:4740
clang::ASTContext::ParsedComments
llvm::DenseMap< const Decl *, comments::FullComment * > ParsedComments
Mapping from declarations to parsed comments attached to any redeclaration.
Definition: ASTContext.h:822
clang::Qualifiers::Volatile
@ Volatile
Definition: Type.h:151
clang::ASTContext::getBuiltinVectorTypeInfo
BuiltinVectorTypeInfo getBuiltinVectorTypeInfo(const BuiltinType *VecTy) const
Returns the element type, element count and number of vectors (in case of tuple) for a builtin vector...
Definition: ASTContext.cpp:3804
clang::ASTContext::UnknownAnyTy
CanQualType UnknownAnyTy
Definition: ASTContext.h:1101
clang::ASTContext::getTypeInfo
TypeInfo getTypeInfo(QualType T) const
Definition: ASTContext.h:2249
clang::MSGuidDecl
A global _GUID constant.
Definition: DeclCXX.h:4138
clang::comments::FullComment
A full comment attached to a declaration, contains block content.
Definition: Comment.h:1088
clang::ASTContext::getTypeSize
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
Definition: ASTContext.h:2255
clang::ASTContext::hasUniqueObjectRepresentations
bool hasUniqueObjectRepresentations(QualType Ty) const
Return true if the specified type has unique object representations according to (C++17 [meta....
Definition: ASTContext.cpp:2758
clang::ASTContext::getAutoDeductType
QualType getAutoDeductType() const
C++11 deduction pattern for 'auto' type.
Definition: ASTContext.cpp:5754
Linkage.h
IdentifierTable.h
clang::ASTContext::getXRayFilter
const XRayFunctionFilter & getXRayFilter() const
Definition: ASTContext.h:775
Type.h
clang::TypeInfoChars::Align
CharUnits Align
Definition: ASTContext.h:195
clang::ASTContext::UnwrapSimilarTypes
bool UnwrapSimilarTypes(QualType &T1, QualType &T2, bool AllowPiMismatch=true)
Attempt to unwrap two types that may be similar (C++ [conv.qual]).
Definition: ASTContext.cpp:5980
clang::diff::DynTypedNode
DynTypedNode DynTypedNode
Definition: ASTDiffInternal.h:18
clang::ASTContext::ObjCBuiltinSelTy
CanQualType ObjCBuiltinSelTy
Definition: ASTContext.h:1104
clang::ASTContext::getObjCEncodingForBlock
std::string getObjCEncodingForBlock(const BlockExpr *blockExpr) const
Return the encoded type for this block declaration.
Definition: ASTContext.cpp:7069
clang::diff::Update
@ Update
Definition: ASTDiff.h:30
clang::SelectorTable
This table allows us to fully hide how we implement multi-keyword caching.
Definition: IdentifierTable.h:893
clang::ASTContext::adjustExceptionSpec
void adjustExceptionSpec(FunctionDecl *FD, const FunctionProtoType::ExceptionSpecInfo &ESI, bool AsWritten=false)
Change the exception specification on a function once it is delay-parsed, instantiated,...
Definition: ASTContext.cpp:3194
clang::TemplateTemplateParmDecl
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Definition: DeclTemplate.h:1601
clang::TypeInfoChars::Width
CharUnits Width
Definition: ASTContext.h:194
clang::RawComment
Definition: RawCommentList.h:32
clang::ASTContext::getRecordType
QualType getRecordType(const RecordDecl *Decl) const
Definition: ASTContext.cpp:4618
clang::AlignRequirementKind::RequiredByTypedef
@ RequiredByTypedef
The alignment comes from an alignment attribute on a typedef.
clang::ASTContext::CompCategories
ComparisonCategories CompCategories
Types and expressions required to build C++2a three-way comparisons using operator<=>,...
Definition: ASTContext.h:2197
clang::ASTContext::getCanonicalType
const Type * getCanonicalType(const Type *T) const
Definition: ASTContext.h:2482
clang::ASTContext::getIntTypeForBitwidth
QualType getIntTypeForBitwidth(unsigned DestWidth, unsigned Signed) const
getIntTypeForBitwidth - sets integer QualTy according to specified details: bitwidth,...
Definition: ASTContext.cpp:11335
clang::ASTContext::getFloatingTypeSemanticOrder
int getFloatingTypeSemanticOrder(QualType LHS, QualType RHS) const
Compare the rank of two floating point types as above, but compare equal if both types have the same ...
Definition: ASTContext.cpp:6471
clang::CallingConv
CallingConv
CallingConv - Specifies the calling convention that a function uses.
Definition: Specifiers.h:263
clang::ASTContext::getObjContainingInterface
const ObjCInterfaceDecl * getObjContainingInterface(const NamedDecl *ND) const
Returns the Objective-C interface that ND belongs to if it is an Objective-C method/property/ivar etc...
Definition: ASTContext.cpp:2906
clang::ASTContext::LongAccumTy
CanQualType LongAccumTy
Definition: ASTContext.h:1087
clang::VarDecl
Represents a variable declaration or definition.
Definition: Decl.h:874
clang::ASTContext::canAssignObjCInterfaces
bool canAssignObjCInterfaces(const ObjCObjectPointerType *LHSOPT, const ObjCObjectPointerType *RHSOPT)
canAssignObjCInterfaces - Return true if the two interface types are compatible for assignment from R...
Definition: ASTContext.cpp:9103
clang::ASTContext::setObjCClassRedefinitionType
void setObjCClassRedefinitionType(QualType RedefType)
Set the user-written type that redefines 'SEL'.
Definition: ASTContext.h:1824
clang::ASTContext::FloatTy
CanQualType FloatTy
Definition: ASTContext.h:1085
clang::ASTContext::getObjCClassType
QualType getObjCClassType() const
Represents the Objective-C Class type.
Definition: ASTContext.h:2025
clang::ASTContext::UnsignedLongAccumTy
CanQualType UnsignedLongAccumTy
Definition: ASTContext.h:1088
clang::XRayFunctionFilter
Definition: XRayLists.h:29
clang::TagDecl
Represents the declaration of a struct/union/class/enum.
Definition: Decl.h:3331
clang::ASTContext::getRealTypeForBitwidth
QualType getRealTypeForBitwidth(unsigned DestWidth, FloatModeKind ExplicitType) const
getRealTypeForBitwidth - sets floating point QualTy according to specified bitwidth.
Definition: ASTContext.cpp:11347
clang::Type::getCanonicalTypeInternal
QualType getCanonicalTypeInternal() const
Definition: Type.h:2458
clang::ASTContext::getBoolName
IdentifierInfo * getBoolName() const
Retrieve the identifier 'bool'.
Definition: ASTContext.h:1864
clang::TemplateParameterList
Stores a list of template parameters for a TemplateDecl and its derived classes.
Definition: DeclTemplate.h:69
clang::StringLiteral
StringLiteral - This represents a string literal expression, e.g.
Definition: Expr.h:1767
clang::ASTContext::getDefaultOpenCLPointeeAddrSpace
LangAS getDefaultOpenCLPointeeAddrSpace()
Returns default address space based on OpenCL version and enabled features.
Definition: ASTContext.h:1370
clang::ASTContext::getInterpContext
interp::Context & getInterpContext()
Returns the clang bytecode interpreter context.
Definition: ASTContext.cpp:915
clang::ASTContext::isPromotableBitField
QualType isPromotableBitField(Expr *E) const
Whether this is a promotable bitfield reference according to C99 6.3.1.1p2, bullet 2 (and GCC extensi...
Definition: ASTContext.cpp:6520
clang::ASTContext::getLifetimeQualifiedType
QualType getLifetimeQualifiedType(QualType type, Qualifiers::ObjCLifetime lifetime)
Return a type with the given lifetime qualifier.
Definition: ASTContext.h:2119
clang::ObjCCategoryImplDecl
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration.
Definition: DeclObjC.h:2492
clang::ASTContext::getCanonicalType
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
Definition: ASTContext.h:2478
clang::CXXABI
Implements C++ ABI-specific semantic analysis functions.
Definition: CXXABI.h:29
clang::ASTContext::setObjCMethodRedeclaration
void setObjCMethodRedeclaration(const ObjCMethodDecl *MD, const ObjCMethodDecl *Redecl)
Definition: ASTContext.cpp:2900
clang::TypeDecl
Represents a declaration of a type.
Definition: Decl.h:3141
clang::SplitQualType::Ty
const Type * Ty
The locally-unqualified type.
Definition: Type.h:615
clang::ASTContext::getObjCObjectType
QualType getObjCObjectType(QualType Base, ObjCProtocolDecl *const *Protocols, unsigned NumProtocols) const
Legacy interface: cannot provide type arguments or __kindof.
Definition: ASTContext.cpp:5179
llvm::DenseSet
Definition: Sema.h:77
clang::ASTContext::AllocateDeclListNode
DeclListNode * AllocateDeclListNode(clang::NamedDecl *ND)
Allocates a DeclListNode or returns one from the ListNodeFreeList pool.
Definition: ASTContext.h:716
clang::ASTContext::setInstantiatedFromStaticDataMember
void setInstantiatedFromStaticDataMember(VarDecl *Inst, VarDecl *Tmpl, TemplateSpecializationKind TSK, SourceLocation PointOfInstantiation=SourceLocation())
Note that the static data member Inst is an instantiation of the static data member template Tmpl of ...
Definition: ASTContext.cpp:1541
clang::ASTContext::SatAccumTy
CanQualType SatAccumTy
Definition: ASTContext.h:1091
clang::ASTContext::getCommentCommandTraits
comments::CommandTraits & getCommentCommandTraits() const
Definition: ASTContext.h:924
clang::ASTContext::getObjCEncodingForMethodParameter
void getObjCEncodingForMethodParameter(Decl::ObjCDeclQualifier QT, QualType T, std::string &S, bool Extended) const
getObjCEncodingForMethodParameter - Return the encoded type for a single method parameter or return t...
Definition: ASTContext.cpp:7166
clang::ASTContext::addDestruction
void addDestruction(T *Ptr) const
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
Definition: ASTContext.h:2962
clang::ASTContext::getObjCEncodingForTypeQualifier
void getObjCEncodingForTypeQualifier(Decl::ObjCDeclQualifier QT, std::string &S) const
Put the string version of the type qualifiers QT into S.
Definition: ASTContext.cpp:8084
NoSanitizeList.h
clang::ASTContext::getComplexType
QualType getComplexType(QualType T) const
Return the uniqued reference to the type for a complex number with the specified element type.
Definition: ASTContext.cpp:3224
CXXABI
#define CXXABI(Name, Str)
Definition: TargetCXXABI.h:32
clang::ASTContext::getConstantMatrixType
QualType getConstantMatrixType(QualType ElementType, unsigned NumRows, unsigned NumColumns) const
Return the unique reference to the matrix type of the specified element type and size.
Definition: ASTContext.cpp:4113
clang::QualifierCollector
A qualifier set is used to build a set of qualifiers.
Definition: Type.h:6390
clang::ASTContext::getVolatileType
QualType getVolatileType(QualType T) const
Return the uniqued reference to the type for a volatile qualified type.
Definition: ASTContext.h:1254
clang::ASTContext::getPromotedIntegerType
QualType getPromotedIntegerType(QualType PromotableType) const
Return the type that PromotableType will promote to: C99 6.3.1.1p2, assuming that PromotableType is a...
Definition: ASTContext.cpp:6575
clang::ASTContext::getSubstTemplateTypeParmType
QualType getSubstTemplateTypeParmType(const TemplateTypeParmType *Replaced, QualType Replacement) const
Retrieve a substitution-result type.
Definition: ASTContext.cpp:4682
clang::ASTContext::isNearlyEmpty
bool isNearlyEmpty(const CXXRecordDecl *RD) const
Definition: ASTContext.cpp:11245
clang::CanQual< Type >
Base
clang::BlockVarCopyInit
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expressi...
Definition: Expr.h:6017
clang::ASTWriter
Writes an AST file containing the contents of a translation unit.
Definition: ASTWriter.h:83
clang::ASTContext::getPointerType
CanQualType getPointerType(CanQualType T) const
Definition: ASTContext.h:1313
clang::SubstTemplateTemplateParmPackStorage
A structure for storing an already-substituted template template parameter pack.
Definition: TemplateName.h:133
clang::ASTContext::DumpRecordLayout
void DumpRecordLayout(const RecordDecl *RD, raw_ostream &OS, bool Simple=false) const
Definition: RecordLayoutBuilder.cpp:3677
clang::ASTContext::getVaListTagDecl
Decl * getVaListTagDecl() const
Retrieve the C type declaration corresponding to the predefined __va_list_tag type used to help defin...
Definition: ASTContext.cpp:8538
clang::ASTContext::getObjCProtocolDecl
ObjCInterfaceDecl * getObjCProtocolDecl() const
Retrieve the Objective-C class declaration corresponding to the predefined Protocol class.
Definition: ASTContext.cpp:8126
clang::operator<<
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
Definition: ASTContext.cpp:11871
clang::ASTContext::InlineVariableDefinitionKind
InlineVariableDefinitionKind
Definition: ASTContext.h:3167
clang::AutoTypeKeyword
AutoTypeKeyword
Which keyword(s) were used to create an AutoType.
Definition: Type.h:1454
clang::ASTContext::ASTContext
ASTContext(LangOptions &LOpts, SourceManager &SM, IdentifierTable &idents, SelectorTable &sels, Builtin::Context &builtins, TranslationUnitKind TUKind)
Definition: ASTContext.cpp:973
clang::ASTContext::deduplicateMergedDefinitonsFor
void deduplicateMergedDefinitonsFor(NamedDecl *ND)
Clean up the merged definition list.
Definition: ASTContext.cpp:1118
clang::ASTContext::getSignedSizeType
CanQualType getSignedSizeType() const
Return the unique signed counterpart of the integer type corresponding to size_t.
Definition: ASTContext.cpp:5790
clang::ASTContext::RedeclChainComments
llvm::DenseMap< const Decl *, const Decl * > RedeclChainComments
Mapping from canonical declaration to the first redeclaration in chain that has a comment attached.
Definition: ASTContext.h:809
clang::ASTContext::getOverriddenMethods
void getOverriddenMethods(const NamedDecl *Method, SmallVectorImpl< const NamedDecl * > &Overridden) const
Return C++ or ObjC overridden methods for the given Method.
Definition: ASTContext.cpp:1663
clang::ASTContext::setObjCSelRedefinitionType
void setObjCSelRedefinitionType(QualType RedefType)
Set the user-written type that redefines 'SEL'.
Definition: ASTContext.h:1837
clang::ASTContext::getFloatingTypeOfSizeWithinDomain
QualType getFloatingTypeOfSizeWithinDomain(QualType typeSize, QualType typeDomain) const
Return a real floating point or a complex type (based on typeDomain/typeSize).
Definition: ASTContext.cpp:6425
clang::TemplateTypeParmDecl
Declaration of a template type parameter.
Definition: DeclTemplate.h:1179
clang::IncrementalParser
Provides support for incremental compilation.
Definition: IncrementalParser.h:39
clang::ASTContext::ObjCObjectAdoptsQTypeProtocols
bool ObjCObjectAdoptsQTypeProtocols(QualType QT, ObjCInterfaceDecl *Decl)
ObjCObjectAdoptsQTypeProtocols - Checks that protocols in IC's protocol list adopt all protocols in Q...
Definition: ASTContext.cpp:5383
clang::TemplateParamObjectDecl
A template parameter object.
Definition: DeclTemplate.h:3287
clang::ASTContext::MSGuidTagDecl
TagDecl * MSGuidTagDecl
Definition: ASTContext.h:1135
clang::OverloadedOperatorKind
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
Definition: OperatorKinds.h:21
clang::ASTContext::getInstantiatedFromUsingDecl
NamedDecl * getInstantiatedFromUsingDecl(NamedDecl *Inst)
If the given using decl Inst is an instantiation of another (possibly unresolved) using decl,...
Definition: ASTContext.cpp:1559
clang::ASTContext::getASTAllocatedMemory
size_t getASTAllocatedMemory() const
Return the total amount of physical memory allocated for representing AST nodes and type information.
Definition: ASTContext.h:734
OPT_LIST
#define OPT_LIST(V)
Definition: ASTContext.h:3114
clang::ASTContext::ShortTy
CanQualType ShortTy
Definition: ASTContext.h:1082
clang::ASTContext::getDecltypeType
QualType getDecltypeType(Expr *e, QualType UnderlyingType) const
C++11 decltype.
Definition: ASTContext.cpp:5573
clang::ASTContext::Deallocate
void Deallocate(void *Ptr) const
Definition: ASTContext.h:712
clang::IncompleteArrayType
Represents a C array with an unspecified size.
Definition: Type.h:2990
clang::ASTContext::getFunctionNoProtoType
QualType getFunctionNoProtoType(QualType ResultTy, const FunctionType::ExtInfo &Info) const
Return a K&R style C function type like 'int()'.
Definition: ASTContext.cpp:4229
clang::Qualifiers::ObjCLifetime
ObjCLifetime
Definition: Type.h:161
clang::ASTContext::setManglingNumber
void setManglingNumber(const NamedDecl *ND, unsigned Number)
Definition: ASTContext.cpp:11369
ExternalASTSource.h
clang::ASTContext::getObjCTypeParamType
QualType getObjCTypeParamType(const ObjCTypeParamDecl *Decl, ArrayRef< ObjCProtocolDecl * > protocols) const
Definition: ASTContext.cpp:5339
clang::ASTContext::UnsignedLongLongTy
CanQualType UnsignedLongLongTy
Definition: ASTContext.h:1084
clang::ASTContext::getOpenCLTypeKind
OpenCLTypeKind getOpenCLTypeKind(const Type *T) const
Map an AST Type to an OpenCLTypeKind enum value.
Definition: ASTContext.cpp:6878
clang::ASTContext::setObjCConstantStringInterface
void setObjCConstantStringInterface(ObjCInterfaceDecl *Decl)
Definition: ASTContext.cpp:8558
clang::ASTContext::hasSameFunctionTypeIgnoringPtrSizes
bool hasSameFunctionTypeIgnoringPtrSizes(QualType T, QualType U)
Determine whether two function types are the same, ignoring pointer sizes in the return type and para...
Definition: ASTContext.cpp:3188
TargetCXXABI.h
clang::ASTContext::ObjCQualifiedClassTypesAreCompatible
bool ObjCQualifiedClassTypesAreCompatible(const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS)
ObjCQualifiedClassTypesAreCompatible - compare Class<pr,...> and Class<pr1, ...>.
Definition: ASTContext.cpp:8969
clang::ObjCCategoryDecl
ObjCCategoryDecl - Represents a category declaration.
Definition: DeclObjC.h:2273
clang::ASTContext::getCorrespondingUnsignedType
QualType getCorrespondingUnsignedType(QualType T) const
Definition: ASTContext.cpp:10304
clang::ASTContext::getWideCharType
QualType getWideCharType() const
Return the type of wide characters.
Definition: ASTContext.h:1733
clang::ASTContext::adjustStringLiteralBaseType
QualType adjustStringLiteralBaseType(QualType StrLTy) const
Definition: ASTContext.cpp:4474
clang::ASTContext::getMSGuidType
QualType getMSGuidType() const
Retrieve the implicitly-predeclared 'struct _GUID' type.
Definition: ASTContext.h:2080
clang::ASTContext::UnsignedCharTy
CanQualType UnsignedCharTy
Definition: ASTContext.h:1083
clang::TemplateTypeParmType
Definition: Type.h:4787
clang::ASTContext::getExceptionObjectType
QualType getExceptionObjectType(QualType T) const
Definition: ASTContext.cpp:6331
clang::ASTContext::FractTy
CanQualType FractTy
Definition: ASTContext.h:1089
clang::ParentMapContext
Definition: ParentMapContext.h:23
clang::LangAS
LangAS
Defines the address space values used by the address space qualifier of QualType.
Definition: AddressSpaces.h:25
clang::ASTContext::BuiltinFnTy
CanQualType BuiltinFnTy
Definition: ASTContext.h:1102
clang::TypeInfoChars::TypeInfoChars
TypeInfoChars(CharUnits Width, CharUnits Align, AlignRequirementKind AlignRequirement)
Definition: ASTContext.h:199
clang::ASTContext::getCanonicalParamType
CanQualType getCanonicalParamType(QualType T) const
Return the canonical parameter type corresponding to the specific potentially non-canonical one.
Definition: ASTContext.cpp:5849
operator*
clang::CharUnits operator*(clang::CharUnits::QuantityType Scale, const clang::CharUnits &CU)
Definition: CharUnits.h:212
clang::ASTContext::getFunctionTypeWithoutPtrSizes
QualType getFunctionTypeWithoutPtrSizes(QualType T)
Get a function type and produce the equivalent function type where pointer size address spaces in the...
Definition: ASTContext.cpp:3171
clang::ASTContext::UnsignedLongTy
CanQualType UnsignedLongTy
Definition: ASTContext.h:1083
clang::ASTContext::getConstType
QualType getConstType(QualType T) const
Return the uniqued reference to the type for a const qualified type.
Definition: ASTContext.h:1265
clang::ObjCObjectPointerType
Represents a pointer to an Objective C object.
Definition: Type.h:6098
clang::ASTContext::overridden_methods_end
overridden_cxx_method_iterator overridden_methods_end(const CXXMethodDecl *Method) const
Definition: ASTContext.cpp:1638
clang::ASTRecordLayout
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
Definition: RecordLayout.h:38
clang::ASTContext::getDecayedType
CanQualType getDecayedType(CanQualType T) const
Definition: ASTContext.h:1329
clang::UsingEnumDecl
Represents a C++ using-enum-declaration.
Definition: DeclCXX.h:3578
clang::ASTContext::getTypeOfExprType
QualType getTypeOfExprType(Expr *e) const
GCC extension.
Definition: ASTContext.cpp:5505
clang::ASTContext::getAdjustedType
QualType getAdjustedType(QualType Orig, QualType New) const
Return the uniqued reference to a type adjusted from the original type to a new type.
Definition: ASTContext.cpp:3278
clang::TranslationUnitDecl::Create
static TranslationUnitDecl * Create(ASTContext &C)
Definition: Decl.cpp:4807
clang::CXXRecordDecl
Represents a C++ struct/union/class.
Definition: DeclCXX.h:254
clang::ASTContext::getPreferredTypeAlign
unsigned getPreferredTypeAlign(QualType T) const
Return the "preferred" alignment of the specified type T for the current target, in bits.
Definition: ASTContext.h:2343
clang::ASTContext::getCUIDHash
StringRef getCUIDHash() const
Definition: ASTContext.cpp:11897
SourceLocation.h
clang::ASTContext::getLogicalOperationType
QualType getLogicalOperationType() const
The result type of logical operations, '<', '>', '!=', etc.
Definition: ASTContext.h:1939
createCXXABI
static CGCXXABI * createCXXABI(CodeGenModule &CGM)
Definition: CodeGenModule.cpp:77
clang::ASTContext::getNewOMPTraitInfo
OMPTraitInfo & getNewOMPTraitInfo()
Return a new OMPTraitInfo object owned by this context.
Definition: ASTContext.cpp:11865
clang::ASTContext::adjustFunctionType
const FunctionType * adjustFunctionType(const FunctionType *Fn, FunctionType::ExtInfo EInfo)
Change the ExtInfo on a function type.
Definition: ASTContext.cpp:3097
clang::ASTContext::LongLongTy
CanQualType LongLongTy
Definition: ASTContext.h:1082
clang::Type::isDependentType
bool isDependentType() const
Whether this type is a dependent type, meaning that its definition somehow depends on a template para...
Definition: Type.h:2175
clang::ASTContext::getRawCommentForAnyRedecl
const RawComment * getRawCommentForAnyRedecl(const Decl *D, const Decl **OriginalDecl=nullptr) const
Return the documentation comment attached to a given declaration.
Definition: ASTContext.cpp:384
clang::TemplateSpecializationKind
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
Definition: Specifiers.h:173
clang::ASTContext::getFixedPointIBits
unsigned char getFixedPointIBits(QualType Ty) const
Definition: ASTContext.cpp:11694
clang::ASTContext::AutoRRefDeductTy
QualType AutoRRefDeductTy
Definition: ASTContext.h:1128
clang::ASTContext::getVectorType
QualType getVectorType(QualType VectorType, unsigned NumElts, VectorType::VectorKind VecKind) const
Return the unique reference to a vector type of the specified element type and size.
Definition: ASTContext.cpp:3972
clang::DependentSizedArrayType
Represents an array type in C++ whose size is a value-dependent expression.
Definition: Type.h:3088
clang::ASTContext::addLazyModuleInitializers
void addLazyModuleInitializers(Module *M, ArrayRef< uint32_t > IDs)
Definition: ASTContext.cpp:1183
clang::ASTContext::UnsignedIntTy
CanQualType UnsignedIntTy
Definition: ASTContext.h:1083
clang::attr::Kind
Kind
Definition: AttrKinds.h:22
clang::VariableArrayType
Represents a C array with a specified size that is not an integer-constant-expression.
Definition: Type.h:3034
clang::ASTContext::VoidPtrTy
CanQualType VoidPtrTy
Definition: ASTContext.h:1100
clang::ASTContext::getCXXABIKind
TargetCXXABI::Kind getCXXABIKind() const
Return the C++ ABI kind that should be used.
Definition: ASTContext.cpp:889
clang::ASTContext::ObjCQualifiedIdTypesAreCompatible
bool ObjCQualifiedIdTypesAreCompatible(const ObjCObjectPointerType *LHS, const ObjCObjectPointerType *RHS, bool ForCompare)
ObjCQualifiedIdTypesAreCompatible - We know that one of lhs/rhs is an ObjCQualifiedIDType.
Definition: ASTContext.cpp:8987
clang::ASTContext::getInstantiatedFromStaticDataMember
MemberSpecializationInfo * getInstantiatedFromStaticDataMember(const VarDecl *Var)
If this variable is an instantiated static data member of a class template specialization,...
Definition: ASTContext.cpp:1524
clang::ASTContext::DoubleTy
CanQualType DoubleTy
Definition: ASTContext.h:1085
clang::ASTContext::getSourceManager
const SourceManager & getSourceManager() const
Definition: ASTContext.h:694
clang::ASTContext::getCFConstantStringDecl
TypedefDecl * getCFConstantStringDecl() const
Definition: ASTContext.cpp:6692
clang::ASTContext::InlineVariableDefinitionKind::Weak
@ Weak
Weak definition of inline variable.
clang::ASTContext::getParentMapContext
ParentMapContext & getParentMapContext()
Returns the dynamic AST node parent map context.
Definition: ASTContext.cpp:922
clang::ASTContext::isObjCIdType
bool isObjCIdType(QualType T) const
Definition: ASTContext.h:2762
clang::ASTContext::setObjCSuperType
void setObjCSuperType(QualType ST)
Definition: ASTContext.h:1775
clang::ASTContext::NullPtrTy
CanQualType NullPtrTy
Definition: ASTContext.h:1100
clang::ASTContext::canBuiltinBeRedeclared
bool canBuiltinBeRedeclared(const FunctionDecl *) const
Return whether a declaration to a builtin is allowed to be overloaded/redeclared.
Definition: ASTContext.cpp:8554
clang::ASTContext::getDeclAlign
CharUnits getDeclAlign(const Decl *D, bool ForAlignof=false) const
Return a conservative estimate of the alignment of the specified decl D.
Definition: ASTContext.cpp:1727
clang::ASTContext::overridden_methods
overridden_method_range overridden_methods(const CXXMethodDecl *Method) const
Definition: ASTContext.cpp:1649
clang::ValueDecl
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
Definition: Decl.h:674
clang::ASTContext::getUnqualifiedArrayType
QualType getUnqualifiedArrayType(QualType T, Qualifiers &Quals)
Return this type as a completely-unqualified array type, capturing the qualifiers in Quals.
Definition: ASTContext.cpp:5867
clang::ASTContext::IntTy
CanQualType IntTy
Definition: ASTContext.h:1082
clang::ASTContext::overridden_cxx_method_iterator
CXXMethodVector::const_iterator overridden_cxx_method_iterator
Definition: ASTContext.h:979
clang::ASTContext::addModuleInitializer
void addModuleInitializer(Module *M, Decl *Init)
Add a declaration to the list of declarations that are initialized for a module.
Definition: ASTContext.cpp:1157
clang::ASTContext::GE_Missing_stdio
@ GE_Missing_stdio
Missing a type from <stdio.h>
Definition: ASTContext.h:2174
clang::NullabilityKind::Unspecified
@ Unspecified
Whether values of this type can be null is (explicitly) unspecified.
clang::ASTContext::getEnumType
QualType getEnumType(const EnumDecl *Decl) const
Definition: ASTContext.cpp:4631
clang::ASTContext::getUIntMaxType
CanQualType getUIntMaxType() const
Return the unique type for "uintmax_t" (C99 7.18.1.5), defined in <stdint.h>.
Definition: ASTContext.cpp:5800
clang::ASTContext::PSF_Implicit
@ PSF_Implicit
Definition: ASTContext.h:3226
clang::ASTContext::getOpenCLTypeAddrSpace
LangAS getOpenCLTypeAddrSpace(const Type *T) const
Get address space for OpenCL type.
Definition: ASTContext.cpp:6914
clang::TemplateName
Represents a C++ template name within the type system.
Definition: TemplateName.h:190
clang::ASTContext::isObjCClassType
bool isObjCClassType(QualType T) const
Definition: ASTContext.h:2766
clang::ASTContext::getPreferredTypeAlignInChars
CharUnits getPreferredTypeAlignInChars(QualType T) const
Return the PreferredAlignment of a (complete) type T, in characters.
Definition: ASTContext.h:2314
clang::ASTContext::setBlockVarCopyInit
void setBlockVarCopyInit(const VarDecl *VD, Expr *CopyExpr, bool CanThrow)
Set the copy initialization expression of a block var decl.
Definition: ASTContext.cpp:2931
clang::ASTContext::getTagDeclType
QualType getTagDeclType(const TagDecl *Decl) const
Return the unique reference to the type for the specified TagDecl (struct/union/class/enum) decl.
Definition: ASTContext.cpp:5774
clang::ASTContext::getMakeIntegerSeqDecl
BuiltinTemplateDecl * getMakeIntegerSeqDecl() const
Definition: ASTContext.cpp:1220
clang::FunctionProtoType
Represents a prototype with parameter type info, e.g.
Definition: Type.h:3886
clang::ASTContext::getFieldOffset
uint64_t getFieldOffset(const ValueDecl *FD) const
Get the offset of a FieldDecl or IndirectFieldDecl, in bits.
Definition: RecordLayoutBuilder.cpp:3406
clang::ASTContext::Idents
IdentifierTable & Idents
Definition: ASTContext.h:646
clang::ASTContext::Int128Ty
CanQualType Int128Ty
Definition: ASTContext.h:1082
clang::ASTContext::LongFractTy
CanQualType LongFractTy
Definition: ASTContext.h:1089
clang::VectorType::VectorKind
VectorKind
Definition: Type.h:3232
clang::ASTContext::getPrintingPolicy
const clang::PrintingPolicy & getPrintingPolicy() const
Definition: ASTContext.h:685
clang::ASTContext::getIntPtrType
QualType getIntPtrType() const
Return a type compatible with "intptr_t" (C99 7.18.1.4), as defined by the target.
Definition: ASTContext.cpp:5818
clang::TemplateDecl
The base class of all kinds of template declarations (e.g., class, function, etc.).
Definition: DeclTemplate.h:400
clang::ASTContext::GE_Missing_type
@ GE_Missing_type
Missing a type.
Definition: ASTContext.h:2171
Begin
SourceLocation Begin
Definition: USRLocFinder.cpp:165
clang::ASTContext::getObjCProtoType
QualType getObjCProtoType() const
Retrieve the type of the Objective-C Protocol class.
Definition: ASTContext.h:2049
clang::BlockExpr
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
Definition: Expr.h:5971
llvm::ArrayRef
Definition: LLVM.h:34
clang::ASTContext::overridden_methods_size
unsigned overridden_methods_size(const CXXMethodDecl *Method) const
Definition: ASTContext.cpp:1643
Value
Value
Definition: UninitializedValues.cpp:102
clang::Decl
Decl - This represents one declaration (or definition), e.g.
Definition: DeclBase.h:83
clang::DeclaratorDecl
Represents a ValueDecl that came out of a declarator.
Definition: Decl.h:726
clang::ASTContext::LongTy
CanQualType LongTy
Definition: ASTContext.h:1082
clang::ObjCPropertyDecl
Represents one property declaration in an Objective-C interface.
Definition: DeclObjC.h:732
clang::ASTContext::getSignedWCharType
QualType getSignedWCharType() const
Return the type of "signed wchar_t".
Definition: ASTContext.cpp:5806
clang::ASTContext::createDeviceMangleContext
MangleContext * createDeviceMangleContext(const TargetInfo &T)
Creates a device mangle context to correctly mangle lambdas in a mixed architecture compile by settin...
Definition: ASTContext.cpp:11286
clang::ASTContext::setPrimaryMergedDecl
void setPrimaryMergedDecl(Decl *D, Decl *Primary)
Definition: ASTContext.h:1027
clang::ASTContext::mergeFunctionParameterTypes
QualType mergeFunctionParameterTypes(QualType, QualType, bool OfBlockPointer=false, bool Unqualified=false)
mergeFunctionParameterTypes - merge two types which appear as function parameter types
Definition: ASTContext.cpp:9592
clang::ASTContext::GE_None
@ GE_None
No error.
Definition: ASTContext.h:2168
LLVM.h
clang::ASTContext::getDiagAllocator
PartialDiagnostic::DiagStorageAllocator & getDiagAllocator()
Definition: ASTContext.h:741
clang::ASTContext::CharTy
CanQualType CharTy
Definition: ASTContext.h:1075
clang::ASTContext::HalfTy
CanQualType HalfTy
Definition: ASTContext.h:1097
clang::ASTContext::attachCommentsToJustParsedDecls
void attachCommentsToJustParsedDecls(ArrayRef< Decl * > Decls, const Preprocessor *PP)
Searches existing comments for doc comments that should be attached to Decls.
Definition: ASTContext.cpp:481
clang::ASTContext::SectionInfo::SectionInfo
SectionInfo()=default
clang::ASTContext::MakeIntValue
llvm::APSInt MakeIntValue(uint64_t Value, QualType Type) const
Make an APSInt of the appropriate width and signedness for the given Value and integer Type.
Definition: ASTContext.h:2876
clang::ASTContext::getTypeAlign
unsigned getTypeAlign(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in bits.
Definition: ASTContext.h:2286
clang::ASTContext::SectionInfo::Decl
NamedDecl * Decl
Definition: ASTContext.h:3232
clang::ASTContext::getCanonicalTemplateName
TemplateName getCanonicalTemplateName(TemplateName Name) const
Retrieves the "canonical" template name that refers to a given template.
Definition: ASTContext.cpp:6102
clang::ASTContext::getInlineVariableDefinitionKind
InlineVariableDefinitionKind getInlineVariableDefinitionKind(const VarDecl *VD) const
Determine whether a definition of this inline variable should be treated as a weak or strong definiti...
Definition: ASTContext.cpp:7043
clang::ASTContext::Char32Ty
CanQualType Char32Ty
Definition: ASTContext.h:1081
clang::ASTContext::setPrintingPolicy
void setPrintingPolicy(const clang::PrintingPolicy &Policy)
Definition: ASTContext.h:689
clang::ASTContext::TemplateOrSpecializationInfo
llvm::PointerUnion< VarTemplateDecl *, MemberSpecializationInfo * > TemplateOrSpecializationInfo
A type synonym for the TemplateOrInstantiation mapping.
Definition: ASTContext.h:475
clang::ASTContext::getMakeIntegerSeqName
IdentifierInfo * getMakeIntegerSeqName() const
Definition: ASTContext.h:1870
clang::ASTContext::getObjCSelType
QualType getObjCSelType() const
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
Definition: ASTContext.h:2013
clang::ASTContext::getTypedefNameForUnnamedTagDecl
TypedefNameDecl * getTypedefNameForUnnamedTagDecl(const TagDecl *TD)
Definition: ASTContext.cpp:11432
clang::ASTContext::forEachMultiversionedFunctionVersion
void forEachMultiversionedFunctionVersion(const FunctionDecl *FD, llvm::function_ref< void(FunctionDecl *)> Pred) const
Visits all versions of a multiversioned function with the passed predicate.
Definition: ASTContext.cpp:11187
clang::ASTContext::getucontext_tType
QualType getucontext_tType() const
Retrieve the C ucontext_t type.
Definition: ASTContext.h:1932
clang::FunctionType::ExtInfo
A class which abstracts out some details necessary for making a call.
Definition: Type.h:3658
clang::SplitQualType
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Definition: Type.h:613
clang::UnaryTransformType::UTTKind
UTTKind
Definition: Type.h:4555
clang::ASTContext::getInjectedTemplateArgs
void getInjectedTemplateArgs(const TemplateParameterList *Params, SmallVectorImpl< TemplateArgument > &Args)
Get a template argument list with one argument per template parameter in a template parameter list,...
Definition: ASTContext.cpp:5106
clang::ASTContext::setInstantiatedFromUsingEnumDecl
void setInstantiatedFromUsingEnumDecl(UsingEnumDecl *Inst, UsingEnumDecl *Pattern)
Remember that the using enum decl Inst is an instantiation of the using enum decl Pattern of a class ...
Definition: ASTContext.cpp:1590
clang::ASTContext::SatUnsignedShortFractTy
CanQualType SatUnsignedShortFractTy
Definition: ASTContext.h:1095
clang::IdentifierInfo
One of these records is kept for each identifier that is lexed.
Definition: IdentifierTable.h:84
clang::LazyGenerationalUpdatePtr::ValueType
llvm::PointerUnion< T, LazyData * > ValueType
Definition: ExternalASTSource.h:401
clang::ASTContext::ObjCBuiltinIdTy
CanQualType ObjCBuiltinIdTy
Definition: ASTContext.h:1104
clang::TypedefDecl
Represents the declaration of a typedef-name via the 'typedef' type specifier.
Definition: Decl.h:3285
clang::ASTContext::SatUnsignedShortAccumTy
CanQualType SatUnsignedShortAccumTy
Definition: ASTContext.h:1092
clang::ASTContext::getTargetInfo
const TargetInfo & getTargetInfo() const
Definition: ASTContext.h:745
clang::ASTContext::getInjectedClassNameType
QualType getInjectedClassNameType(CXXRecordDecl *Decl, QualType TST) const
getInjectedClassNameType - Return the unique reference to the injected class name type for the specif...
Definition: ASTContext.cpp:4536
clang::ASTContext::getNextLocalImport
static ImportDecl * getNextLocalImport(ImportDecl *Import)
Definition: ASTContext.h:1013
clang::LangOptions
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Definition: LangOptions.h:58
clang::ASTContext::getObjCEncodingForPropertyType
void getObjCEncodingForPropertyType(QualType T, std::string &S) const
Emit the Objective-C property type encoding for the given type T into S.
Definition: ASTContext.cpp:7378
clang::ASTContext::getElaboratedType
QualType getElaboratedType(ElaboratedTypeKeyword Keyword, NestedNameSpecifier *NNS, QualType NamedType, TagDecl *OwnedTagDecl=nullptr) const
Definition: ASTContext.cpp:4914
clang::ASTContext::getLegacyIntegralTypeEncoding
void getLegacyIntegralTypeEncoding(QualType &t) const
getLegacyIntegralTypeEncoding - Another legacy compatibility encoding: 32-bit longs are encoded as 'l...
Definition: ASTContext.cpp:7351
clang::ASTContext::getCorrespondingSignedType
QualType getCorrespondingSignedType(QualType T) const
Definition: ASTContext.cpp:10371
clang::ASTContext::Listener
ASTMutationListener * Listener
Definition: ASTContext.h:652
clang::ASTContext::getLValueReferenceType
QualType getLValueReferenceType(QualType T, bool SpelledAsLValue=true) const
Return the uniqued reference to the type for an lvalue reference to the specified type.
Definition: ASTContext.cpp:3372
clang::DependentTemplateSpecializationType
Represents a template specialization type whose template cannot be resolved, e.g.
Definition: Type.h:5567
clang::ObjCTypeParamDecl
Represents the declaration of an Objective-C type parameter.
Definition: DeclObjC.h:582
clang::ASTContext::isObjCNSObjectType
static bool isObjCNSObjectType(QualType Ty)
Return true if this is an NSObject object with its NSObject attribute set.
Definition: ASTContext.h:2235
clang::ASTReader
Reads an AST files chain containing the contents of a translation unit.
Definition: ASTReader.h:340
clang::MangleNumberingContext
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
Definition: MangleNumberingContext.h:29
clang::ASTContext::adjustObjCTypeParamBoundType
void adjustObjCTypeParamBoundType(const ObjCTypeParamDecl *Orig, ObjCTypeParamDecl *New) const
Definition: ASTContext.cpp:5369
clang::ASTContext::mergeDefinitionIntoModule
void mergeDefinitionIntoModule(NamedDecl *ND, Module *M, bool NotifyListeners=true)
Note that the definition ND has been merged into module M, and should be visible whenever M is visibl...
Definition: ASTContext.cpp:1109
clang::AlignRequirementKind::RequiredByRecord
@ RequiredByRecord
The alignment comes from an alignment attribute on a record type.
ComparisonCategories.h
clang::ASTContext::setInstantiatedFromUsingDecl
void setInstantiatedFromUsingDecl(NamedDecl *Inst, NamedDecl *Pattern)
Remember that the using decl Inst is an instantiation of the using decl Pattern of a class template.
Definition: ASTContext.cpp:1568
clang::ASTContext::getModulesWithMergedDefinition
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Definition: ASTContext.cpp:1132
clang::ASTContext::setjmp_bufDecl
void setjmp_bufDecl(TypeDecl *jmp_bufDecl)
Set the type for the C jmp_buf type.
Definition: ASTContext.h:1903
clang::AlignRequirementKind::None
@ None
The alignment was not explicit in code.
clang::TranslationUnitKind
TranslationUnitKind
Describes the kind of translation unit being processed.
Definition: LangOptions.h:704
clang::ObjCMethodDecl
ObjCMethodDecl - Represents an instance or class method declaration.
Definition: DeclObjC.h:139
DeclarationName.h
clang::ASTContext::buildImplicitTypedef
TypedefDecl * buildImplicitTypedef(QualType T, StringRef Name) const
Create a new implicit TU-level typedef declaration.
Definition: ASTContext.cpp:1251
clang::ASTContext::areComparableObjCPointerTypes
bool areComparableObjCPointerTypes(QualType LHS, QualType RHS)
Definition: ASTContext.cpp:9531
clang::ASTContext::AutoDeductTy
QualType AutoDeductTy
Definition: ASTContext.h:1127
clang::ASTContext::PragmaSectionFlag
PragmaSectionFlag
Definition: ASTContext.h:3221
clang::ASTContext::getComplexType
CanQualType getComplexType(CanQualType T) const
Definition: ASTContext.h:1306
clang::ASTContext::SectionInfos
llvm::StringMap< SectionInfo > SectionInfos
Definition: ASTContext.h:3243
clang::ASTContext::getTypeUnadjustedAlign
unsigned getTypeUnadjustedAlign(QualType T) const
Return the ABI-specified natural alignment of a (complete) type T, before alignment adjustments,...
Definition: ASTContext.h:2294
clang::ASTContext::getBuiltinVaListType
QualType getBuiltinVaListType() const
Retrieve the type of the __builtin_va_list type.
Definition: ASTContext.h:2058
clang::Qualifiers::OCL_None
@ OCL_None
There is no lifetime qualification on this type.
Definition: Type.h:163
clang::ASTContext::OMPArrayShapingTy
CanQualType OMPArrayShapingTy
Definition: ASTContext.h:1112
clang::ASTContext::setInstantiatedFromUnnamedFieldDecl
void setInstantiatedFromUnnamedFieldDecl(FieldDecl *Inst, FieldDecl *Tmpl)
Definition: ASTContext.cpp:1622
clang::ASTContext::getjmp_bufType
QualType getjmp_bufType() const
Retrieve the C jmp_buf type.
Definition: ASTContext.h:1908
clang::ASTContext::getParenType
QualType getParenType(QualType NamedType) const
Definition: ASTContext.cpp:4944
clang::ASTContext::cleanup
void cleanup()
Definition: ASTContext.cpp:993
clang::OpenCLTypeKind
OpenCLTypeKind
OpenCL type kinds.
Definition: TargetInfo.h:173
clang::ASTContext::getPredefinedStringLiteralFromCache
StringLiteral * getPredefinedStringLiteralFromCache(StringRef Key) const
Return a string representing the human readable name for the specified function declaration or file n...
Definition: ASTContext.cpp:11471
clang::ASTContext::getAddrSpaceQualType
QualType getAddrSpaceQualType(QualType T, LangAS AddressSpace) const
Return the uniqued reference to the type for an address space qualified type with the specified type ...
Definition: ASTContext.cpp:3005
clang::Builtin::ID
ID
Definition: Builtins.h:48
clang::FunctionProtoType::ExtProtoInfo
Extra information about a function prototype.
Definition: Type.h:3969
clang::DeclListNode
A list storing NamedDecls in the lookup tables.
Definition: DeclBase.h:1233
clang::ASTContext::BuiltinVectorTypeInfo
Definition: ASTContext.h:1446
clang::ASTContext::addedLocalImportDecl
void addedLocalImportDecl(ImportDecl *Import)
Notify the AST context that a new import declaration has been parsed or implicitly created within thi...
Definition: ASTContext.cpp:1683
PartialDiagnostic.h
clang
Definition: CalledOnceCheck.h:17
XRayLists.h
clang::TypeInfo::Align
unsigned Align
Definition: ASTContext.h:181
clang::ASTContext::ObjCMethodsAreEqual
bool ObjCMethodsAreEqual(const ObjCMethodDecl *MethodDecl, const ObjCMethodDecl *MethodImp)
Definition: ASTContext.cpp:11538
clang::ASTContext::getTemplateOrSpecializationInfo
TemplateOrSpecializationInfo getTemplateOrSpecializationInfo(const VarDecl *Var)
Definition: ASTContext.cpp:1531
clang::Selector
Smart pointer class that efficiently represents Objective-C method names.
Definition: IdentifierTable.h:748
clang::ASTContext::toCharUnitsFromBits
CharUnits toCharUnitsFromBits(int64_t BitSize) const
Convert a size in bits to a size in characters.
Definition: ASTContext.cpp:2442
clang::ASTContext::getLangASForBuiltinAddressSpace
LangAS getLangASForBuiltinAddressSpace(unsigned AS) const
Definition: ASTContext.cpp:11629
clang::ASTContext::SatUnsignedFractTy
CanQualType SatUnsignedFractTy
Definition: ASTContext.h:1095
clang::Builtin::Context
Holds information about both target-independent and target-specific builtins, allowing easy queries b...
Definition: Builtins.h:67
clang::TypeInfoChars
Definition: ASTContext.h:193
clang::ASTContext::getObjCClassRedefinitionType
QualType getObjCClassRedefinitionType() const
Retrieve the type that Class has been defined to, which may be different from the built-in Class if C...
Definition: ASTContext.h:1817
clang::GetNullarySelector
Selector GetNullarySelector(StringRef name, ASTContext &Ctx)
Utility function for constructing a nullary selector.
Definition: ASTContext.h:3267
clang::ObjCIvarDecl
ObjCIvarDecl - Represents an ObjC instance variable.
Definition: DeclObjC.h:1923
clang::ASTContext::getByrefLifetime
bool getByrefLifetime(QualType Ty, Qualifiers::ObjCLifetime &Lifetime, bool &HasByrefExtendedLayout) const
Returns true, if given type has a known lifetime.
Definition: ASTContext.cpp:6961
clang::QualType::withConst
QualType withConst() const
Definition: Type.h:846
clang::ASTContext::getDependentSizedMatrixType
QualType getDependentSizedMatrixType(QualType ElementType, Expr *RowExpr, Expr *ColumnExpr, SourceLocation AttrLoc) const
Return the unique reference to the matrix type of the specified element type and size.
Definition: ASTContext.cpp:4145
clang::ASTContext::ObjCBuiltinClassTy
CanQualType ObjCBuiltinClassTy
Definition: ASTContext.h:1104
clang::ASTContext::isSentinelNullExpr
bool isSentinelNullExpr(const Expr *E)
Definition: ASTContext.cpp:2843
clang::ASTContext::getTypeUnadjustedAlignInChars
CharUnits getTypeUnadjustedAlignInChars(QualType T) const
getTypeUnadjustedAlignInChars - Return the ABI-specified alignment of a type, in characters,...
Definition: ASTContext.cpp:2472
clang::ASTContext::SignedCharTy
CanQualType SignedCharTy
Definition: ASTContext.h:1082
clang::ASTContext::getAdjustedType
CanQualType getAdjustedType(CanQualType Orig, CanQualType New) const
Definition: ASTContext.h:1320
clang::ASTContext::import_range
llvm::iterator_range< import_iterator > import_range
Definition: ASTContext.h:1017
clang::ASTContext::addCopyConstructorForExceptionObject
void addCopyConstructorForExceptionObject(CXXRecordDecl *RD, CXXConstructorDecl *CD)
Definition: ASTContext.cpp:11419
clang::ASTContext::getCorrespondingSaturatedType
QualType getCorrespondingSaturatedType(QualType Ty) const
Definition: ASTContext.cpp:11594
clang::ASTContext::getBuiltinMSVaListDecl
TypedefDecl * getBuiltinMSVaListDecl() const
Retrieve the C type declaration corresponding to the predefined __builtin_ms_va_list type.
Definition: ASTContext.cpp:8547
clang::ASTContext::getFixedPointSemantics
llvm::FixedPointSemantics getFixedPointSemantics(QualType Ty) const
Definition: ASTContext.cpp:11736
clang::ASTContext::getObjCGCAttrKind
Qualifiers::GC getObjCGCAttrKind(QualType Ty) const
Return one of the GCNone, Weak or Strong Objective-C garbage collection attributes.
Definition: ASTContext.cpp:8761
clang::ASTContext::AddDeallocation
void AddDeallocation(void(*Callback)(void *), void *Data) const
Add a deallocation callback that will be invoked when the ASTContext is destroyed.
Definition: ASTContext.cpp:1039
clang::ASTContext::overridden_methods_begin
overridden_cxx_method_iterator overridden_methods_begin(const CXXMethodDecl *Method) const
Definition: ASTContext.cpp:1633
clang::ASTContext::hasCvrSimilarType
bool hasCvrSimilarType(QualType T1, QualType T2)
Determine if two types are similar, ignoring only CVR qualifiers.
Definition: ASTContext.cpp:6029
clang::ObjCProtocolDecl
Represents an Objective-C protocol declaration.
Definition: DeclObjC.h:2049
clang::ASTContext::OCLClkEventTy
CanQualType OCLClkEventTy
Definition: ASTContext.h:1109
clang::ASTContext::getProcessIDType
QualType getProcessIDType() const
Return the unique type for "pid_t" defined in <sys/types.h>.
Definition: ASTContext.cpp:5841
clang::IdentifierTable
Implements an efficient mapping from strings to IdentifierInfo nodes.
Definition: IdentifierTable.h:559
clang::ASTContext::NumImplicitCopyAssignmentOperatorsDeclared
unsigned NumImplicitCopyAssignmentOperatorsDeclared
The number of implicitly-declared copy assignment operators for which declarations were built.
Definition: ASTContext.h:3076
clang::TypeSourceInfo
A container of type source information.
Definition: Type.h:6421
clang::ASTContext::getMemberPointerPathAdjustment
CharUnits getMemberPointerPathAdjustment(const APValue &MP) const
Find the 'this' offset for the member path in a pointer-to-member APValue.
Definition: ASTContext.cpp:2566
clang::ASTContext::SatUnsignedLongAccumTy
CanQualType SatUnsignedLongAccumTy
Definition: ASTContext.h:1093
clang::ASTContext::getObjCConstantStringInterface
QualType getObjCConstantStringInterface() const
Definition: ASTContext.h:1790
clang::ASTContext::getTypeSizeInCharsIfKnown
Optional< CharUnits > getTypeSizeInCharsIfKnown(const Type *Ty) const
Definition: ASTContext.h:2280
clang::ASTContext::getFunctionNoProtoType
QualType getFunctionNoProtoType(QualType ResultTy) const
Definition: ASTContext.h:1515
clang::ASTContext::SatFractTy
CanQualType SatFractTy
Definition: ASTContext.h:1094
clang::ASTContext::getQualifiedTemplateName
TemplateName getQualifiedTemplateName(NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateDecl *Template) const
Retrieve the template name that represents a qualified template name such as std::vector.
Definition: ASTContext.cpp:8600
clang::ASTContext::getTraversalScope
std::vector< Decl * > getTraversalScope() const
Definition: ASTContext.h:678
clang::ASTContext::BuiltinVectorTypeInfo::BuiltinVectorTypeInfo
BuiltinVectorTypeInfo(QualType ElementType, llvm::ElementCount EC, unsigned NumVectors)
Definition: ASTContext.h:1450
clang::ASTContext::NumImplicitDestructors
unsigned NumImplicitDestructors
The number of implicitly-declared destructors.
Definition: ASTContext.h:3086
clang::ASTContext::getPointerDiffType
QualType getPointerDiffType() const
Return the unique type for "ptrdiff_t" (C99 7.17) defined in <stddef.h>.
Definition: ASTContext.cpp:5828
clang::ASTContext::setsigjmp_bufDecl
void setsigjmp_bufDecl(TypeDecl *sigjmp_bufDecl)
Set the type for the C sigjmp_buf type.
Definition: ASTContext.h:1915
clang::ASTContext::areCompatibleVectorTypes
bool areCompatibleVectorTypes(QualType FirstVec, QualType SecondVec)
Return true if the given vector types are of the same unqualified type or if they are equivalent to t...
Definition: ASTContext.cpp:8812
CanThrow
static bool CanThrow(Expr *E, ASTContext &Ctx)
Definition: CFG.cpp:2603
clang::ASTContext::UnsignedLongFractTy
CanQualType UnsignedLongFractTy
Definition: ASTContext.h:1090
clang::TypedefNameDecl
Base class for declarations which introduce a typedef-name.
Definition: Decl.h:3183
clang::BuiltinTemplateDecl
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
Definition: DeclTemplate.h:1764
clang::ASTContext::getNSUIntegerType
CanQualType getNSUIntegerType() const
Definition: ASTContext.cpp:6983
clang::ASTContext::getObjCPropertyImplDeclForPropertyDecl
ObjCPropertyImplDecl * getObjCPropertyImplDeclForPropertyDecl(const ObjCPropertyDecl *PD, const Decl *Container) const
Definition: ASTContext.cpp:7236
clang::NullabilityKind::Nullable
@ Nullable
Values of this type can be null.
clang::Qualifiers::removeObjCLifetime
void removeObjCLifetime()
Definition: Type.h:342
clang::ASTContext::lookupFieldBitOffset
uint64_t lookupFieldBitOffset(const ObjCInterfaceDecl *OID, const ObjCImplementationDecl *ID, const ObjCIvarDecl *Ivar) const
Get the offset of an ObjCIvarDecl in bits.
Definition: RecordLayoutBuilder.cpp:3421
clang::ASTContext::getASTRecordLayout
const ASTRecordLayout & getASTRecordLayout(const RecordDecl *D) const
Get or compute information about the layout of the specified record (struct/union/class) D,...
Definition: RecordLayoutBuilder.cpp:3263
clang::ObjCContainerDecl
ObjCContainerDecl - Represents a container for method declarations.
Definition: DeclObjC.h:944
clang::ASTContext::getCanonicalTemplateArgument
TemplateArgument getCanonicalTemplateArgument(const TemplateArgument &Arg) const
Retrieve the "canonical" template argument.
Definition: ASTContext.cpp:6151
clang::ASTContext::addressSpaceMapManglingFor
bool addressSpaceMapManglingFor(LangAS AS) const
Definition: ASTContext.h:2742
clang::ASTContext::getAlignOfGlobalVarInChars
CharUnits getAlignOfGlobalVarInChars(QualType T) const
Return the alignment in characters that should be given to a global variable with type T.
Definition: ASTContext.cpp:2552
clang::ASTContext::addDeclaratorForUnnamedTagDecl
void addDeclaratorForUnnamedTagDecl(TagDecl *TD, DeclaratorDecl *DD)
Definition: ASTContext.cpp:11436
clang::ASTContext::mergeObjCGCQualifiers
QualType mergeObjCGCQualifiers(QualType, QualType)
mergeObjCGCQualifiers - This routine merges ObjC's GC attribute of 'LHS' and 'RHS' attributes and ret...
Definition: ASTContext.cpp:10217
clang::ASTContext::OCLQueueTy
CanQualType OCLQueueTy
Definition: ASTContext.h:1110
clang::TypeInfo::TypeInfo
TypeInfo()
Definition: ASTContext.h:184
clang::ASTContext::getBuiltinMSVaListType
QualType getBuiltinMSVaListType() const
Retrieve the type of the __builtin_ms_va_list type.
Definition: ASTContext.h:2072
clang::ASTContext::getTrivialTypeSourceInfo
TypeSourceInfo * getTrivialTypeSourceInfo(QualType T, SourceLocation Loc=SourceLocation()) const
Allocate a TypeSourceInfo where all locations have been initialized to a given location,...
Definition: ASTContext.cpp:2953
clang::ASTContext::hasSimilarType
bool hasSimilarType(QualType T1, QualType T2)
Determine if two types are similar, according to the C++ rules.
Definition: ASTContext.cpp:6017
clang::QualType::getTypePtr
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
Definition: Type.h:6450
clang::ASTContext::UnsignedInt128Ty
CanQualType UnsignedInt128Ty
Definition: ASTContext.h:1084
CanonicalType.h
clang::ASTContext::getPointerType
QualType getPointerType(QualType T) const
Return the uniqued reference to the type for a pointer to the specified type.
Definition: ASTContext.cpp:3252
clang::ASTContext::getDependentAddressSpaceType
QualType getDependentAddressSpaceType(QualType PointeeType, Expr *AddrSpaceExpr, SourceLocation AttrLoc) const
Definition: ASTContext.cpp:4185
clang::ASTContext::ShortAccumTy
CanQualType ShortAccumTy
Definition: ASTContext.h:1086
clang::ASTContext::getTypeSizeInCharsIfKnown
Optional< CharUnits > getTypeSizeInCharsIfKnown(QualType Ty) const
Definition: ASTContext.h:2274
clang::CharUnits
CharUnits - This is an opaque type for sizes expressed in character units.
Definition: CharUnits.h:38
clang::ASTContext::VaListTagDecl
Decl * VaListTagDecl
Definition: ASTContext.h:1132
clang::ASTContext::Float128Ty
CanQualType Float128Ty
Definition: ASTContext.h:1085
clang::ASTContext::hasSameNullabilityTypeQualifier
bool hasSameNullabilityTypeQualifier(QualType SubT, QualType SuperT, bool IsParam) const
Definition: ASTContext.h:2523
clang::ASTContext::getTypeInfoInChars
TypeInfoChars getTypeInfoInChars(const Type *T) const
Definition: ASTContext.cpp:1874
clang::ASTContext::getArrayDecayedType
QualType getArrayDecayedType(QualType T) const
Return the properly qualified result of decaying the specified array type to a pointer.
Definition: ASTContext.cpp:6350
clang::ASTContext::isDependenceAllowed
bool isDependenceAllowed() const
Definition: ASTContext.h:769
clang::APValue
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
Definition: APValue.h:122
clang::ASTContext::hasSameType
bool hasSameType(QualType T1, QualType T2) const
Determine whether the given types T1 and T2 are equivalent.
Definition: ASTContext.h:2494
clang::ASTContext::getObjCEncodingForType
void getObjCEncodingForType(QualType T, std::string &S, const FieldDecl *Field=nullptr, QualType *NotEncodedT=nullptr) const
Emit the Objective-CC type encoding for the given type T into S.
Definition: ASTContext.cpp:7363
clang::ASTContext::NumImplicitMoveConstructors
unsigned NumImplicitMoveConstructors
The number of implicitly-declared move constructors.
Definition: ASTContext.h:3065
clang::ASTContext::getModuleInitializers
ArrayRef< Decl * > getModuleInitializers(Module *M)
Get the initializations to perform when importing a module, if any.
Definition: ASTContext.cpp:1191
llvm::SmallVectorImpl
Definition: LLVM.h:39
clang::ASTContext::setObjCIdRedefinitionType
void setObjCIdRedefinitionType(QualType RedefType)
Set the user-written type that redefines id.
Definition: ASTContext.h:1811
clang::ASTContext::isMSStaticDataMemberInlineDefinition
bool isMSStaticDataMemberInlineDefinition(const VarDecl *VD) const
Returns true if this is an inline-initialized static data member which is treated as a definition for...
Definition: ASTContext.cpp:7035
AttrKinds.h
clang::ASTContext::setucontext_tDecl
void setucontext_tDecl(TypeDecl *ucontext_tDecl)
Set the type for the C ucontext_t type.
Definition: ASTContext.h:1927
clang::ASTContext::getMSGuidTagDecl
TagDecl * getMSGuidTagDecl() const
Retrieve the implicitly-predeclared 'struct _GUID' declaration.
Definition: ASTContext.h:2077
clang::comments::CommandTraits
This class provides information about commands that can be used in comments.
Definition: CommentCommandTraits.h:127
clang::DeducedType
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 a...
Definition: Type.h:4968
clang::ASTContext::hasSameUnqualifiedType
bool hasSameUnqualifiedType(QualType T1, QualType T2) const
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Definition: ASTContext.h:2518
clang::ASTContext::setStaticLocalNumber
void setStaticLocalNumber(const VarDecl *VD, unsigned Number)
Definition: ASTContext.cpp:11379
clang::ASTContext::getTypeAlign
unsigned getTypeAlign(const Type *T) const
Definition: ASTContext.h:2287
clang::ASTContext::getDependentSizedArrayType
QualType getDependentSizedArrayType(QualType EltTy, Expr *NumElts, ArrayType::ArraySizeModifier ASM, unsigned IndexTypeQuals, SourceRange Brackets) const
Return a non-unique reference to the type for a dependently-sized array of the specified element type...
Definition: ASTContext.cpp:3699
clang::ASTContext::getOverloadedTemplateName
TemplateName getOverloadedTemplateName(UnresolvedSetIterator Begin, UnresolvedSetIterator End) const
Retrieve the template name that corresponds to a non-empty lookup.
Definition: ASTContext.cpp:8568
clang::Expr
This represents one expression.
Definition: Expr.h:109
clang::ASTContext::getASTObjCInterfaceLayout
const ASTRecordLayout