15 #ifndef LLVM_CLANG_AST_ASTCONTEXT_H 16 #define LLVM_CLANG_AST_ASTCONTEXT_H 44 #include "llvm/ADT/APSInt.h" 45 #include "llvm/ADT/ArrayRef.h" 46 #include "llvm/ADT/DenseMap.h" 47 #include "llvm/ADT/FoldingSet.h" 48 #include "llvm/ADT/IntrusiveRefCntPtr.h" 49 #include "llvm/ADT/MapVector.h" 50 #include "llvm/ADT/None.h" 51 #include "llvm/ADT/Optional.h" 52 #include "llvm/ADT/PointerIntPair.h" 53 #include "llvm/ADT/PointerUnion.h" 54 #include "llvm/ADT/SmallVector.h" 55 #include "llvm/ADT/StringMap.h" 56 #include "llvm/ADT/StringRef.h" 57 #include "llvm/ADT/TinyPtrVector.h" 58 #include "llvm/ADT/Triple.h" 59 #include "llvm/ADT/iterator_range.h" 60 #include "llvm/Support/AlignOf.h" 61 #include "llvm/Support/Allocator.h" 62 #include "llvm/Support/Casting.h" 63 #include "llvm/Support/Compiler.h" 70 #include <type_traits> 83 class ASTMutationListener;
84 class ASTRecordLayout;
87 class BuiltinTemplateDecl;
90 class CXXConstructorDecl;
93 class DiagnosticsEngine;
96 class MangleNumberingContext;
97 class MaterializeTemporaryExpr;
98 class MemberSpecializationInfo;
100 class ObjCCategoryDecl;
101 class ObjCCategoryImplDecl;
102 class ObjCContainerDecl;
104 class ObjCImplementationDecl;
105 class ObjCInterfaceDecl;
107 class ObjCMethodDecl;
108 class ObjCPropertyDecl;
109 class ObjCPropertyImplDecl;
110 class ObjCProtocolDecl;
111 class ObjCTypeParamDecl;
114 class StoredDeclsMap;
116 class TemplateParameterList;
117 class TemplateTemplateParmDecl;
118 class TemplateTypeParmDecl;
119 class UnresolvedSetIterator;
120 class UsingShadowDecl;
121 class VarTemplateDecl;
122 class VTableContextBase;
144 TypeInfo(uint64_t Width,
unsigned Align,
bool AlignIsRequired)
145 : Width(Width), Align(Align), AlignIsRequired(AlignIsRequired) {}
154 mutable llvm::FoldingSet<ExtQuals> ExtQualNodes;
155 mutable llvm::FoldingSet<ComplexType> ComplexTypes;
156 mutable llvm::FoldingSet<PointerType> PointerTypes;
157 mutable llvm::FoldingSet<AdjustedType> AdjustedTypes;
158 mutable llvm::FoldingSet<BlockPointerType> BlockPointerTypes;
159 mutable llvm::FoldingSet<LValueReferenceType> LValueReferenceTypes;
160 mutable llvm::FoldingSet<RValueReferenceType> RValueReferenceTypes;
161 mutable llvm::FoldingSet<MemberPointerType> MemberPointerTypes;
162 mutable llvm::FoldingSet<ConstantArrayType> ConstantArrayTypes;
163 mutable llvm::FoldingSet<IncompleteArrayType> IncompleteArrayTypes;
164 mutable std::vector<VariableArrayType*> VariableArrayTypes;
165 mutable llvm::FoldingSet<DependentSizedArrayType> DependentSizedArrayTypes;
166 mutable llvm::FoldingSet<DependentSizedExtVectorType>
167 DependentSizedExtVectorTypes;
168 mutable llvm::FoldingSet<DependentAddressSpaceType>
169 DependentAddressSpaceTypes;
170 mutable llvm::FoldingSet<VectorType> VectorTypes;
171 mutable llvm::FoldingSet<DependentVectorType> DependentVectorTypes;
172 mutable llvm::FoldingSet<FunctionNoProtoType> FunctionNoProtoTypes;
173 mutable llvm::ContextualFoldingSet<FunctionProtoType, ASTContext&>
175 mutable llvm::FoldingSet<DependentTypeOfExprType> DependentTypeOfExprTypes;
176 mutable llvm::FoldingSet<DependentDecltypeType> DependentDecltypeTypes;
177 mutable llvm::FoldingSet<TemplateTypeParmType> TemplateTypeParmTypes;
178 mutable llvm::FoldingSet<ObjCTypeParamType> ObjCTypeParamTypes;
179 mutable llvm::FoldingSet<SubstTemplateTypeParmType>
180 SubstTemplateTypeParmTypes;
181 mutable llvm::FoldingSet<SubstTemplateTypeParmPackType>
182 SubstTemplateTypeParmPackTypes;
183 mutable llvm::ContextualFoldingSet<TemplateSpecializationType, ASTContext&>
184 TemplateSpecializationTypes;
185 mutable llvm::FoldingSet<ParenType> ParenTypes;
186 mutable llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
187 mutable llvm::FoldingSet<DependentNameType> DependentNameTypes;
190 DependentTemplateSpecializationTypes;
191 llvm::FoldingSet<PackExpansionType> PackExpansionTypes;
192 mutable llvm::FoldingSet<ObjCObjectTypeImpl> ObjCObjectTypes;
193 mutable llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
194 mutable llvm::FoldingSet<DependentUnaryTransformType>
195 DependentUnaryTransformTypes;
196 mutable llvm::FoldingSet<AutoType> AutoTypes;
197 mutable llvm::FoldingSet<DeducedTemplateSpecializationType>
198 DeducedTemplateSpecializationTypes;
199 mutable llvm::FoldingSet<AtomicType> AtomicTypes;
200 llvm::FoldingSet<AttributedType> AttributedTypes;
201 mutable llvm::FoldingSet<PipeType> PipeTypes;
203 mutable llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
204 mutable llvm::FoldingSet<DependentTemplateName> DependentTemplateNames;
205 mutable llvm::FoldingSet<SubstTemplateTemplateParmStorage>
206 SubstTemplateTemplateParms;
209 SubstTemplateTemplateParmPacks;
214 mutable llvm::FoldingSet<NestedNameSpecifier> NestedNameSpecifiers;
220 mutable llvm::DenseMap<const RecordDecl*, const ASTRecordLayout*>
222 mutable llvm::DenseMap<const ObjCContainerDecl*, const ASTRecordLayout*>
226 using TypeInfoMap = llvm::DenseMap<const Type *, struct TypeInfo>;
227 mutable TypeInfoMap MemoizedTypeInfo;
232 using UnadjustedAlignMap = llvm::DenseMap<const Type *, unsigned>;
233 mutable UnadjustedAlignMap MemoizedUnadjustedAlign;
236 llvm::DenseMap<const CXXRecordDecl*, LazyDeclPtr> KeyFunctions;
239 llvm::DenseMap<ObjCContainerDecl*, ObjCImplDecl*> ObjCImpls;
243 llvm::DenseMap<const ObjCMethodDecl*,const ObjCMethodDecl*> ObjCMethodRedecls;
246 llvm::DenseMap<const VarDecl*, Expr*> BlockVarCopyInits;
250 llvm::DenseMap<const FunctionDecl*, FunctionDecl*>
251 ClassScopeSpecializationPattern;
256 llvm::DenseMap<const MaterializeTemporaryExpr *, APValue *>
257 MaterializedTemporaryValues;
261 class CanonicalTemplateTemplateParm :
public llvm::FoldingSetNode {
270 void Profile(llvm::FoldingSetNodeID &
ID) { Profile(ID, Parm); }
272 static void Profile(llvm::FoldingSetNodeID &
ID,
275 mutable llvm::FoldingSet<CanonicalTemplateTemplateParm>
276 CanonTemplateTemplateParms;
292 mutable TypedefDecl *BuiltinMSVaListDecl =
nullptr;
331 mutable RecordDecl *CFConstantStringTagDecl =
nullptr;
332 mutable TypedefDecl *CFConstantStringTypeDecl =
nullptr;
357 mutable RecordDecl *BlockDescriptorType =
nullptr;
363 mutable RecordDecl *BlockDescriptorExtendedType =
nullptr;
372 llvm::DenseMap<const Decl*, AttrVec*> DeclAttrs;
377 llvm::DenseMap<Decl*, Decl*> MergedDecls;
382 llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
388 struct PerModuleInitializers {
394 llvm::DenseMap<Module*, PerModuleInitializers*> ModuleInitializers;
401 llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *>;
439 llvm::DenseMap<const VarDecl *, TemplateOrSpecializationInfo>
440 TemplateOrInstantiation;
465 llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
467 llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
468 InstantiatedFromUsingShadowDecl;
470 llvm::DenseMap<FieldDecl *, FieldDecl *> InstantiatedFromUnnamedFieldDecl;
478 using CXXMethodVector = llvm::TinyPtrVector<const CXXMethodDecl *>;
479 llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector> OverriddenMethods;
484 llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
485 MangleNumberingContexts;
489 llvm::MapVector<const NamedDecl *, unsigned> MangleNumbers;
490 llvm::MapVector<const VarDecl *, unsigned> StaticLocalNumbers;
494 using ParameterIndexTable = llvm::DenseMap<const VarDecl *, unsigned>;
495 ParameterIndexTable ParamIndices;
514 std::unique_ptr<SanitizerBlacklist> SanitizerBL;
518 std::unique_ptr<XRayFunctionFilter> XRayFilter;
524 mutable llvm::BumpPtrAllocator BumpAlloc;
530 std::unique_ptr<CXXABI> ABI;
538 bool AddrSpaceMapMangling;
559 llvm::DenseMap<
const void *,
560 llvm::PointerUnion4<
const Decl *,
const Stmt *,
568 llvm::PointerUnion4<
const Decl *,
const Stmt *,
569 ast_type_traits::DynTypedNode *,
590 const ast_type_traits::DynTypedNode *
begin()
const {
594 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer);
597 const ast_type_traits::DynTypedNode *
end()
const {
601 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer) + 1;
604 size_t size()
const {
return end() - begin(); }
605 bool empty()
const {
return begin() == end(); }
608 assert(N < size() &&
"Out of bounds!");
609 return *(begin() + N);
644 return PrintingPolicy;
648 PrintingPolicy = Policy;
658 void *
Allocate(
size_t Size,
unsigned Align = 8)
const {
659 return BumpAlloc.Allocate(Size, Align);
661 template <
typename T> T *
Allocate(
size_t Num = 1)
const {
662 return static_cast<T *
>(Allocate(Num *
sizeof(T),
alignof(T)));
669 return BumpAlloc.getTotalMemory();
673 size_t getSideTableAllocatedMemory()
const;
676 return DiagAllocator;
686 QualType getIntTypeForBitwidth(
unsigned DestWidth,
687 unsigned Signed)
const;
692 QualType getRealTypeForBitwidth(
unsigned DestWidth)
const;
694 bool AtomicUsesUnsupportedLibcall(
const AtomicExpr *E)
const;
716 mutable bool CommentsLoaded =
false;
744 return Data.getInt();
752 return Data.getPointer();
768 llvm::PointerIntPair<const RawComment *, 2, Kind> Data;
769 const Decl *OriginalDecl;
785 RawComment *getRawCommentForDeclNoCache(
const Decl *D)
const;
793 assert(LangOpts.RetainCommentsFromSystemHeaders ||
804 getRawCommentForAnyRedecl(
const Decl *D,
805 const Decl **OriginalDecl =
nullptr)
const;
821 const Decl *D)
const;
827 class import_iterator {
834 using difference_type = int;
835 using iterator_category = std::forward_iterator_tag;
837 import_iterator() =
default;
838 explicit import_iterator(
ImportDecl *Import) : Import(Import) {}
840 reference
operator*()
const {
return Import; }
841 pointer operator->()
const {
return Import; }
843 import_iterator &operator++() {
844 Import = ASTContext::getNextLocalImport(Import);
848 import_iterator operator++(
int) {
849 import_iterator Other(*
this);
854 friend bool operator==(import_iterator
X, import_iterator Y) {
855 return X.Import == Y.Import;
858 friend bool operator!=(import_iterator X, import_iterator Y) {
859 return X.Import != Y.Import;
865 return CommentCommandTraits;
869 AttrVec& getDeclAttrs(
const Decl *D);
872 void eraseDeclAttrs(
const Decl *D);
882 getTemplateOrSpecializationInfo(
const VarDecl *Var);
886 void setClassScopeSpecializationPattern(
FunctionDecl *FD,
891 void setInstantiatedFromStaticDataMember(
VarDecl *Inst,
VarDecl *Tmpl,
895 void setTemplateOrSpecializationInfo(
VarDecl *Inst,
923 unsigned overridden_methods_size(
const CXXMethodDecl *Method)
const;
926 llvm::iterator_range<overridden_cxx_method_iterator>;
942 void getOverriddenMethods(
948 void addedLocalImportDecl(
ImportDecl *Import);
951 return Import->NextLocalImport;
957 return import_range(import_iterator(FirstLocalImport), import_iterator());
961 Decl *Result = MergedDecls.lookup(D);
962 return Result ? Result : D;
965 MergedDecls[D] = Primary;
971 bool NotifyListeners =
true);
975 void deduplicateMergedDefinitonsFor(
NamedDecl *ND);
980 auto MergedIt = MergedDefModules.find(Def);
981 if (MergedIt == MergedDefModules.end())
983 return MergedIt->second;
990 void addModuleInitializer(
Module *M, Decl *Init);
1024 SatUnsignedLongAccumTy;
1027 SatUnsignedLongFractTy;
1038 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 1039 CanQualType SingletonId; 1040 #include "clang/Basic/OpenCLImageTypes.def" 1069 return ExternalSource.get();
1078 this->Listener = Listener;
1085 void PrintStats()
const;
1093 RecordDecl *buildImplicitRecord(StringRef Name,
1139 bool allowOnPointerType =
false)
const;
1189 QualType getFunctionTypeWithExceptionSpec(
1200 bool AsWritten =
false);
1213 return CanQualType::CreateUnsafe(getPointerType((
QualType) T));
1220 return CanQualType::CreateUnsafe(
1229 return CanQualType::CreateUnsafe(getDecayedType((
QualType) T));
1242 QualType getBlockDescriptorType()
const;
1252 QualType getBlockDescriptorExtendedType()
const;
1258 LangAS getOpenCLTypeAddrSpace(
const Type *T)
const;
1261 cudaConfigureCallDecl = FD;
1265 return cudaConfigureCallDecl;
1276 bool &HasByrefExtendedLayout)
const;
1297 unsigned IndexTypeQuals,
1307 unsigned IndexTypeQuals,
1314 unsigned IndexTypeQuals)
const;
1320 unsigned IndexTypeQuals)
const;
1353 Expr *AddrSpaceExpr,
1367 return getFunctionTypeInternal(ResultTy, Args, EPI,
false);
1376 bool OnlyWantCanonical)
const;
1382 const TypeDecl *PrevDecl =
nullptr)
const {
1383 assert(Decl &&
"Passed null for Decl param");
1384 if (Decl->TypeForDecl)
return QualType(Decl->TypeForDecl, 0);
1387 assert(PrevDecl->TypeForDecl &&
"previous decl has no TypeForDecl");
1388 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1389 return QualType(PrevDecl->TypeForDecl, 0);
1392 return getTypeDeclTypeSlow(Decl);
1412 QualType getSubstTemplateTypeParmPackType(
1417 getTemplateTypeParmType(
unsigned Depth,
unsigned Index,
1442 TagDecl *OwnedTagDecl =
nullptr)
const;
1452 QualType getDependentTemplateSpecializationType(
1473 unsigned NumProtocols)
const;
1478 bool isKindOf)
const;
1489 bool QIdProtocolsAdoptObjCObjectProtocols(
QualType QT,
1508 bool IsDependent)
const;
1511 QualType getAutoDeductType()
const;
1514 QualType getAutoRRefDeductType()
const;
1519 bool IsDependent)
const;
1555 QualType getSignedWCharType()
const;
1560 QualType getUnsignedWCharType()
const;
1576 QualType getPointerDiffType()
const;
1581 QualType getUnsignedPointerDiffType()
const;
1588 QualType getCFConstantStringType()
const;
1597 if (CFConstantStringTypeDecl)
1598 return getTypedefType(CFConstantStringTypeDecl);
1601 void setCFConstantStringType(
QualType T);
1603 RecordDecl *getCFConstantStringTagDecl()
const;
1608 return ObjCConstantStringType;
1612 return ObjCNSStringType;
1616 ObjCNSStringType = T;
1622 if (ObjCIdRedefinitionType.
isNull())
1623 return getObjCIdType();
1624 return ObjCIdRedefinitionType;
1629 ObjCIdRedefinitionType = RedefType;
1635 if (ObjCClassRedefinitionType.
isNull())
1636 return getObjCClassType();
1637 return ObjCClassRedefinitionType;
1642 ObjCClassRedefinitionType = RedefType;
1648 if (ObjCSelRedefinitionType.
isNull())
1649 return getObjCSelType();
1650 return ObjCSelRedefinitionType;
1655 ObjCSelRedefinitionType = RedefType;
1660 if (!NSObjectName) {
1661 NSObjectName = &Idents.
get(
"NSObject");
1664 return NSObjectName;
1669 if (!NSCopyingName) {
1670 NSCopyingName = &Idents.
get(
"NSCopying");
1673 return NSCopyingName;
1677 assert(Target &&
"Expected target to be initialized");
1678 const llvm::Triple &T = Target->
getTriple();
1680 if (T.isOSWindows() && T.isArch64Bit())
1681 return UnsignedLongLongTy;
1682 return UnsignedLongTy;
1686 assert(Target &&
"Expected target to be initialized");
1687 const llvm::Triple &T = Target->
getTriple();
1689 if (T.isOSWindows() && T.isArch64Bit())
1697 BoolName = &Idents.
get(
"bool");
1702 if (!MakeIntegerSeqName)
1703 MakeIntegerSeqName = &Idents.
get(
"__make_integer_seq");
1704 return MakeIntegerSeqName;
1708 if (!TypePackElementName)
1709 TypePackElementName = &Idents.
get(
"__type_pack_element");
1710 return TypePackElementName;
1716 return getTypeDeclType(getObjCInstanceTypeDecl());
1729 return getTypeDeclType(FILEDecl);
1735 this->jmp_bufDecl = jmp_bufDecl;
1741 return getTypeDeclType(jmp_bufDecl);
1747 this->sigjmp_bufDecl = sigjmp_bufDecl;
1753 return getTypeDeclType(sigjmp_bufDecl);
1759 this->ucontext_tDecl = ucontext_tDecl;
1765 return getTypeDeclType(ucontext_tDecl);
1771 return getLangOpts().CPlusPlus ? BoolTy : IntTy;
1778 void getObjCEncodingForType(
QualType T, std::string &S,
1780 QualType *NotEncodedT=
nullptr)
const;
1784 void getObjCEncodingForPropertyType(
QualType T, std::string &S)
const;
1786 void getLegacyIntegralTypeEncoding(
QualType &t)
const;
1790 std::string &S)
const;
1798 std::string getObjCEncodingForFunctionDecl(
const FunctionDecl *Decl)
const;
1802 std::string getObjCEncodingForMethodDecl(
const ObjCMethodDecl *Decl,
1803 bool Extended =
false)
const;
1806 std::string getObjCEncodingForBlock(
const BlockExpr *blockExpr)
const;
1813 const Decl *Container)
const;
1820 const Decl *Container)
const;
1835 return getTypeDeclType(getObjCIdDecl());
1845 return getTypeDeclType(getObjCSelDecl());
1857 return getTypeDeclType(getObjCClassDecl());
1876 return getTypeDeclType(getBOOLDecl());
1881 return getObjCInterfaceType(getObjCProtocolDecl());
1890 return getTypeDeclType(getBuiltinVaListDecl());
1896 Decl *getVaListTagDecl()
const;
1904 return getTypeDeclType(getBuiltinMSVaListDecl());
1909 bool canBuiltinBeRedeclared(
const FunctionDecl *)
const;
1914 return getQualifiedType(T, Qualifiers::fromCVRMask(CVR));
1919 return getQualifiedType(split.
Ty, split.
Quals);
1928 return getExtQualType(Ptr, Qc);
1935 return getExtQualType(T, Qs);
1944 assert(lifetime != Qualifiers::OCL_None);
1948 return getQualifiedType(type, qs);
1962 unsigned char getFixedPointScale(
QualType Ty)
const;
1963 unsigned char getFixedPointIBits(
QualType Ty)
const;
1972 bool TemplateKeyword,
2004 unsigned *IntegerConstantArgs =
nullptr)
const;
2042 const llvm::fltSemantics &getFloatTypeSemantics(
QualType T)
const;
2049 unsigned getOpenMPDefaultSimdAlign(
QualType T)
const;
2057 return getTypeSize(CharTy);
2061 CharUnits toCharUnitsFromBits(int64_t BitSize)
const;
2064 int64_t toBits(
CharUnits CharSize)
const;
2082 return getTypeUnadjustedAlign(T.
getTypePtr());
2084 unsigned getTypeUnadjustedAlign(
const Type *T)
const;
2089 unsigned getTypeAlignIfKnown(
QualType T)
const;
2100 CharUnits getTypeUnadjustedAlignInChars(
const Type *T)
const;
2104 std::pair<CharUnits, CharUnits> getTypeInfoDataSizeInChars(
QualType T)
const;
2106 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
const Type *T)
const;
2107 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
QualType T)
const;
2111 bool isAlignmentRequired(
const Type *T)
const;
2112 bool isAlignmentRequired(
QualType T)
const;
2119 unsigned getPreferredTypeAlign(
const Type *T)
const;
2123 unsigned getTargetDefaultAlignForAttributeAligned()
const;
2127 unsigned getAlignOfGlobalVar(
QualType T)
const;
2156 bool Simple =
false)
const;
2216 void CollectInheritedProtocols(
const Decl *CDecl,
2217 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols);
2221 bool hasUniqueObjectRepresentations(
QualType Ty)
const;
2252 return getCanonicalType(T1) == getCanonicalType(T2);
2255 return getCanonicalType(T1) == getCanonicalType(T2);
2276 return getCanonicalType(T1).getTypePtr() ==
2277 getCanonicalType(T2).getTypePtr();
2281 bool IsParam)
const {
2284 if (SubTnullability.hasValue() == SuperTnullability.hasValue()) {
2286 if (!SubTnullability)
2289 if (*SubTnullability == *SuperTnullability ||
2290 *SubTnullability == NullabilityKind::Unspecified ||
2291 *SuperTnullability == NullabilityKind::Unspecified)
2297 return (*SuperTnullability == NullabilityKind::NonNull &&
2298 *SubTnullability == NullabilityKind::Nullable);
2303 return (*SuperTnullability == NullabilityKind::Nullable &&
2304 *SubTnullability == NullabilityKind::NonNull);
2355 CallingConv getDefaultCallingConvention(
bool IsVariadic,
2356 bool IsCXXMethod)
const;
2396 return dyn_cast_or_null<ConstantArrayType>(getAsArrayType(T));
2399 return dyn_cast_or_null<VariableArrayType>(getAsArrayType(T));
2402 return dyn_cast_or_null<IncompleteArrayType>(getAsArrayType(T));
2406 return dyn_cast_or_null<DependentSizedArrayType>(getAsArrayType(T));
2489 unsigned getTargetAddressSpace(
LangAS AS)
const;
2493 uint64_t getTargetNullPointerValue(
QualType QT)
const;
2501 unsigned getIntegerRank(
const Type *T)
const;
2510 bool CompareUnqualified =
false);
2516 return T == getObjCIdType();
2520 return T == getObjCClassType();
2524 return T == getObjCSelType();
2537 bool canAssignObjCInterfacesInBlockPointer(
2540 bool BlockReturnType);
2548 bool Unqualified =
false,
bool BlockReturnType =
false);
2550 bool Unqualified =
false);
2552 bool OfBlockPointer =
false,
2553 bool Unqualified =
false);
2555 bool OfBlockPointer=
false,
2556 bool Unqualified =
false);
2579 bool mergeExtParameterInfo(
2582 bool &CanUseFirst,
bool &CanUseSecond,
2593 unsigned getIntWidth(
QualType T)
const;
2618 unsigned Width = getIntWidth(Type);
2619 if (Width != Res.getBitWidth())
2620 return Res.extOrTrunc(Width);
2624 bool isSentinelNullExpr(
const Expr *E);
2636 return !ObjCImpls.empty();
2661 void setBlockVarCopyInits(
VarDecl*VD,
Expr* Init);
2684 getTrivialTypeSourceInfo(
QualType T,
2694 void AddDeallocation(
void (*Callback)(
void*),
void *Data);
2698 template <
typename T>
2700 if (!std::is_trivially_destructible<T>::value) {
2701 auto DestroyPtr = [](
void *V) {
static_cast<T *
>(V)->~T(); };
2702 AddDeallocation(DestroyPtr, Ptr);
2715 bool DeclMustBeEmitted(
const Decl *D);
2719 void forEachMultiversionedFunctionVersion(
2726 void addCopyConstructorForExceptionObject(
CXXRecordDecl *RD,
2737 void setManglingNumber(
const NamedDecl *ND,
unsigned Number);
2738 unsigned getManglingNumber(
const NamedDecl *ND)
const;
2740 void setStaticLocalNumber(
const VarDecl *VD,
unsigned Number);
2741 unsigned getStaticLocalNumber(
const VarDecl *VD)
const;
2747 std::unique_ptr<MangleNumberingContext> createMangleNumberingContext()
const;
2751 void setParameterIndex(
const ParmVarDecl *D,
unsigned index);
2755 unsigned getParameterIndex(
const ParmVarDecl *D)
const;
2815 void InitBuiltinTypes(
const TargetInfo &Target,
2822 void getObjCEncodingForTypeImpl(
QualType t, std::string &S,
2823 bool ExpandPointedToStructures,
2824 bool ExpandStructures,
2826 bool OutermostType =
false,
2827 bool EncodingProperty =
false,
2828 bool StructField =
false,
2829 bool EncodeBlockParameters =
false,
2830 bool EncodeClassNames =
false,
2831 bool EncodePointerToObjCTypedef =
false,
2832 QualType *NotEncodedT=
nullptr)
const;
2835 void getObjCEncodingForStructureImpl(
RecordDecl *RD, std::string &S,
2837 bool includeVBases =
true,
2838 QualType *NotEncodedT=
nullptr)
const;
2844 bool Extended)
const;
2848 bool isMSStaticDataMemberInlineDefinition(
const VarDecl *VD)
const;
2870 getInlineVariableDefinitionKind(
const VarDecl *VD)
const;
2895 llvm::PointerIntPair<StoredDeclsMap *, 1> LastSDM;
2897 std::unique_ptr<ParentMapPointers> PointerParents;
2898 std::unique_ptr<ParentMapOtherNodes> OtherParents;
2900 std::unique_ptr<VTableContextBase> VTContext;
2902 void ReleaseDeclContextMaps();
2903 void ReleaseParentMapEntries();
2912 PSF_Invalid = 0x80000000U,
2924 : Decl(Decl), PragmaSectionLocation(PragmaSectionLocation),
2925 SectionFlags(SectionFlags) {}
2977 return C.Allocate(Bytes, Alignment);
3014 size_t Alignment = 8) {
3015 return C.Allocate(Bytes, Alignment);
3029 template <
typename Owner,
typename T,
3038 return new (Ctx)
LazyData(Source, Value);
3042 #endif // LLVM_CLANG_AST_ASTCONTEXT_H static uint64_t getFieldOffset(const ASTContext &C, const FieldDecl *FD)
const IncompleteArrayType * getAsIncompleteArrayType(QualType T) const
CanQualType SatShortAccumTy
void setPrimaryMergedDecl(Decl *D, Decl *Primary)
const Type * Ty
The locally-unqualified type.
Represents 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.
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
Represents 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. ...
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.
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.
Represents a member of a struct/union/class.
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)
CanQualType SatShortFractTy
QualType getVolatileType(QualType T) const
Return the uniqued reference to the type for a volatile qualified type.
CanQualType SatUnsignedShortAccumTy
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.
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
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...
unsigned getTypeUnadjustedAlign(QualType T) const
Return the ABI-specified natural alignment of a (complete) type T, before alignment adjustments...
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/...
CanQualType UnsignedShortFractTy
Exposes information about the current target.
Represents an array type in C++ whose size is a value-dependent expression.
CommentOptions CommentOpts
Options for parsing comments.
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
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.
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
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.
CanQualType SatUnsignedShortFractTy
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.
CanQualType UnsignedShortAccumTy
unsigned[(unsigned) LangAS::FirstTargetAddressSpace] LangASMap
The type of a lookup table which maps from language-specific address spaces to target-specific ones...
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.
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.
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.
This represents a decl that may have 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.
ComparisonCategories CompCategories
Types and expressions required to build C++2a three-way comparisons using operator<=>, including the values return by builtin <=> operators.