15 #ifndef LLVM_CLANG_AST_ASTCONTEXT_H 16 #define LLVM_CLANG_AST_ASTCONTEXT_H 47 #include "llvm/ADT/APSInt.h" 48 #include "llvm/ADT/ArrayRef.h" 49 #include "llvm/ADT/DenseMap.h" 50 #include "llvm/ADT/FoldingSet.h" 51 #include "llvm/ADT/IntrusiveRefCntPtr.h" 52 #include "llvm/ADT/MapVector.h" 53 #include "llvm/ADT/None.h" 54 #include "llvm/ADT/Optional.h" 55 #include "llvm/ADT/PointerIntPair.h" 56 #include "llvm/ADT/PointerUnion.h" 57 #include "llvm/ADT/SmallVector.h" 58 #include "llvm/ADT/StringMap.h" 59 #include "llvm/ADT/StringRef.h" 60 #include "llvm/ADT/TinyPtrVector.h" 61 #include "llvm/ADT/Triple.h" 62 #include "llvm/ADT/iterator_range.h" 63 #include "llvm/Support/AlignOf.h" 64 #include "llvm/Support/Allocator.h" 65 #include "llvm/Support/Casting.h" 66 #include "llvm/Support/Compiler.h" 73 #include <type_traits> 87 class ASTMutationListener;
88 class ASTRecordLayout;
91 class BuiltinTemplateDecl;
94 class CXXConstructorDecl;
97 class DiagnosticsEngine;
99 class FixedPointSemantics;
101 class MangleNumberingContext;
102 class MaterializeTemporaryExpr;
103 class MemberSpecializationInfo;
105 class ObjCCategoryDecl;
106 class ObjCCategoryImplDecl;
107 class ObjCContainerDecl;
109 class ObjCImplementationDecl;
110 class ObjCInterfaceDecl;
112 class ObjCMethodDecl;
113 class ObjCPropertyDecl;
114 class ObjCPropertyImplDecl;
115 class ObjCProtocolDecl;
116 class ObjCTypeParamDecl;
119 class StoredDeclsMap;
121 class TemplateParameterList;
122 class TemplateTemplateParmDecl;
123 class TemplateTypeParmDecl;
124 class UnresolvedSetIterator;
125 class UsingShadowDecl;
126 class VarTemplateDecl;
127 class VTableContextBase;
149 TypeInfo(uint64_t Width,
unsigned Align,
bool AlignIsRequired)
150 : Width(Width), Align(Align), AlignIsRequired(AlignIsRequired) {}
162 : ExprAndFlag(CopyExpr, CanThrow) {}
164 ExprAndFlag.setPointerAndInt(CopyExpr, CanThrow);
167 bool canThrow()
const {
return ExprAndFlag.getInt(); }
175 mutable llvm::FoldingSet<ExtQuals> ExtQualNodes;
176 mutable llvm::FoldingSet<ComplexType> ComplexTypes;
177 mutable llvm::FoldingSet<PointerType> PointerTypes;
178 mutable llvm::FoldingSet<AdjustedType> AdjustedTypes;
179 mutable llvm::FoldingSet<BlockPointerType> BlockPointerTypes;
180 mutable llvm::FoldingSet<LValueReferenceType> LValueReferenceTypes;
181 mutable llvm::FoldingSet<RValueReferenceType> RValueReferenceTypes;
182 mutable llvm::FoldingSet<MemberPointerType> MemberPointerTypes;
183 mutable llvm::FoldingSet<ConstantArrayType> ConstantArrayTypes;
184 mutable llvm::FoldingSet<IncompleteArrayType> IncompleteArrayTypes;
185 mutable std::vector<VariableArrayType*> VariableArrayTypes;
186 mutable llvm::FoldingSet<DependentSizedArrayType> DependentSizedArrayTypes;
187 mutable llvm::FoldingSet<DependentSizedExtVectorType>
188 DependentSizedExtVectorTypes;
189 mutable llvm::FoldingSet<DependentAddressSpaceType>
190 DependentAddressSpaceTypes;
191 mutable llvm::FoldingSet<VectorType> VectorTypes;
192 mutable llvm::FoldingSet<DependentVectorType> DependentVectorTypes;
193 mutable llvm::FoldingSet<FunctionNoProtoType> FunctionNoProtoTypes;
194 mutable llvm::ContextualFoldingSet<FunctionProtoType, ASTContext&>
196 mutable llvm::FoldingSet<DependentTypeOfExprType> DependentTypeOfExprTypes;
197 mutable llvm::FoldingSet<DependentDecltypeType> DependentDecltypeTypes;
198 mutable llvm::FoldingSet<TemplateTypeParmType> TemplateTypeParmTypes;
199 mutable llvm::FoldingSet<ObjCTypeParamType> ObjCTypeParamTypes;
200 mutable llvm::FoldingSet<SubstTemplateTypeParmType>
201 SubstTemplateTypeParmTypes;
202 mutable llvm::FoldingSet<SubstTemplateTypeParmPackType>
203 SubstTemplateTypeParmPackTypes;
204 mutable llvm::ContextualFoldingSet<TemplateSpecializationType, ASTContext&>
205 TemplateSpecializationTypes;
206 mutable llvm::FoldingSet<ParenType> ParenTypes;
207 mutable llvm::FoldingSet<ElaboratedType> ElaboratedTypes;
208 mutable llvm::FoldingSet<DependentNameType> DependentNameTypes;
211 DependentTemplateSpecializationTypes;
212 llvm::FoldingSet<PackExpansionType> PackExpansionTypes;
213 mutable llvm::FoldingSet<ObjCObjectTypeImpl> ObjCObjectTypes;
214 mutable llvm::FoldingSet<ObjCObjectPointerType> ObjCObjectPointerTypes;
215 mutable llvm::FoldingSet<DependentUnaryTransformType>
216 DependentUnaryTransformTypes;
217 mutable llvm::FoldingSet<AutoType> AutoTypes;
218 mutable llvm::FoldingSet<DeducedTemplateSpecializationType>
219 DeducedTemplateSpecializationTypes;
220 mutable llvm::FoldingSet<AtomicType> AtomicTypes;
221 llvm::FoldingSet<AttributedType> AttributedTypes;
222 mutable llvm::FoldingSet<PipeType> PipeTypes;
224 mutable llvm::FoldingSet<QualifiedTemplateName> QualifiedTemplateNames;
225 mutable llvm::FoldingSet<DependentTemplateName> DependentTemplateNames;
226 mutable llvm::FoldingSet<SubstTemplateTemplateParmStorage>
227 SubstTemplateTemplateParms;
230 SubstTemplateTemplateParmPacks;
235 mutable llvm::FoldingSet<NestedNameSpecifier> NestedNameSpecifiers;
241 mutable llvm::DenseMap<const RecordDecl*, const ASTRecordLayout*>
243 mutable llvm::DenseMap<const ObjCContainerDecl*, const ASTRecordLayout*>
247 using TypeInfoMap = llvm::DenseMap<const Type *, struct TypeInfo>;
248 mutable TypeInfoMap MemoizedTypeInfo;
253 using UnadjustedAlignMap = llvm::DenseMap<const Type *, unsigned>;
254 mutable UnadjustedAlignMap MemoizedUnadjustedAlign;
257 llvm::DenseMap<const CXXRecordDecl*, LazyDeclPtr> KeyFunctions;
260 llvm::DenseMap<ObjCContainerDecl*, ObjCImplDecl*> ObjCImpls;
264 llvm::DenseMap<const ObjCMethodDecl*,const ObjCMethodDecl*> ObjCMethodRedecls;
267 llvm::DenseMap<const VarDecl *, BlockVarCopyInit> BlockVarCopyInits;
271 llvm::DenseMap<const FunctionDecl*, FunctionDecl*>
272 ClassScopeSpecializationPattern;
277 llvm::DenseMap<const MaterializeTemporaryExpr *, APValue *>
278 MaterializedTemporaryValues;
282 class CanonicalTemplateTemplateParm :
public llvm::FoldingSetNode {
291 void Profile(llvm::FoldingSetNodeID &
ID) { Profile(ID, Parm); }
293 static void Profile(llvm::FoldingSetNodeID &
ID,
296 mutable llvm::FoldingSet<CanonicalTemplateTemplateParm>
297 CanonTemplateTemplateParms;
313 mutable TypedefDecl *BuiltinMSVaListDecl =
nullptr;
352 mutable RecordDecl *CFConstantStringTagDecl =
nullptr;
353 mutable TypedefDecl *CFConstantStringTypeDecl =
nullptr;
378 mutable RecordDecl *BlockDescriptorType =
nullptr;
384 mutable RecordDecl *BlockDescriptorExtendedType =
nullptr;
393 llvm::DenseMap<const Decl*, AttrVec*> DeclAttrs;
398 llvm::DenseMap<Decl*, Decl*> MergedDecls;
403 llvm::DenseMap<NamedDecl*, llvm::TinyPtrVector<Module*>> MergedDefModules;
409 struct PerModuleInitializers {
415 llvm::DenseMap<Module*, PerModuleInitializers*> ModuleInitializers;
422 llvm::PointerUnion<VarTemplateDecl *, MemberSpecializationInfo *>;
460 llvm::DenseMap<const VarDecl *, TemplateOrSpecializationInfo>
461 TemplateOrInstantiation;
486 llvm::DenseMap<NamedDecl *, NamedDecl *> InstantiatedFromUsingDecl;
488 llvm::DenseMap<UsingShadowDecl*, UsingShadowDecl*>
489 InstantiatedFromUsingShadowDecl;
491 llvm::DenseMap<FieldDecl *, FieldDecl *> InstantiatedFromUnnamedFieldDecl;
499 using CXXMethodVector = llvm::TinyPtrVector<const CXXMethodDecl *>;
500 llvm::DenseMap<const CXXMethodDecl *, CXXMethodVector> OverriddenMethods;
505 llvm::DenseMap<const DeclContext *, std::unique_ptr<MangleNumberingContext>>
506 MangleNumberingContexts;
510 llvm::MapVector<const NamedDecl *, unsigned> MangleNumbers;
511 llvm::MapVector<const VarDecl *, unsigned> StaticLocalNumbers;
515 using ParameterIndexTable = llvm::DenseMap<const VarDecl *, unsigned>;
516 ParameterIndexTable ParamIndices;
535 std::unique_ptr<SanitizerBlacklist> SanitizerBL;
539 std::unique_ptr<XRayFunctionFilter> XRayFilter;
545 mutable llvm::BumpPtrAllocator BumpAlloc;
551 std::unique_ptr<CXXABI> ABI;
559 bool AddrSpaceMapMangling;
591 const ast_type_traits::DynTypedNode *
begin()
const {
595 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer);
598 const ast_type_traits::DynTypedNode *
end()
const {
602 return reinterpret_cast<const DynTypedNode *
>(Storage.buffer) + 1;
605 size_t size()
const {
return end() - begin(); }
606 bool empty()
const {
return begin() == end(); }
609 assert(N < size() &&
"Out of bounds!");
610 return *(begin() + N);
622 void setTraversalScope(
const std::vector<Decl *> &);
655 return PrintingPolicy;
659 PrintingPolicy = Policy;
669 void *
Allocate(
size_t Size,
unsigned Align = 8)
const {
670 return BumpAlloc.Allocate(Size, Align);
672 template <
typename T> T *
Allocate(
size_t Num = 1)
const {
673 return static_cast<T *
>(Allocate(Num *
sizeof(T),
alignof(T)));
680 return BumpAlloc.getTotalMemory();
684 size_t getSideTableAllocatedMemory()
const;
687 return DiagAllocator;
697 QualType getIntTypeForBitwidth(
unsigned DestWidth,
698 unsigned Signed)
const;
703 QualType getRealTypeForBitwidth(
unsigned DestWidth)
const;
705 bool AtomicUsesUnsupportedLibcall(
const AtomicExpr *E)
const;
727 mutable bool CommentsLoaded =
false;
755 return Data.getInt();
763 return Data.getPointer();
779 llvm::PointerIntPair<const RawComment *, 2, Kind> Data;
780 const Decl *OriginalDecl;
804 assert(LangOpts.RetainCommentsFromSystemHeaders ||
815 getRawCommentForAnyRedecl(
const Decl *D,
816 const Decl **OriginalDecl =
nullptr)
const;
832 const Decl *D)
const;
838 class import_iterator {
845 using difference_type = int;
846 using iterator_category = std::forward_iterator_tag;
848 import_iterator() =
default;
849 explicit import_iterator(
ImportDecl *Import) : Import(Import) {}
851 reference
operator*()
const {
return Import; }
852 pointer operator->()
const {
return Import; }
854 import_iterator &operator++() {
855 Import = ASTContext::getNextLocalImport(Import);
859 import_iterator operator++(
int) {
860 import_iterator Other(*
this);
865 friend bool operator==(import_iterator
X, import_iterator Y) {
866 return X.Import == Y.Import;
869 friend bool operator!=(import_iterator X, import_iterator Y) {
870 return X.Import != Y.Import;
876 return CommentCommandTraits;
883 void eraseDeclAttrs(
const Decl *D);
893 getTemplateOrSpecializationInfo(
const VarDecl *Var);
897 void setClassScopeSpecializationPattern(
FunctionDecl *FD,
902 void setInstantiatedFromStaticDataMember(
VarDecl *Inst,
VarDecl *Tmpl,
906 void setTemplateOrSpecializationInfo(
VarDecl *Inst,
934 unsigned overridden_methods_size(
const CXXMethodDecl *Method)
const;
937 llvm::iterator_range<overridden_cxx_method_iterator>;
953 void getOverriddenMethods(
959 void addedLocalImportDecl(
ImportDecl *Import);
962 return Import->NextLocalImport;
968 return import_range(import_iterator(FirstLocalImport), import_iterator());
972 Decl *Result = MergedDecls.lookup(D);
973 return Result ? Result : D;
976 MergedDecls[D] = Primary;
982 bool NotifyListeners =
true);
986 void deduplicateMergedDefinitonsFor(
NamedDecl *ND);
993 if (MergedIt == MergedDefModules.end())
995 return MergedIt->second;
1002 void addModuleInitializer(
Module *M,
Decl *Init);
1036 SatUnsignedLongAccumTy;
1039 SatUnsignedLongFractTy;
1050 #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ 1051 CanQualType SingletonId; 1052 #include "clang/Basic/OpenCLImageTypes.def" 1056 #define EXT_OPAQUE_TYPE(ExtType, Id, Ext) \ 1058 #include "clang/Basic/OpenCLExtensionTypes.def" 1084 return ExternalSource.get();
1093 this->Listener = Listener;
1100 void PrintStats()
const;
1108 RecordDecl *buildImplicitRecord(StringRef Name,
1154 bool allowOnPointerType =
false)
const;
1204 QualType getFunctionTypeWithExceptionSpec(
1215 bool AsWritten =
false);
1228 return CanQualType::CreateUnsafe(getPointerType((
QualType) T));
1235 return CanQualType::CreateUnsafe(
1244 return CanQualType::CreateUnsafe(getDecayedType((
QualType) T));
1257 QualType getBlockDescriptorType()
const;
1267 QualType getBlockDescriptorExtendedType()
const;
1273 LangAS getOpenCLTypeAddrSpace(
const Type *T)
const;
1276 cudaConfigureCallDecl = FD;
1280 return cudaConfigureCallDecl;
1291 bool &HasByrefExtendedLayout)
const;
1312 unsigned IndexTypeQuals,
1322 unsigned IndexTypeQuals,
1329 unsigned IndexTypeQuals)
const;
1335 unsigned IndexTypeQuals)
const;
1368 Expr *AddrSpaceExpr,
1382 return getFunctionTypeInternal(ResultTy, Args, EPI,
false);
1391 bool OnlyWantCanonical)
const;
1397 const TypeDecl *PrevDecl =
nullptr)
const {
1398 assert(Decl &&
"Passed null for Decl param");
1399 if (Decl->TypeForDecl)
return QualType(Decl->TypeForDecl, 0);
1402 assert(PrevDecl->TypeForDecl &&
"previous decl has no TypeForDecl");
1403 Decl->TypeForDecl = PrevDecl->TypeForDecl;
1404 return QualType(PrevDecl->TypeForDecl, 0);
1407 return getTypeDeclTypeSlow(Decl);
1427 QualType getSubstTemplateTypeParmPackType(
1432 getTemplateTypeParmType(
unsigned Depth,
unsigned Index,
1457 TagDecl *OwnedTagDecl =
nullptr)
const;
1467 QualType getDependentTemplateSpecializationType(
1488 unsigned NumProtocols)
const;
1493 bool isKindOf)
const;
1504 bool QIdProtocolsAdoptObjCObjectProtocols(
QualType QT,
1523 bool IsDependent)
const;
1526 QualType getAutoDeductType()
const;
1529 QualType getAutoRRefDeductType()
const;
1534 bool IsDependent)
const;
1570 QualType getSignedWCharType()
const;
1575 QualType getUnsignedWCharType()
const;
1591 QualType getPointerDiffType()
const;
1596 QualType getUnsignedPointerDiffType()
const;
1603 QualType getCFConstantStringType()
const;
1612 if (CFConstantStringTypeDecl)
1613 return getTypedefType(CFConstantStringTypeDecl);
1616 void setCFConstantStringType(
QualType T);
1618 RecordDecl *getCFConstantStringTagDecl()
const;
1623 return ObjCConstantStringType;
1627 return ObjCNSStringType;
1631 ObjCNSStringType = T;
1637 if (ObjCIdRedefinitionType.
isNull())
1638 return getObjCIdType();
1639 return ObjCIdRedefinitionType;
1644 ObjCIdRedefinitionType = RedefType;
1650 if (ObjCClassRedefinitionType.
isNull())
1651 return getObjCClassType();
1652 return ObjCClassRedefinitionType;
1657 ObjCClassRedefinitionType = RedefType;
1663 if (ObjCSelRedefinitionType.
isNull())
1664 return getObjCSelType();
1665 return ObjCSelRedefinitionType;
1670 ObjCSelRedefinitionType = RedefType;
1675 if (!NSObjectName) {
1676 NSObjectName = &Idents.
get(
"NSObject");
1679 return NSObjectName;
1684 if (!NSCopyingName) {
1685 NSCopyingName = &Idents.
get(
"NSCopying");
1688 return NSCopyingName;
1692 assert(Target &&
"Expected target to be initialized");
1693 const llvm::Triple &T = Target->
getTriple();
1695 if (T.isOSWindows() && T.isArch64Bit())
1696 return UnsignedLongLongTy;
1697 return UnsignedLongTy;
1701 assert(Target &&
"Expected target to be initialized");
1702 const llvm::Triple &T = Target->
getTriple();
1704 if (T.isOSWindows() && T.isArch64Bit())
1712 BoolName = &Idents.
get(
"bool");
1717 if (!MakeIntegerSeqName)
1718 MakeIntegerSeqName = &Idents.
get(
"__make_integer_seq");
1719 return MakeIntegerSeqName;
1723 if (!TypePackElementName)
1724 TypePackElementName = &Idents.
get(
"__type_pack_element");
1725 return TypePackElementName;
1731 return getTypeDeclType(getObjCInstanceTypeDecl());
1744 return getTypeDeclType(FILEDecl);
1750 this->jmp_bufDecl = jmp_bufDecl;
1756 return getTypeDeclType(jmp_bufDecl);
1762 this->sigjmp_bufDecl = sigjmp_bufDecl;
1768 return getTypeDeclType(sigjmp_bufDecl);
1774 this->ucontext_tDecl = ucontext_tDecl;
1780 return getTypeDeclType(ucontext_tDecl);
1786 return getLangOpts().CPlusPlus ? BoolTy : IntTy;
1793 void getObjCEncodingForType(
QualType T, std::string &S,
1795 QualType *NotEncodedT=
nullptr)
const;
1799 void getObjCEncodingForPropertyType(
QualType T, std::string &S)
const;
1801 void getLegacyIntegralTypeEncoding(
QualType &t)
const;
1805 std::string &S)
const;
1813 std::string getObjCEncodingForFunctionDecl(
const FunctionDecl *Decl)
const;
1817 std::string getObjCEncodingForMethodDecl(
const ObjCMethodDecl *Decl,
1818 bool Extended =
false)
const;
1828 const Decl *Container)
const;
1835 const Decl *Container)
const;
1850 return getTypeDeclType(getObjCIdDecl());
1860 return getTypeDeclType(getObjCSelDecl());
1872 return getTypeDeclType(getObjCClassDecl());
1891 return getTypeDeclType(getBOOLDecl());
1896 return getObjCInterfaceType(getObjCProtocolDecl());
1905 return getTypeDeclType(getBuiltinVaListDecl());
1911 Decl *getVaListTagDecl()
const;
1919 return getTypeDeclType(getBuiltinMSVaListDecl());
1924 bool canBuiltinBeRedeclared(
const FunctionDecl *)
const;
1929 return getQualifiedType(T, Qualifiers::fromCVRMask(CVR));
1934 return getQualifiedType(split.
Ty, split.
Quals);
1943 return getExtQualType(Ptr, Qc);
1950 return getExtQualType(T, Qs);
1959 assert(lifetime != Qualifiers::OCL_None);
1963 return getQualifiedType(type, qs);
1977 unsigned char getFixedPointScale(
QualType Ty)
const;
1978 unsigned char getFixedPointIBits(
QualType Ty)
const;
1990 bool TemplateKeyword,
2022 unsigned *IntegerConstantArgs =
nullptr)
const;
2060 const llvm::fltSemantics &getFloatTypeSemantics(
QualType T)
const;
2067 unsigned getOpenMPDefaultSimdAlign(
QualType T)
const;
2075 return getTypeSize(CharTy);
2079 CharUnits toCharUnitsFromBits(int64_t BitSize)
const;
2082 int64_t toBits(
CharUnits CharSize)
const;
2100 return getTypeUnadjustedAlign(T.
getTypePtr());
2102 unsigned getTypeUnadjustedAlign(
const Type *T)
const;
2107 unsigned getTypeAlignIfKnown(
QualType T)
const;
2118 CharUnits getTypeUnadjustedAlignInChars(
const Type *T)
const;
2122 std::pair<CharUnits, CharUnits> getTypeInfoDataSizeInChars(
QualType T)
const;
2124 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
const Type *T)
const;
2125 std::pair<CharUnits, CharUnits> getTypeInfoInChars(
QualType T)
const;
2129 bool isAlignmentRequired(
const Type *T)
const;
2130 bool isAlignmentRequired(
QualType T)
const;
2137 unsigned getPreferredTypeAlign(
const Type *T)
const;
2141 unsigned getTargetDefaultAlignForAttributeAligned()
const;
2145 unsigned getAlignOfGlobalVar(
QualType T)
const;
2174 bool Simple =
false)
const;
2234 void CollectInheritedProtocols(
const Decl *CDecl,
2235 llvm::SmallPtrSet<ObjCProtocolDecl*, 8> &Protocols);
2239 bool hasUniqueObjectRepresentations(
QualType Ty)
const;
2270 return getCanonicalType(T1) == getCanonicalType(T2);
2273 return getCanonicalType(T1) == getCanonicalType(T2);
2294 return getCanonicalType(T1).getTypePtr() ==
2295 getCanonicalType(T2).getTypePtr();
2299 bool IsParam)
const {
2302 if (SubTnullability.hasValue() == SuperTnullability.hasValue()) {
2304 if (!SubTnullability)
2307 if (*SubTnullability == *SuperTnullability ||
2308 *SubTnullability == NullabilityKind::Unspecified ||
2309 *SuperTnullability == NullabilityKind::Unspecified)
2315 return (*SuperTnullability == NullabilityKind::NonNull &&
2316 *SubTnullability == NullabilityKind::Nullable);
2321 return (*SuperTnullability == NullabilityKind::Nullable &&
2322 *SubTnullability == NullabilityKind::NonNull);
2373 CallingConv getDefaultCallingConvention(
bool IsVariadic,
2374 bool IsCXXMethod)
const;
2414 return dyn_cast_or_null<ConstantArrayType>(getAsArrayType(T));
2417 return dyn_cast_or_null<VariableArrayType>(getAsArrayType(T));
2420 return dyn_cast_or_null<IncompleteArrayType>(getAsArrayType(T));
2424 return dyn_cast_or_null<DependentSizedArrayType>(getAsArrayType(T));
2507 unsigned getTargetAddressSpace(
LangAS AS)
const;
2509 LangAS getLangASForBuiltinAddressSpace(
unsigned AS)
const;
2513 uint64_t getTargetNullPointerValue(
QualType QT)
const;
2521 unsigned getIntegerRank(
const Type *T)
const;
2530 bool CompareUnqualified =
false);
2536 return T == getObjCIdType();
2540 return T == getObjCClassType();
2544 return T == getObjCSelType();
2557 bool canAssignObjCInterfacesInBlockPointer(
2560 bool BlockReturnType);
2568 bool Unqualified =
false,
bool BlockReturnType =
false);
2570 bool Unqualified =
false);
2572 bool OfBlockPointer =
false,
2573 bool Unqualified =
false);
2575 bool OfBlockPointer=
false,
2576 bool Unqualified =
false);
2599 bool mergeExtParameterInfo(
2602 bool &CanUseFirst,
bool &CanUseSecond,
2613 unsigned getIntWidth(
QualType T)
const;
2638 unsigned Width = getIntWidth(Type);
2639 if (Width != Res.getBitWidth())
2640 return Res.extOrTrunc(Width);
2644 bool isSentinelNullExpr(
const Expr *E);
2656 return !ObjCImpls.empty();
2705 getTrivialTypeSourceInfo(
QualType T,
2715 void AddDeallocation(
void (*Callback)(
void*),
void *Data);
2719 template <
typename T>
2721 if (!std::is_trivially_destructible<T>::value) {
2722 auto DestroyPtr = [](
void *V) {
static_cast<T *
>(V)->~T(); };
2723 AddDeallocation(DestroyPtr, Ptr);
2736 bool DeclMustBeEmitted(
const Decl *D);
2740 void forEachMultiversionedFunctionVersion(
2747 void addCopyConstructorForExceptionObject(
CXXRecordDecl *RD,
2758 void setManglingNumber(
const NamedDecl *ND,
unsigned Number);
2759 unsigned getManglingNumber(
const NamedDecl *ND)
const;
2761 void setStaticLocalNumber(
const VarDecl *VD,
unsigned Number);
2762 unsigned getStaticLocalNumber(
const VarDecl *VD)
const;
2768 std::unique_ptr<MangleNumberingContext> createMangleNumberingContext()
const;
2772 void setParameterIndex(
const ParmVarDecl *D,
unsigned index);
2776 unsigned getParameterIndex(
const ParmVarDecl *D)
const;
2836 void InitBuiltinTypes(
const TargetInfo &Target,
2843 void getObjCEncodingForTypeImpl(
QualType t, std::string &S,
2844 bool ExpandPointedToStructures,
2845 bool ExpandStructures,
2847 bool OutermostType =
false,
2848 bool EncodingProperty =
false,
2849 bool StructField =
false,
2850 bool EncodeBlockParameters =
false,
2851 bool EncodeClassNames =
false,
2852 bool EncodePointerToObjCTypedef =
false,
2853 QualType *NotEncodedT=
nullptr)
const;
2856 void getObjCEncodingForStructureImpl(
RecordDecl *RD, std::string &S,
2858 bool includeVBases =
true,
2859 QualType *NotEncodedT=
nullptr)
const;
2865 bool Extended)
const;
2869 bool isMSStaticDataMemberInlineDefinition(
const VarDecl *VD)
const;
2891 getInlineVariableDefinitionKind(
const VarDecl *VD)
const;
2916 llvm::PointerIntPair<StoredDeclsMap *, 1> LastSDM;
2918 std::vector<Decl *> TraversalScope;
2920 std::unique_ptr<ParentMap> Parents;
2922 std::unique_ptr<VTableContextBase> VTContext;
2924 void ReleaseDeclContextMaps();
2933 PSF_Invalid = 0x80000000U,
2945 : Decl(Decl), PragmaSectionLocation(PragmaSectionLocation),
2946 SectionFlags(SectionFlags) {}
2997 size_t Alignment ) {
2998 return C.Allocate(Bytes, Alignment);
3035 size_t Alignment ) {
3036 return C.Allocate(Bytes, Alignment);
3050 template <
typename Owner,
typename T,
3059 return new (Ctx)
LazyData(Source, Value);
3063 #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.
FunctionType - C99 6.7.5.3 - Function Declarators.
const llvm::Triple & getTriple() const
Returns the target triple of the primary target.
The fixed point semantics work similarly to llvm::fltSemantics.
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. ...
const internal::VariadicDynCastAllOfMatcher< Stmt, BlockExpr > blockExpr
Matches a reference to a block.
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 (within the traversal scope).
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.
Defines the clang::attr::Kind enum.
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...
BlockVarCopyInit(Expr *CopyExpr, bool CanThrow)
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
Expr * getCopyExpr() 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
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
llvm::iterator_range< overridden_cxx_method_iterator > overridden_method_range
The APFixedPoint class works similarly to APInt/APSInt in that it is a functional replacement for a s...
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
IdentifierInfo * getNSObjectName() const
Retrieve the identifier 'NSObject'.
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 ...
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
static bool CanThrow(Expr *E, ASTContext &Ctx)
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.
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'.
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
void setExprAndFlag(Expr *CopyExpr, bool CanThrow)
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.
std::vector< Decl * > getTraversalScope() const
CanQualType SatUnsignedShortFractTy
bool hasSameUnqualifiedType(QualType T1, QualType T2) const
Determine whether the given types are equivalent after cvr-qualifiers have been removed.
llvm::PointerIntPair< Expr *, 1, bool > ExprAndFlag
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.
Copy initialization expr of a __block variable and a boolean flag that indicates whether the expressi...
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.
Holds information about the various types of exception specification.
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)
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...
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.