15 #ifndef LLVM_CLANG_AST_ASTCONTEXT_H 16 #define LLVM_CLANG_AST_ASTCONTEXT_H 43 #include "llvm/ADT/APSInt.h" 44 #include "llvm/ADT/ArrayRef.h" 45 #include "llvm/ADT/DenseMap.h" 46 #include "llvm/ADT/FoldingSet.h" 47 #include "llvm/ADT/IntrusiveRefCntPtr.h" 48 #include "llvm/ADT/MapVector.h" 49 #include "llvm/ADT/None.h" 50 #include "llvm/ADT/Optional.h" 51 #include "llvm/ADT/PointerIntPair.h" 52 #include "llvm/ADT/PointerUnion.h" 53 #include "llvm/ADT/SmallVector.h" 54 #include "llvm/ADT/StringMap.h" 55 #include "llvm/ADT/StringRef.h" 56 #include "llvm/ADT/TinyPtrVector.h" 57 #include "llvm/ADT/Triple.h" 58 #include "llvm/ADT/iterator_range.h" 59 #include "llvm/Support/AlignOf.h" 60 #include "llvm/Support/Allocator.h" 61 #include "llvm/Support/Casting.h" 62 #include "llvm/Support/Compiler.h" 69 #include <type_traits> 82 class ASTMutationListener;
83 class ASTRecordLayout;
86 class BuiltinTemplateDecl;
89 class CXXConstructorDecl;
92 class DiagnosticsEngine;
95 class MangleNumberingContext;
96 class MaterializeTemporaryExpr;
97 class MemberSpecializationInfo;
99 class ObjCCategoryDecl;
100 class ObjCCategoryImplDecl;
101 class ObjCContainerDecl;
103 class ObjCImplementationDecl;
104 class ObjCInterfaceDecl;
106 class ObjCMethodDecl;
107 class ObjCPropertyDecl;
108 class ObjCPropertyImplDecl;
109 class ObjCProtocolDecl;
110 class ObjCTypeParamDecl;
113 class StoredDeclsMap;
115 class TemplateParameterList;
116 class TemplateTemplateParmDecl;
117 class TemplateTypeParmDecl;
118 class UnresolvedSetIterator;
119 class UsingShadowDecl;
120 class VarTemplateDecl;
121 class VTableContextBase;
143 TypeInfo(uint64_t Width,
unsigned Align,
bool AlignIsRequired)
144 : Width(Width), Align(Align), AlignIsRequired(AlignIsRequired) {}
153 mutable llvm::FoldingSet<ExtQuals> ExtQualNodes;
154 mutable llvm::FoldingSet<ComplexType> ComplexTypes;
155 mutable llvm::FoldingSet<PointerType> PointerTypes;
156 mutable llvm::FoldingSet<AdjustedType> AdjustedTypes;
157 mutable llvm::FoldingSet<BlockPointerType> BlockPointerTypes;
158 mutable llvm::FoldingSet<LValueReferenceType> LValueReferenceTypes;
159 mutable llvm::FoldingSet<RValueReferenceType> RValueReferenceTypes;
160 mutable llvm::FoldingSet<MemberPointerType> MemberPointerTypes;
161 mutable llvm::FoldingSet<ConstantArrayType> ConstantArrayTypes;
162 mutable llvm::FoldingSet<IncompleteArrayType> IncompleteArrayTypes;
163 mutable std::vector<VariableArrayType*> VariableArrayTypes;
164 mutable llvm::FoldingSet<DependentSizedArrayType> DependentSizedArrayTypes;
165 mutable llvm::FoldingSet<DependentSizedExtVectorType>
166 DependentSizedExtVectorTypes;
167 mutable llvm::FoldingSet<DependentAddressSpaceType>
168 DependentAddressSpaceTypes;
169 mutable llvm::FoldingSet<VectorType> VectorTypes;
170 mutable llvm::FoldingSet<FunctionNoProtoType> FunctionNoProtoTypes;
171 mutable llvm::ContextualFoldingSet<FunctionProtoType, ASTContext&>
173 mutable llvm::FoldingSet<DependentTypeOfExprType> DependentTypeOfExprTypes;
174 mutable llvm::FoldingSet<DependentDecltypeType> DependentDecltypeTypes;
175 mutable llvm::FoldingSet<TemplateTypeParmType> TemplateTypeParmTypes;
176 mutable llvm::FoldingSet<ObjCTypeParamType> ObjCTypeParamTypes;
177 mutable llvm::FoldingSet<SubstTemplateTypeParmType>
178 SubstTemplateTypeParmTypes;
179 mutable llvm::FoldingSet<SubstTemplateTypeParmPackType>
180 SubstTemplateTypeParmPackTypes;
181 mutable llvm::ContextualFoldingSet<TemplateSpecializationType, ASTContext&>
182 TemplateSpecializationTypes;
183 mutable llvm::FoldingSet<ParenType> ParenTypes;
184 mutable llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
185 mutable llvm::FoldingSet<DependentNameType> DependentNameTypes;
188 DependentTemplateSpecializationTypes;
189 llvm::FoldingSet<PackExpansionType> PackExpansionTypes;
190 mutable llvm::FoldingSet<ObjCObjectTypeImpl> ObjCObjectTypes;
191 mutable llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
192 mutable llvm::FoldingSet<DependentUnaryTransformType>
193 DependentUnaryTransformTypes;
194 mutable llvm::FoldingSet<AutoType> AutoTypes;
195 mutable llvm::FoldingSet<DeducedTemplateSpecializationType>
196 DeducedTemplateSpecializationTypes;
197 mutable llvm::FoldingSet<AtomicType> AtomicTypes;
198 llvm::FoldingSet<AttributedType> AttributedTypes;
199 mutable llvm::FoldingSet<PipeType> PipeTypes;
201 mutable llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
202 mutable llvm::FoldingSet<DependentTemplateName> DependentTemplateNames;
203 mutable llvm::FoldingSet<SubstTemplateTemplateParmStorage>
204 SubstTemplateTemplateParms;
207 SubstTemplateTemplateParmPacks;
212 mutable llvm::FoldingSet<NestedNameSpecifier> NestedNameSpecifiers;
218 mutable llvm::DenseMap<const RecordDecl*, const ASTRecordLayout*>
220 mutable llvm::DenseMap<const ObjCContainerDecl*, const ASTRecordLayout*>
224 using TypeInfoMap = llvm::DenseMap<const Type *, struct TypeInfo>;
225 mutable TypeInfoMap MemoizedTypeInfo;
228 llvm::DenseMap<const CXXRecordDecl*, LazyDeclPtr> KeyFunctions;
231 llvm::DenseMap<ObjCContainerDecl*, ObjCImplDecl*> ObjCImpls;
235 llvm::DenseMap<const ObjCMethodDecl*,const ObjCMethodDecl*> ObjCMethodRedecls;
238 llvm::DenseMap<const VarDecl*, Expr*> BlockVarCopyInits;
242 llvm::DenseMap<const FunctionDecl*, FunctionDecl*>
243 ClassScopeSpecializationPattern;
248 llvm::DenseMap<const MaterializeTemporaryExpr *, APValue *>
249 MaterializedTemporaryValues;
253 class CanonicalTemplateTemplateParm :
public llvm::FoldingSetNode {
262 void Profile(llvm::FoldingSetNodeID &
ID) { Profile(ID, Parm); }
264 static void Profile(llvm::FoldingSetNodeID &
ID,
267 mutable llvm::FoldingSet<CanonicalTemplateTemplateParm>
268 CanonTemplateTemplateParms;
284 mutable TypedefDecl *BuiltinMSVaListDecl =
nullptr;
323 mutable RecordDecl *CFConstantStringTagDecl =
nullptr;
324 mutable TypedefDecl *CFConstantStringTypeDecl =
nullptr;
349 mutable RecordDecl *BlockDescriptorType =
nullptr;
355 mutable RecordDecl *BlockDescriptorExtendedType =
nullptr;
364 llvm::DenseMap<const Decl*, AttrVec*> DeclAttrs;
369 llvm::DenseMap<Decl*, Decl*> MergedDecls;
374 llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
380 struct PerModuleInitializers {
386 llvm::DenseMap<Module*, PerModuleInitializers*> ModuleInitializers;
393 llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *>;
431 llvm::DenseMap<const VarDecl *, TemplateOrSpecializationInfo>
432 TemplateOrInstantiation;
457 llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
459 llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
460 InstantiatedFromUsingShadowDecl;
462 llvm::DenseMap<FieldDecl *, FieldDecl *> InstantiatedFromUnnamedFieldDecl;
470 using CXXMethodVector = llvm::TinyPtrVector<const CXXMethodDecl *>;
471 llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector> OverriddenMethods;
476 llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
477 MangleNumberingContexts;
481 llvm::MapVector<const NamedDecl *, unsigned> MangleNumbers;
482 llvm::MapVector<const VarDecl *, unsigned> StaticLocalNumbers;
486 using ParameterIndexTable = llvm::DenseMap<const VarDecl *, unsigned>;
487 ParameterIndexTable ParamIndices;
506 std::unique_ptr<SanitizerBlacklist> SanitizerBL;
510 std::unique_ptr<XRayFunctionFilter> XRayFilter;
516 mutable llvm::BumpPtrAllocator BumpAlloc;
522 std::unique_ptr<CXXABI> ABI;
530 bool AddrSpaceMapMangling;
551 llvm::DenseMap<
const void *,
552 llvm::PointerUnion4<
const Decl *,
const Stmt *,
560 llvm::PointerUnion4<
const Decl *,
const Stmt *,
561 ast_type_traits::DynTypedNode *,
582 const ast_type_traits::DynTypedNode *
begin()
const {
586 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer);
589 const ast_type_traits::DynTypedNode *
end()
const {
593 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer) + 1;
596 size_t size()
const {
return end() - begin(); }
597 bool empty()
const {
return begin() == end(); }
600 assert(N < size() &&
"Out of bounds!");
601 return *(begin() + N);
636 return PrintingPolicy;
640 PrintingPolicy = Policy;
650 void *
Allocate(
size_t Size,
unsigned Align = 8)
const {
651 return BumpAlloc.Allocate(Size, Align);
653 template <
typename T>
T *
Allocate(
size_t Num = 1)
const {
654 return static_cast<T *
>(Allocate(Num *
sizeof(
T),
alignof(
T)));
661 return BumpAlloc.getTotalMemory();
665 size_t getSideTableAllocatedMemory()
const;
668 return DiagAllocator;
678 QualType getIntTypeForBitwidth(
unsigned DestWidth,
679 unsigned Signed)
const;
684 QualType getRealTypeForBitwidth(
unsigned DestWidth)
const;
686 bool AtomicUsesUnsupportedLibcall(
const AtomicExpr *E)
const;
708 mutable bool CommentsLoaded =
false;
736 return Data.getInt();
744 return Data.getPointer();
760 llvm::PointerIntPair<const RawComment *, 2, Kind> Data;
761 const Decl *OriginalDecl;
777 RawComment *getRawCommentForDeclNoCache(
const Decl *D)
const;
785 assert(LangOpts.RetainCommentsFromSystemHeaders ||
796 getRawCommentForAnyRedecl(
const Decl *D,
797 const Decl **OriginalDecl =
nullptr)
const;
813 const Decl *D)
const;
819 class import_iterator {
826 using difference_type = int;
827 using iterator_category = std::forward_iterator_tag;
829 import_iterator() =
default;
830 explicit import_iterator(
ImportDecl *Import) : Import(Import) {}
832 reference
operator*()
const {
return Import; }
833 pointer operator->()
const {
return Import; }
835 import_iterator &operator++() {
836 Import = ASTContext::getNextLocalImport(Import);
840 import_iterator operator++(
int) {
841 import_iterator Other(*
this);
846 friend bool operator==(import_iterator
X, import_iterator Y) {
847 return X.Import == Y.Import;
850 friend bool operator!=(import_iterator X, import_iterator Y) {
851 return X.Import != Y.Import;
857 return CommentCommandTraits;
861 AttrVec& getDeclAttrs(
const Decl *D);
864 void eraseDeclAttrs(
const Decl *D);
874 getTemplateOrSpecializationInfo(
const VarDecl *Var);
878 void setClassScopeSpecializationPattern(
FunctionDecl *FD,
883 void setInstantiatedFromStaticDataMember(
VarDecl *Inst,
VarDecl *Tmpl,
887 void setTemplateOrSpecializationInfo(
VarDecl *Inst,
915 unsigned overridden_methods_size(
const CXXMethodDecl *Method)
const;
918 llvm::iterator_range<overridden_cxx_method_iterator>;
934 void getOverriddenMethods(
940 void addedLocalImportDecl(
ImportDecl *Import);
943 return Import->NextLocalImport;
949 return import_range(import_iterator(FirstLocalImport), import_iterator());
953 Decl *Result = MergedDecls.lookup(D);
954 return Result ? Result : D;
957 MergedDecls[D] = Primary;
963 bool NotifyListeners =
true);
967 void deduplicateMergedDefinitonsFor(
NamedDecl *ND);
972 auto MergedIt = MergedDefModules.find(Def);
973 if (MergedIt == MergedDefModules.end())
975 return MergedIt->second;
982 void addModuleInitializer(
Module *M, Decl *Init);
1018 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 1019 CanQualType SingletonId; 1020 #include "clang/Basic/OpenCLImageTypes.def" 1049 return ExternalSource.get();
1058 this->Listener = Listener;
1065 void PrintStats()
const;
1073 RecordDecl *buildImplicitRecord(StringRef Name,
1119 bool allowOnPointerType =
false)
const;
1173 bool AsWritten =
false);
1186 return CanQualType::CreateUnsafe(getPointerType((
QualType) T));
1193 return CanQualType::CreateUnsafe(
1202 return CanQualType::CreateUnsafe(getDecayedType((
QualType) T));
1215 QualType getBlockDescriptorType()
const;
1225 QualType getBlockDescriptorExtendedType()
const;
1231 LangAS getOpenCLTypeAddrSpace(
const Type *T)
const;
1234 cudaConfigureCallDecl = FD;
1238 return cudaConfigureCallDecl;
1249 bool &HasByrefExtendedLayout)
const;
1270 unsigned IndexTypeQuals,
1280 unsigned IndexTypeQuals,
1287 unsigned IndexTypeQuals)
const;
1293 unsigned IndexTypeQuals)
const;
1321 Expr *AddrSpaceExpr,
1335 return getFunctionTypeInternal(ResultTy, Args, EPI,
false);
1342 bool OnlyWantCanonical)
const;
1348 const TypeDecl *PrevDecl =
nullptr)
const {
1349 assert(Decl &&
"Passed null for Decl param");
1350 if (Decl->TypeForDecl)
return QualType(Decl->TypeForDecl, 0);
1353 assert(PrevDecl->TypeForDecl &&
"previous decl has no TypeForDecl");
1354 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1355 return QualType(PrevDecl->TypeForDecl, 0);
1358 return getTypeDeclTypeSlow(Decl);
1378 QualType getSubstTemplateTypeParmPackType(
1383 getTemplateTypeParmType(
unsigned Depth,
unsigned Index,
1418 QualType getDependentTemplateSpecializationType(
1439 unsigned NumProtocols)
const;
1444 bool isKindOf)
const;
1455 bool QIdProtocolsAdoptObjCObjectProtocols(
QualType QT,
1474 bool IsDependent)
const;
1477 QualType getAutoDeductType()
const;
1480 QualType getAutoRRefDeductType()
const;
1485 bool IsDependent)
const;
1521 QualType getSignedWCharType()
const;
1526 QualType getUnsignedWCharType()
const;
1542 QualType getPointerDiffType()
const;
1547 QualType getUnsignedPointerDiffType()
const;
1554 QualType getCFConstantStringType()
const;
1563 if (CFConstantStringTypeDecl)
1564 return getTypedefType(CFConstantStringTypeDecl);
1567 void setCFConstantStringType(
QualType T);
1569 RecordDecl *getCFConstantStringTagDecl()
const;
1574 return ObjCConstantStringType;
1578 return ObjCNSStringType;
1582 ObjCNSStringType =
T;
1588 if (ObjCIdRedefinitionType.
isNull())
1589 return getObjCIdType();
1590 return ObjCIdRedefinitionType;
1595 ObjCIdRedefinitionType = RedefType;
1601 if (ObjCClassRedefinitionType.
isNull())
1602 return getObjCClassType();
1603 return ObjCClassRedefinitionType;
1608 ObjCClassRedefinitionType = RedefType;
1614 if (ObjCSelRedefinitionType.
isNull())
1615 return getObjCSelType();
1616 return ObjCSelRedefinitionType;
1621 ObjCSelRedefinitionType = RedefType;
1626 if (!NSObjectName) {
1627 NSObjectName = &Idents.
get(
"NSObject");
1630 return NSObjectName;
1635 if (!NSCopyingName) {
1636 NSCopyingName = &Idents.
get(
"NSCopying");
1639 return NSCopyingName;
1643 assert(Target &&
"Expected target to be initialized");
1644 const llvm::Triple &T = Target->
getTriple();
1646 if (T.isOSWindows() && T.isArch64Bit())
1647 return UnsignedLongLongTy;
1648 return UnsignedLongTy;
1652 assert(Target &&
"Expected target to be initialized");
1653 const llvm::Triple &T = Target->
getTriple();
1655 if (T.isOSWindows() && T.isArch64Bit())
1663 BoolName = &Idents.
get(
"bool");
1668 if (!MakeIntegerSeqName)
1669 MakeIntegerSeqName = &Idents.
get(
"__make_integer_seq");
1670 return MakeIntegerSeqName;
1674 if (!TypePackElementName)
1675 TypePackElementName = &Idents.
get(
"__type_pack_element");
1676 return TypePackElementName;
1682 return getTypeDeclType(getObjCInstanceTypeDecl());
1695 return getTypeDeclType(FILEDecl);
1701 this->jmp_bufDecl = jmp_bufDecl;
1707 return getTypeDeclType(jmp_bufDecl);
1713 this->sigjmp_bufDecl = sigjmp_bufDecl;
1719 return getTypeDeclType(sigjmp_bufDecl);
1725 this->ucontext_tDecl = ucontext_tDecl;
1731 return getTypeDeclType(ucontext_tDecl);
1737 return getLangOpts().CPlusPlus ? BoolTy : IntTy;
1744 void getObjCEncodingForType(
QualType T, std::string &S,
1746 QualType *NotEncodedT=
nullptr)
const;
1750 void getObjCEncodingForPropertyType(
QualType T, std::string &S)
const;
1752 void getLegacyIntegralTypeEncoding(
QualType &t)
const;
1756 std::string &S)
const;
1764 std::string getObjCEncodingForFunctionDecl(
const FunctionDecl *Decl)
const;
1768 std::string getObjCEncodingForMethodDecl(
const ObjCMethodDecl *Decl,
1769 bool Extended =
false)
const;
1772 std::string getObjCEncodingForBlock(
const BlockExpr *blockExpr)
const;
1779 const Decl *Container)
const;
1786 const Decl *Container)
const;
1801 return getTypeDeclType(getObjCIdDecl());
1811 return getTypeDeclType(getObjCSelDecl());
1823 return getTypeDeclType(getObjCClassDecl());
1842 return getTypeDeclType(getBOOLDecl());
1847 return getObjCInterfaceType(getObjCProtocolDecl());
1856 return getTypeDeclType(getBuiltinVaListDecl());
1862 Decl *getVaListTagDecl()
const;
1870 return getTypeDeclType(getBuiltinMSVaListDecl());
1876 return getQualifiedType(T, Qualifiers::fromCVRMask(CVR));
1881 return getQualifiedType(split.
Ty, split.
Quals);
1890 return getExtQualType(Ptr, Qc);
1897 return getExtQualType(T, Qs);
1906 assert(lifetime != Qualifiers::OCL_None);
1910 return getQualifiedType(type, qs);
1931 bool TemplateKeyword,
1963 unsigned *IntegerConstantArgs =
nullptr)
const;
1997 const llvm::fltSemantics &getFloatTypeSemantics(
QualType T)
const;
2004 unsigned getOpenMPDefaultSimdAlign(
QualType T)
const;
2012 return getTypeSize(CharTy);
2016 CharUnits toCharUnitsFromBits(int64_t BitSize)
const;
2019 int64_t toBits(
CharUnits CharSize)
const;
2034 unsigned getTypeAlignIfKnown(
QualType T)
const;
2043 std::pair<CharUnits, CharUnits> getTypeInfoDataSizeInChars(
QualType T)
const;
2045 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
const Type *T)
const;
2046 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
QualType T)
const;
2050 bool isAlignmentRequired(
const Type *T)
const;
2051 bool isAlignmentRequired(
QualType T)
const;
2058 unsigned getPreferredTypeAlign(
const Type *T)
const;
2062 unsigned getTargetDefaultAlignForAttributeAligned()
const;
2066 unsigned getAlignOfGlobalVar(
QualType T)
const;
2095 bool Simple =
false)
const;
2155 void CollectInheritedProtocols(
const Decl *CDecl,
2156 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols);
2160 bool hasUniqueObjectRepresentations(
QualType Ty)
const;
2191 return getCanonicalType(T1) == getCanonicalType(T2);
2194 return getCanonicalType(T1) == getCanonicalType(T2);
2215 return getCanonicalType(T1).getTypePtr() ==
2216 getCanonicalType(T2).getTypePtr();
2220 bool IsParam)
const {
2223 if (SubTnullability.hasValue() == SuperTnullability.hasValue()) {
2225 if (!SubTnullability)
2228 if (*SubTnullability == *SuperTnullability ||
2229 *SubTnullability == NullabilityKind::Unspecified ||
2230 *SuperTnullability == NullabilityKind::Unspecified)
2236 return (*SuperTnullability == NullabilityKind::NonNull &&
2237 *SubTnullability == NullabilityKind::Nullable);
2242 return (*SuperTnullability == NullabilityKind::Nullable &&
2243 *SubTnullability == NullabilityKind::NonNull);
2281 CallingConv getDefaultCallingConvention(
bool IsVariadic,
2282 bool IsCXXMethod)
const;
2322 return dyn_cast_or_null<ConstantArrayType>(getAsArrayType(T));
2325 return dyn_cast_or_null<VariableArrayType>(getAsArrayType(T));
2328 return dyn_cast_or_null<IncompleteArrayType>(getAsArrayType(T));
2332 return dyn_cast_or_null<DependentSizedArrayType>(getAsArrayType(T));
2415 unsigned getTargetAddressSpace(
LangAS AS)
const;
2419 uint64_t getTargetNullPointerValue(
QualType QT)
const;
2427 unsigned getIntegerRank(
const Type *T)
const;
2436 bool CompareUnqualified =
false);
2442 return T == getObjCIdType();
2446 return T == getObjCClassType();
2450 return T == getObjCSelType();
2463 bool canAssignObjCInterfacesInBlockPointer(
2466 bool BlockReturnType);
2474 bool Unqualified =
false,
bool BlockReturnType =
false);
2476 bool Unqualified =
false);
2478 bool OfBlockPointer =
false,
2479 bool Unqualified =
false);
2481 bool OfBlockPointer=
false,
2482 bool Unqualified =
false);
2505 bool mergeExtParameterInfo(
2508 bool &CanUseFirst,
bool &CanUseSecond,
2519 unsigned getIntWidth(
QualType T)
const;
2537 unsigned Width = getIntWidth(Type);
2538 if (Width != Res.getBitWidth())
2539 return Res.extOrTrunc(Width);
2543 bool isSentinelNullExpr(
const Expr *E);
2555 return !ObjCImpls.empty();
2580 void setBlockVarCopyInits(
VarDecl*VD,
Expr* Init);
2603 getTrivialTypeSourceInfo(
QualType T,
2613 void AddDeallocation(
void (*Callback)(
void*),
void *Data);
2617 template <
typename T>
2619 if (!std::is_trivially_destructible<T>::value) {
2620 auto DestroyPtr = [](
void *V) {
static_cast<T *
>(V)->~
T(); };
2621 AddDeallocation(DestroyPtr, Ptr);
2634 bool DeclMustBeEmitted(
const Decl *D);
2639 void addCopyConstructorForExceptionObject(
CXXRecordDecl *RD,
2650 void setManglingNumber(
const NamedDecl *ND,
unsigned Number);
2651 unsigned getManglingNumber(
const NamedDecl *ND)
const;
2653 void setStaticLocalNumber(
const VarDecl *VD,
unsigned Number);
2654 unsigned getStaticLocalNumber(
const VarDecl *VD)
const;
2660 std::unique_ptr<MangleNumberingContext> createMangleNumberingContext()
const;
2664 void setParameterIndex(
const ParmVarDecl *D,
unsigned index);
2668 unsigned getParameterIndex(
const ParmVarDecl *D)
const;
2728 void InitBuiltinTypes(
const TargetInfo &Target,
2735 void getObjCEncodingForTypeImpl(
QualType t, std::string &S,
2736 bool ExpandPointedToStructures,
2737 bool ExpandStructures,
2739 bool OutermostType =
false,
2740 bool EncodingProperty =
false,
2741 bool StructField =
false,
2742 bool EncodeBlockParameters =
false,
2743 bool EncodeClassNames =
false,
2744 bool EncodePointerToObjCTypedef =
false,
2745 QualType *NotEncodedT=
nullptr)
const;
2748 void getObjCEncodingForStructureImpl(
RecordDecl *RD, std::string &S,
2750 bool includeVBases =
true,
2751 QualType *NotEncodedT=
nullptr)
const;
2757 bool Extended)
const;
2761 bool isMSStaticDataMemberInlineDefinition(
const VarDecl *VD)
const;
2783 getInlineVariableDefinitionKind(
const VarDecl *VD)
const;
2808 llvm::PointerIntPair<StoredDeclsMap *, 1> LastSDM;
2810 std::unique_ptr<ParentMapPointers> PointerParents;
2811 std::unique_ptr<ParentMapOtherNodes> OtherParents;
2813 std::unique_ptr<VTableContextBase> VTContext;
2815 void ReleaseDeclContextMaps();
2816 void ReleaseParentMapEntries();
2825 PSF_Invalid = 0x80000000U,
2837 : Decl(Decl), PragmaSectionLocation(PragmaSectionLocation),
2838 SectionFlags(SectionFlags) {}
2890 return C.Allocate(Bytes, Alignment);
2927 size_t Alignment = 8) {
2928 return C.Allocate(Bytes, Alignment);
2942 template <
typename Owner,
typename T,
2951 return new (Ctx)
LazyData(Source, Value);
2955 #endif // LLVM_CLANG_AST_ASTCONTEXT_H static uint64_t getFieldOffset(const ASTContext &C, const FieldDecl *FD)
const IncompleteArrayType * getAsIncompleteArrayType(QualType T) const
void setPrimaryMergedDecl(Decl *D, Decl *Primary)
const Type * Ty
The locally-unqualified type.
An instance of this class is created to represent a function declaration or definition.
void setjmp_bufDecl(TypeDecl *jmp_bufDecl)
Set the type for the C jmp_buf type.
Smart pointer class that efficiently represents Objective-C method names.
QualType getObjCIdType() const
Represents the Objective-CC id type.
Holds information about both target-independent and target-specific builtins, allowing easy queries b...
CanQualType LongDoubleComplexTy
A (possibly-)qualified type.
static void DumpRecordLayout(raw_ostream &OS, const RecordDecl *RD, const ASTContext &C, CharUnits Offset, unsigned IndentLevel, const char *Description, bool PrintSizeInfo, bool IncludeVirtualBases)
QualType getBuiltinVaListType() const
Retrieve the type of the __builtin_va_list type.
bool operator==(CanQual< T > x, CanQual< U > y)
InlineVariableDefinitionKind
__SIZE_TYPE__ size_t
The unsigned integer type of the result of the sizeof operator.
static unsigned NumImplicitMoveAssignmentOperatorsDeclared
The number of implicitly-declared move assignment operators for which declarations were built...
DominatorTree GraphTraits specialization so the DominatorTree can be iterable by generic graph iterat...
static unsigned NumImplicitDefaultConstructors
The number of implicitly-declared default constructors.
AutoTypeKeyword
Which keyword(s) were used to create an AutoType.
Stmt - This represents one statement.
FunctionType - C99 6.7.5.3 - Function Declarators.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
TypedefDecl - Represents the declaration of a typedef-name via the 'typedef' type specifier...
C Language Family Type Representation.
void setObjCClassRedefinitionType(QualType RedefType)
Set the user-written type that redefines 'SEL'.
static unsigned NumImplicitMoveAssignmentOperators
The number of implicitly-declared move assignment operators.
void setucontext_tDecl(TypeDecl *ucontext_tDecl)
Set the type for the C ucontext_t type.
RawCommentList Comments
All comments in this translation unit.
QualType getQualifiedType(SplitQualType split) const
Un-split a SplitQualType.
Decl - This represents one declaration (or definition), e.g.
CanQualType ObjCBuiltinSelTy
QualType getUnqualifiedObjCPointerType(QualType type) const
getUnqualifiedObjCPointerType - Returns version of Objective-C pointer type with lifetime qualifier r...
The base class of the type hierarchy.
QualType getsigjmp_bufType() const
Retrieve the C sigjmp_buf type.
CanQualType getNSUIntegerType() const
Represents an array type, per C99 6.7.5.2 - Array Declarators.
QualType withConst() const
const TargetInfo & getTargetInfo() const
A container of type source information.
QualType getLogicalOperationType() const
The result type of logical operations, '<', '>', '!=', etc.
QualType getWCharType() const
Return the unique wchar_t type available in C++ (and available as __wchar_t as a Microsoft extension)...
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
QualType getConstType(QualType T) const
Return the uniqued reference to the type for a const qualified type.
unsigned getTypeAlign(QualType T) const
Return the ABI-specified alignment of a (complete) type T, in bits.
QualType withFastQualifiers(unsigned TQs) const
const RawComment * getRaw() const LLVM_READONLY
VarDecl - An instance of this class is created to represent a variable declaration or definition...
const SourceManager & getSourceManager() const
void removeObjCLifetime()
QualType getRawCFConstantStringType() const
Get the structure type used to representation CFStrings, or NULL if it hasn't yet been built...
Extra information about a function prototype.
Declaration context for names declared as extern "C" in C++.
LangAS
Defines the address space values used by the address space qualifier of QualType. ...
ObjCMethodDecl - Represents an instance or class method declaration.
void setRaw(const RawComment *RC)
QualType getObjCClassType() const
Represents the Objective-C Class type.
Stores a list of template parameters for a TemplateDecl and its derived classes.
Describes how types, statements, expressions, and declarations should be printed. ...
ParmVarDecl - Represents a parameter to a function.
QualType getQualifiedType(QualType T, Qualifiers Qs) const
Return a type with additional qualifiers.
Represents the builtin template declaration which is used to implement __make_integer_seq and other b...
The collection of all-type qualifiers we support.
RecordDecl - Represents a struct/union/class.
One of these records is kept for each identifier that is lexed.
bool isObjCClassType(QualType T) const
bool isObjCIdType(QualType T) const
This table allows us to fully hide how we implement multi-keyword caching.
Represents a class type in Objective C.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
static unsigned NumImplicitMoveConstructorsDeclared
The number of implicitly-declared move constructors for which declarations were built.
QualType getLifetimeQualifiedType(QualType type, Qualifiers::ObjCLifetime lifetime)
Return a type with the given lifetime qualifier.
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
static CGCXXABI * createCXXABI(CodeGenModule &CGM)
DynTypedNodeList getParents(const NodeT &Node)
Returns the parents of the given node.
void setBOOLDecl(TypedefDecl *TD)
Save declaration of 'BOOL' typedef.
DynTypedNodeList(ArrayRef< DynTypedNode > A)
bool addressSpaceMapManglingFor(LangAS AS) const
The iterator over UnresolvedSets.
Container for either a single DynTypedNode or for an ArrayRef to DynTypedNode.
clang::CharUnits operator*(clang::CharUnits::QuantityType Scale, const clang::CharUnits &CU)
void setPrintingPolicy(const clang::PrintingPolicy &Policy)
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...
CanQualType OCLReserveIDTy
Keeps track of the various options that can be enabled, which controls the dialect of C or C++ that i...
Describes a module or submodule.
RawCommentList & getRawCommentList()
CanQualType getComplexType(CanQualType T) const
ObjCContainerDecl - Represents a container for method declarations.
CharUnits - This is an opaque type for sizes expressed in character units.
A convenient class for passing around template argument information.
void setcudaConfigureCallDecl(FunctionDecl *FD)
QualType getVolatileType(QualType T) const
Return the uniqued reference to the type for a volatile qualified type.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
Keeps track of the mangled names of lambda expressions and block literals within a particular context...
QualType getObjCNSStringType() const
Concrete class used by the front-end to report problems and issues.
const clang::PrintingPolicy & getPrintingPolicy() const
Selector GetNullarySelector(StringRef name, ASTContext &Ctx)
Utility function for constructing a nullary selector.
TypeDecl - Represents a declaration of a type.
CanQualType PseudoObjectTy
LangAS getAddressSpace() const
CXXMethodVector::const_iterator overridden_cxx_method_iterator
QualType getObjCClassRedefinitionType() const
Retrieve the type that Class has been defined to, which may be different from the built-in Class if C...
QualType getCVRQualifiedType(QualType T, unsigned CVR) const
Return a type with additional const, volatile, or restrict qualifiers.
const Type * getTypePtr() const
Retrieves a pointer to the underlying (unqualified) type.
TypedefDecl * getBOOLDecl() const
Retrieve declaration of 'BOOL' typedef.
const DependentSizedArrayType * getAsDependentSizedArrayType(QualType T) const
Defines the Linkage enumeration and various utility functions.
import_range local_imports() const
unsigned LangASMap[(unsigned) LangAS::FirstTargetAddressSpace]
The type of a lookup table which maps from language-specific address spaces to target-specific ones...
static unsigned NumImplicitDefaultConstructorsDeclared
The number of implicitly-declared default constructors for which declarations were built...
Represents an Objective-C protocol declaration.
unsigned getTypeAlign(const Type *T) const
A cache of the value of this pointer, in the most recent generation in which we queried it...
Represents an ObjC class declaration.
QualType getObjCProtoType() const
Retrieve the type of the Objective-C Protocol class.
QualType getBOOLType() const
type of 'BOOL' type.
Decl * getPrimaryMergedDecl(Decl *D)
IntrusiveRefCntPtr< ExternalASTSource > ExternalSource
llvm::iterator_range< overridden_cxx_method_iterator > overridden_method_range
CanQualType Float128ComplexTy
ObjCPropertyImplDecl - Represents implementation declaration of a property in a class or category imp...
Provides definitions for the various language-specific address spaces.
const XRayFunctionFilter & getXRayFilter() const
llvm::StringMap< SectionInfo > SectionInfos
ArrayRef< Module * > getModulesWithMergedDefinition(const NamedDecl *Def)
Get the additional modules in which the definition Def has been merged.
Represents a prototype with parameter type info, e.g.
llvm::iterator_range< import_iterator > import_range
static unsigned NumImplicitCopyConstructors
The number of implicitly-declared copy constructors.
Represents a ValueDecl that came out of a declarator.
DeclarationNameTable DeclarationNames
TypeInfo getTypeInfo(QualType T) const
ArraySizeModifier
Capture whether this is a normal array (e.g.
bool hasSameType(const Type *T1, const Type *T2) const
bool isObjCSelType(QualType T) const
void addObjCLifetime(ObjCLifetime type)
bool AnyObjCImplementation()
Return true if there is at least one @implementation in the TU.
ASTRecordLayout - This class contains layout information for one RecordDecl, which is a struct/union/...
Exposes information about the current target.
Represents an array type in C++ whose size is a value-dependent expression.
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
Defines the clang::LangOptions interface.
QualType getucontext_tType() const
Retrieve the C ucontext_t type.
bool isInSystemHeader(SourceLocation Loc) const
Returns if a SourceLocation is in a system header.
const FunctionProtoType * T
Declaration of a template type parameter.
Implements an efficient mapping from strings to IdentifierInfo nodes.
ElaboratedTypeKeyword
The elaboration keyword that precedes a qualified type name or introduces an elaborated-type-specifie...
BlockExpr - Adaptor class for mixing a BlockDecl with expressions.
CanQualType OMPArraySectionTy
static unsigned NumImplicitMoveConstructors
The number of implicitly-declared move constructors.
Defines an enumeration for C++ overloaded operators.
unsigned getFastQualifiers() const
comments::CommandTraits & getCommentCommandTraits() const
static ImportDecl * getNextLocalImport(ImportDecl *Import)
void setObjCIdRedefinitionType(QualType RedefType)
Set the user-written type that redefines id.
An allocator for Storage objects, which uses a small cache to objects, used to reduce malloc()/free()...
An abstract interface that should be implemented by listeners that want to be notified when an AST en...
DynTypedNodeList(const DynTypedNode &N)
Represents a C++ template name within the type system.
QualType getFILEType() const
Retrieve the C FILE type.
A std::pair-like structure for storing a qualified type split into its local qualifiers and its local...
Defines the clang::IdentifierInfo, clang::IdentifierTable, and clang::Selector interfaces.
PartialDiagnostic::StorageAllocator & getDiagAllocator()
Qualifiers Quals
The local qualifiers.
bool hasSameNullabilityTypeQualifier(QualType SubT, QualType SuperT, bool IsParam) const
QualType getFunctionType(QualType ResultTy, ArrayRef< QualType > Args, const FunctionProtoType::ExtProtoInfo &EPI) const
Return a normal function type with a typed argument list.
Represents a GCC generic vector type.
const Type * getCanonicalType(const Type *T) const
TemplateTemplateParmDecl - Declares a template template parameter, e.g., "T" in.
Common base class for placeholders for types that get replaced by placeholder type deduction: C++11 a...
Implements C++ ABI-specific semantic analysis functions.
QualType getTypeDeclType(const TypeDecl *Decl, const TypeDecl *PrevDecl=nullptr) const
Return the unique reference to the type for the specified type declaration.
void addDestruction(T *Ptr)
If T isn't trivially destructible, calls AddDeallocation to register it for destruction.
IdentifierInfo * getNSObjectName()
Retrieve the identifier 'NSObject'.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
void setOriginalDecl(const Decl *Orig)
CanQualType getNSIntegerType() const
CallingConv
CallingConv - Specifies the calling convention that a function uses.
const SanitizerBlacklist & getSanitizerBlacklist() const
const ast_type_traits::DynTypedNode * begin() const
IdentifierInfo * getNSCopyingName()
Retrieve the identifier 'NSCopying'.
static const RecordType * getRecordType(QualType QT)
Checks that the passed in QualType either is of RecordType or points to RecordType.
Abstract interface for external sources of AST nodes.
SourceLocation PragmaSectionLocation
QualType getWideCharType() const
Return the type of wide characters.
QualType getBuiltinMSVaListType() const
Retrieve the type of the __builtin_ms_va_list type.
static unsigned NumImplicitDestructorsDeclared
The number of implicitly-declared destructors for which declarations were built.
QualType getObjCIdRedefinitionType() const
Retrieve the type that id has been defined to, which may be different from the built-in id if id has ...
SelectorTable & Selectors
QualType getCanonicalType() const
llvm::PointerUnion< VarTemplateDecl *, MemberSpecializationInfo * > TemplateOrSpecializationInfo
A type synonym for the TemplateOrInstantiation mapping.
Encodes a location in the source.
IdentifierInfo & get(StringRef Name)
Return the identifier token info for the specified named identifier.
QualType getObjCSelRedefinitionType() const
Retrieve the type that 'SEL' has been defined to, which may be different from the built-in 'SEL' if '...
A structure for storing an already-substituted template template parameter pack.
static unsigned NumImplicitCopyAssignmentOperatorsDeclared
The number of implicitly-declared copy assignment operators for which declarations were built...
Kind getKind() const LLVM_READONLY
TagDecl - Represents the declaration of a struct/union/class/enum.
QualType getFunctionNoProtoType(QualType ResultTy) const
QualType getObjCSelType() const
Retrieve the type that corresponds to the predefined Objective-C 'SEL' type.
MangleContext - Context for tracking state which persists across multiple calls to the C++ name mangl...
Represents a static or instance method of a struct/union/class.
const ConstantArrayType * getAsConstantArrayType(QualType T) const
QualType getWIntType() const
In C99, this returns a type compatible with the type defined in <stddef.h> as defined by the target...
static const ComplexType * getComplexType(QualType type)
Return the complex type that we are meant to emit.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
ObjCCategoryDecl - Represents a category declaration.
BuiltinTemplateKind
Kinds of BuiltinTemplateDecl.
bool isSignedIntegerOrEnumerationType() const
Determines whether this is an integer type that is signed or an enumeration types whose underlying ty...
AtomicExpr - Variadic atomic builtins: __atomic_exchange, __atomic_fetch_*, __atomic_load, __atomic_store, and __atomic_compare_exchange_*, for the similarly-named C++11 instructions, and __c11 variants for <stdatomic.h>, and corresponding __opencl_atomic_* for OpenCL 2.0.
bool isObjCObjectPointerType() const
Represents one property declaration in an Objective-C interface.
We have found a comment attached to this particular declaration.
const SmallVectorImpl< Type * > & getTypes() const
FunctionDecl * getcudaConfigureCallDecl()
bool isTargetAddressSpace(LangAS AS)
void setObjCSuperType(QualType ST)
llvm::DenseMap< const Decl *, RawCommentAndCacheFlags > RedeclComments
Mapping from declarations to comments attached to any redeclaration.
bool hasSameUnqualifiedType(QualType T1, QualType T2) const
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
Describes a module import declaration, which makes the contents of the named module visible in the cu...
QualType getObjCInstanceType()
Retrieve the Objective-C "instancetype" type, if already known; otherwise, returns a NULL type;...
unsigned getTargetAddressSpace(Qualifiers Q) const
ast_type_traits::DynTypedNode DynTypedNode
Defines various enumerations that describe declaration and type specifiers.
void * Allocate(size_t Size, unsigned Align=8) const
const DynTypedNode & operator[](size_t N) const
CanQualType UnsignedShortTy
Base class for declarations which introduce a typedef-name.
ast_type_traits::DynTypedNode Node
Represents a template argument.
TagTypeKind
The kind of a tag type.
Dataflow Directional Tag Classes.
SectionInfo(DeclaratorDecl *Decl, SourceLocation PragmaSectionLocation, int SectionFlags)
A qualifier set is used to build a set of qualifiers.
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
CanQualType getAdjustedType(CanQualType Orig, CanQualType New) const
The base class of all kinds of template declarations (e.g., class, function, etc.).
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
QualType getRestrictType(QualType T) const
Return the uniqued reference to the type for a restrict qualified type.
Reads an AST files chain containing the contents of a translation unit.
CanQualType getPointerType(CanQualType T) const
CanQualType getDecayedType(CanQualType T) const
CanQualType UnsignedLongLongTy
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
Represents the declaration of an Objective-C type parameter.
void setASTMutationListener(ASTMutationListener *Listener)
Attach an AST mutation listener to the AST context.
const Type * strip(QualType type)
Collect any qualifiers on the given type and return an unqualified type.
EnumDecl - Represents an enum.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
bool hasObjCLifetime() const
QualType AutoRRefDeductTy
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
llvm::BumpPtrAllocator & getAllocator() const
ExternalASTSource * getExternalSource() const
Retrieve a pointer to the external AST source associated with this AST context, if any...
static unsigned NumImplicitCopyAssignmentOperators
The number of implicitly-declared copy assignment operators.
A dynamically typed AST node container.
const Decl * getOriginalDecl() const LLVM_READONLY
Represents a pointer to an Objective C object.
CanQualType ObjCBuiltinBoolTy
ObjCImplementationDecl - Represents a class definition - this is where method definitions are specifi...
QualType getCanonicalTypeInternal() const
Selector getSelector(unsigned NumArgs, IdentifierInfo **IIV)
Can create any sort of selector.
uint64_t getCharWidth() const
Return the size of the character type, in bits.
bool hasNonFastQualifiers() const
Return true if the set contains any qualifiers which require an ExtQuals node to be allocated...
bool hasSameType(QualType T1, QualType T2) const
Determine whether the given types T1 and T2 are equivalent.
void addComment(const RawComment &RC)
llvm::DenseMap< const Decl *, comments::FullComment * > ParsedComments
Mapping from declarations to parsed comments attached to any redeclaration.
Implements a partial diagnostic that can be emitted anwyhere in a DiagnosticBuilder stream...
Optional< NullabilityKind > getNullability(const ASTContext &context) const
Determine the nullability of the given type.
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
QualType getObjCConstantStringInterface() const
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
QualType getQualifiedType(const Type *T, Qualifiers Qs) const
Return a type with additional qualifiers.
SourceManager & getSourceManager()
ASTMutationListener * getASTMutationListener() const
Retrieve a pointer to the AST mutation listener associated with this AST context, if any...
CanQualType getCanonicalType(QualType T) const
Return the canonical (structural) type corresponding to the specified potentially non-canonical type ...
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
void setObjCNSStringType(QualType T)
TranslationUnitDecl * getTranslationUnitDecl() const
void Deallocate(void *Ptr) const
Defines the clang::SourceLocation class and associated facilities.
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
static QualType getCanonicalParamType(ASTContext &C, QualType T)
llvm::DenseMap< const void *, llvm::PointerUnion4< const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector * > > ParentMapPointers
Maps from a node to its parents.
Represents a C++ struct/union/class.
IdentifierInfo * getTypePackElementName() const
Represents a template specialization type whose template cannot be resolved, e.g. ...
Selector GetUnarySelector(StringRef name, ASTContext &Ctx)
Utility function for constructing an unary selector.
ObjCDeclQualifier
ObjCDeclQualifier - 'Qualifiers' written next to the return and parameter types in method declaration...
Represents a C array with an unspecified size.
Missing a type from <stdio.h>
IdentifierInfo * getMakeIntegerSeqName() const
Qualifiers getQualifiers() const
Retrieve the set of qualifiers applied to this type.
ObjCIvarDecl - Represents an ObjC instance variable.
bool operator!=(CanQual< T > x, CanQual< U > y)
Provides information a specialization of a member of a class template, which may be a member function...
static unsigned NumImplicitCopyConstructorsDeclared
The number of implicitly-declared copy constructors for which declarations were built.
Builtin::Context & BuiltinInfo
Writes an AST file containing the contents of a translation unit.
Defines the clang::TargetInfo interface.
A SourceLocation and its associated SourceManager.
void setObjCSelRedefinitionType(QualType RedefType)
Set the user-written type that redefines 'SEL'.
const VariableArrayType * getAsVariableArrayType(QualType T) const
QualType getjmp_bufType() const
Retrieve the C jmp_buf type.
TranslationUnitDecl - The top declaration context.
llvm::PointerUnion< T, LazyData * > ValueType
GVALinkage
A more specific kind of linkage than enum Linkage.
A lazy value (of type T) that is within an AST node of type Owner, where the value might change in la...
llvm::DenseMap< ast_type_traits::DynTypedNode, llvm::PointerUnion4< const Decl *, const Stmt *, ast_type_traits::DynTypedNode *, ParentVector * > > ParentMapOtherNodes
Parent map for nodes without pointer identity.
T * Allocate(size_t Num=1) const
const ast_type_traits::DynTypedNode * end() const
A trivial tuple used to represent a source range.
NamedDecl - This represents a decl with a name.
void setsigjmp_bufDecl(TypeDecl *sigjmp_bufDecl)
Set the type for the C sigjmp_buf type.
void setFILEDecl(TypeDecl *FILEDecl)
Set the type for the C FILE type.
TypeInfo(uint64_t Width, unsigned Align, bool AlignIsRequired)
const TargetInfo * getAuxTargetInfo() const
Represents a C array with a specified size that is not an integer-constant-expression.
unsigned getTargetAddressSpace(QualType T) const
size_t getASTAllocatedMemory() const
Return the total amount of physical memory allocated for representing AST nodes and type information...
static bool isObjCNSObjectType(QualType Ty)
Return true if this is an NSObject object with its NSObject attribute set.
IdentifierInfo * getBoolName() const
Retrieve the identifier 'bool'.
Missing a type from <setjmp.h>
SourceLocation getBegin() const
const LangOptions & getLangOpts() const
FullSourceLoc getFullLoc(SourceLocation Loc) const
ObjCCategoryImplDecl - An object of this class encapsulates a category @implementation declaration...
Represents the canonical version of C arrays with a specified constant size.
This class handles loading and caching of source files into memory.
uint64_t getTypeSize(const Type *T) const
bool isObjCNSObjectType() const
A class which abstracts out some details necessary for making a call.
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Engages in a tight little dance with the lexer to efficiently preprocess tokens.
static CharUnits getDeclAlign(Expr *E, CharUnits TypeAlign, ASTContext &Context)
A helper function to get the alignment of a Decl referred to by DeclRefExpr or MemberExpr.
Qualifiers::ObjCLifetime getObjCLifetime() const
Returns lifetime attribute of this type.
static unsigned NumImplicitDestructors
The number of implicitly-declared destructors.