15#ifndef LLVM_CLANG_AST_DECLCXX_H
16#define LLVM_CLANG_AST_DECLCXX_H
37#include "llvm/ADT/ArrayRef.h"
38#include "llvm/ADT/DenseMap.h"
39#include "llvm/ADT/PointerIntPair.h"
40#include "llvm/ADT/PointerUnion.h"
41#include "llvm/ADT/STLExtras.h"
42#include "llvm/ADT/TinyPtrVector.h"
43#include "llvm/ADT/iterator_range.h"
44#include "llvm/Support/Casting.h"
45#include "llvm/Support/Compiler.h"
46#include "llvm/Support/PointerLikeTypeTraits.h"
47#include "llvm/Support/TrailingObjects.h"
57class ClassTemplateDecl;
58class ConstructorUsingShadowDecl;
61class CXXConstructorDecl;
62class CXXDestructorDecl;
63class CXXFinalOverriderMap;
64class CXXIndirectPrimaryBaseSet;
66class DecompositionDecl;
68class FunctionTemplateDecl;
70class MemberSpecializationInfo;
73class TemplateParameterList;
92 :
Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) {
98 virtual void anchor();
157 LLVM_PREFERRED_TYPE(
bool)
158 unsigned Virtual : 1;
164 LLVM_PREFERRED_TYPE(
bool)
165 unsigned BaseOfClass : 1;
176 LLVM_PREFERRED_TYPE(
bool)
177 unsigned InheritConstructors : 1;
189 :
Range(R), EllipsisLoc(EllipsisLoc), Virtual(
V), BaseOfClass(BC),
190 Access(A), InheritConstructors(
false), BaseTypeInfo(TInfo) {}
217 InheritConstructors = Inherit;
274 enum SpecialMemberFlags {
275 SMF_DefaultConstructor = 0x1,
276 SMF_CopyConstructor = 0x2,
277 SMF_MoveConstructor = 0x4,
278 SMF_CopyAssignment = 0x8,
279 SMF_MoveAssignment = 0x10,
280 SMF_Destructor = 0x20,
292 struct DefinitionData {
293 #define FIELD(Name, Width, Merge) \
294 unsigned Name : Width;
295 #include "CXXRecordDeclDefinitionBits.def"
298 LLVM_PREFERRED_TYPE(
bool)
299 unsigned IsLambda : 1;
302 LLVM_PREFERRED_TYPE(
bool)
303 unsigned IsParsingBaseSpecifiers : 1;
307 LLVM_PREFERRED_TYPE(
bool)
308 unsigned ComputedVisibleConversions : 1;
310 LLVM_PREFERRED_TYPE(
bool)
311 unsigned HasODRHash : 1;
314 unsigned ODRHash = 0;
317 unsigned NumBases = 0;
320 unsigned NumVBases = 0;
334 LazyASTUnresolvedSet Conversions;
341 LazyASTUnresolvedSet VisibleConversions;
344 CXXRecordDecl *Definition;
352 DefinitionData(CXXRecordDecl *
D);
355 CXXBaseSpecifier *getBases()
const {
356 if (!Bases.isOffset())
357 return Bases.get(
nullptr);
358 return getBasesSlowCase();
362 CXXBaseSpecifier *getVBases()
const {
363 if (!VBases.isOffset())
364 return VBases.get(
nullptr);
365 return getVBasesSlowCase();
368 ArrayRef<CXXBaseSpecifier> bases()
const {
372 ArrayRef<CXXBaseSpecifier> vbases()
const {
377 CXXBaseSpecifier *getBasesSlowCase()
const;
378 CXXBaseSpecifier *getVBasesSlowCase()
const;
381 struct DefinitionData *DefinitionData;
384 struct LambdaDefinitionData :
public DefinitionData {
396 unsigned DependencyKind : 2;
399 LLVM_PREFERRED_TYPE(
bool)
400 unsigned IsGenericLambda : 1;
404 unsigned CaptureDefault : 2;
407 unsigned NumCaptures : 15;
410 unsigned NumExplicitCaptures : 12;
413 LLVM_PREFERRED_TYPE(
bool)
414 unsigned HasKnownInternalLinkage : 1;
418 unsigned ManglingNumber : 31;
422 unsigned IndexInContext;
434 llvm::TinyPtrVector<Capture*> Captures;
437 TypeSourceInfo *MethodTyInfo;
439 LambdaDefinitionData(CXXRecordDecl *
D, TypeSourceInfo *Info,
unsigned DK,
441 : DefinitionData(
D), DependencyKind(DK), IsGenericLambda(IsGeneric),
442 CaptureDefault(CaptureDefault), NumCaptures(0),
443 NumExplicitCaptures(0), HasKnownInternalLinkage(0), ManglingNumber(0),
444 IndexInContext(0), MethodTyInfo(Info) {
450 PlainOldData =
false;
454 void AddCaptureList(ASTContext &Ctx, Capture *CaptureList);
457 struct DefinitionData *dataPtr()
const {
460 return DefinitionData;
463 struct DefinitionData &data()
const {
464 auto *DD = dataPtr();
465 assert(DD &&
"queried property of class with no definition");
469 struct LambdaDefinitionData &getLambdaData()
const {
472 auto *DD = DefinitionData;
473 assert(DD && DD->IsLambda &&
"queried lambda property of non-lambda class");
474 return static_cast<LambdaDefinitionData&
>(*DD);
486 llvm::PointerUnion<ClassTemplateDecl *, MemberSpecializationInfo *>
487 TemplateOrInstantiation;
491 void addedClassSubobject(CXXRecordDecl *
Base);
498 void addedMember(Decl *
D);
500 void markedVirtualFunctionPure();
504 FriendDecl *getFirstFriend()
const;
509 bool hasSubobjectAtOffsetZeroOfEmptyBaseType(ASTContext &Ctx,
510 const CXXRecordDecl *
X);
514 SourceLocation StartLoc, SourceLocation IdLoc,
515 IdentifierInfo *
Id, CXXRecordDecl *PrevDecl);
533 return cast_or_null<CXXRecordDecl>(
542 return cast<CXXRecordDecl>(
568 auto *DD = DefinitionData ? DefinitionData : dataPtr();
569 return DD ? DD->Definition :
nullptr;
578 bool DelayTypeCreation =
false);
581 unsigned DependencyKind,
bool IsGeneric,
587 return data().Polymorphic || data().NumVBases != 0;
605 return data().IsParsingBaseSpecifiers;
618 llvm::iterator_range<base_class_const_iterator>;
660 llvm::iterator_range<specific_decl_iterator<CXXMethodDecl>>;
680 llvm::iterator_range<specific_decl_iterator<CXXConstructorDecl>>;
694 class friend_iterator;
704 return data().FirstFriend.isValid();
711 (data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
712 "this property has not yet been computed by Sema");
713 return data().DefaultedCopyConstructorIsDeleted;
720 (data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
721 "this property has not yet been computed by Sema");
722 return data().DefaultedMoveConstructorIsDeleted;
728 (data().DeclaredSpecialMembers & SMF_Destructor)) &&
729 "this property has not yet been computed by Sema");
730 return data().DefaultedDestructorIsDeleted;
737 !data().DefaultedCopyConstructorIsDeleted;
744 !data().DefaultedMoveConstructorIsDeleted;
751 !data().DefaultedCopyAssignmentIsDeleted;
758 !data().DefaultedMoveAssignmentIsDeleted;
765 !data().DefaultedDestructorIsDeleted;
770 return (data().DeclaredSpecialMembers & SMF_DefaultConstructor) ||
779 return (!data().UserDeclaredConstructor &&
780 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor) &&
785 (data().HasInheritedDefaultConstructor &&
786 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor));
793 return data().UserDeclaredConstructor;
799 return data().UserProvidedDefaultConstructor;
806 return data().UserDeclaredSpecialMembers & SMF_CopyConstructor;
812 return !(data().DeclaredSpecialMembers & SMF_CopyConstructor);
824 if (data().UserDeclaredSpecialMembers &
825 (SMF_MoveConstructor | SMF_MoveAssignment))
827 return data().NeedOverloadResolutionForCopyConstructor;
833 return data().ImplicitCopyConstructorCanHaveConstParamForNonVBase &&
835 data().ImplicitCopyConstructorCanHaveConstParamForVBase);
841 return data().HasDeclaredCopyConstructorWithConstParam ||
852 return data().UserDeclaredSpecialMembers &
853 (SMF_MoveConstructor | SMF_MoveAssignment);
859 return data().UserDeclaredSpecialMembers & SMF_MoveConstructor;
864 return (data().DeclaredSpecialMembers & SMF_MoveConstructor) ||
871 assert((data().DefaultedCopyConstructorIsDeleted ||
873 "Copy constructor should not be deleted");
874 data().DefaultedCopyConstructorIsDeleted =
true;
880 assert((data().DefaultedMoveConstructorIsDeleted ||
882 "move constructor should not be deleted");
883 data().DefaultedMoveConstructorIsDeleted =
true;
889 assert((data().DefaultedDestructorIsDeleted ||
891 "destructor should not be deleted");
892 data().DefaultedDestructorIsDeleted =
true;
899 data().DefaultedDestructorIsConstexpr = data().NumVBases == 0;
905 return !(data().DeclaredSpecialMembers & SMF_MoveConstructor) &&
915 return data().NeedOverloadResolutionForMoveConstructor;
923 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
929 assert((data().DefaultedCopyAssignmentIsDeleted ||
931 "copy assignment should not be deleted");
932 data().DefaultedCopyAssignmentIsDeleted =
true;
938 return !(data().DeclaredSpecialMembers & SMF_CopyAssignment);
950 if (data().UserDeclaredSpecialMembers &
951 (SMF_MoveConstructor | SMF_MoveAssignment))
953 return data().NeedOverloadResolutionForCopyAssignment;
959 return data().ImplicitCopyAssignmentHasConstParam;
966 return data().HasDeclaredCopyAssignmentWithConstParam ||
974 return data().UserDeclaredSpecialMembers & SMF_MoveAssignment;
979 return (data().DeclaredSpecialMembers & SMF_MoveAssignment) ||
986 assert((data().DefaultedMoveAssignmentIsDeleted ||
988 "move assignment should not be deleted");
989 data().DefaultedMoveAssignmentIsDeleted =
true;
996 return !(data().DeclaredSpecialMembers & SMF_MoveAssignment) &&
1007 return data().NeedOverloadResolutionForMoveAssignment;
1014 return data().UserDeclaredSpecialMembers & SMF_Destructor;
1020 return !(data().DeclaredSpecialMembers & SMF_Destructor);
1026 return data().NeedOverloadResolutionForDestructor;
1032 auto *DD = DefinitionData;
1033 return DD && DD->IsLambda;
1115 LambdaDefinitionData &LambdaData = getLambdaData();
1116 return LambdaData.Captures.empty() ? nullptr : LambdaData.Captures.front();
1148 llvm::iterator_range<conversion_iterator>
1172 data().HasUninitializedReferenceMember;
1183 bool isPOD()
const {
return data().PlainOldData; }
1204 return data().HasPrivateFields;
1208 return data().HasProtectedFields;
1214 return D.HasPublicFields ||
D.HasProtectedFields ||
D.HasPrivateFields;
1254 (data().HasTrivialSpecialMembers & SMF_DefaultConstructor);
1260 return (data().DeclaredNonTrivialSpecialMembers & SMF_DefaultConstructor) ||
1262 !(data().HasTrivialSpecialMembers & SMF_DefaultConstructor));
1268 return data().HasConstexprNonCopyMoveConstructor ||
1276 return data().DefaultedDefaultConstructorIsConstexpr &&
1283 return data().HasConstexprDefaultConstructor ||
1291 return data().HasTrivialSpecialMembers & SMF_CopyConstructor;
1295 return data().HasTrivialSpecialMembersForCall & SMF_CopyConstructor;
1301 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyConstructor ||
1306 return (data().DeclaredNonTrivialSpecialMembersForCall &
1307 SMF_CopyConstructor) ||
1315 (data().HasTrivialSpecialMembers & SMF_MoveConstructor);
1320 (data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor);
1326 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveConstructor) ||
1328 !(data().HasTrivialSpecialMembers & SMF_MoveConstructor));
1332 return (data().DeclaredNonTrivialSpecialMembersForCall &
1333 SMF_MoveConstructor) ||
1335 !(data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor));
1341 return data().HasTrivialSpecialMembers & SMF_CopyAssignment;
1347 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyAssignment ||
1355 (data().HasTrivialSpecialMembers & SMF_MoveAssignment);
1361 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveAssignment) ||
1363 !(data().HasTrivialSpecialMembers & SMF_MoveAssignment));
1369 return data().DefaultedDestructorIsConstexpr &&
1379 return data().HasTrivialSpecialMembers & SMF_Destructor;
1383 return data().HasTrivialSpecialMembersForCall & SMF_Destructor;
1389 return !(data().HasTrivialSpecialMembers & SMF_Destructor);
1393 return !(data().HasTrivialSpecialMembersForCall & SMF_Destructor);
1397 data().HasTrivialSpecialMembersForCall =
1398 (SMF_CopyConstructor | SMF_MoveConstructor | SMF_Destructor);
1404 return !data().HasUninitializedFields ||
1405 !(data().HasDefaultedDefaultConstructor ||
1415 return data().HasIrrelevantDestructor;
1421 return data().HasNonLiteralTypeFieldsOrBases;
1427 return data().HasInheritedConstructor;
1433 return data().HasInheritedAssignment;
1471 return isLiteral() && data().StructuralIfLiteral;
1565 return RD->isLocalClass();
1682 bool LookupInDependent =
false)
const;
1727 std::vector<const NamedDecl *>
1729 llvm::function_ref<
bool(
const NamedDecl *ND)> Filter);
1740 assert(DeclAccess !=
AS_none);
1742 return (PathAccess > DeclAccess ? PathAccess : DeclAccess);
1783 assert(
isLambda() &&
"Not a lambda closure type!");
1784 return getLambdaData().ManglingNumber;
1790 assert(
isLambda() &&
"Not a lambda closure type!");
1791 return getLambdaData().HasKnownInternalLinkage;
1808 assert(
isLambda() &&
"Not a lambda closure type!");
1809 return getLambdaData().IndexInContext;
1874 return getLambdaData().DependencyKind;
1878 return getLambdaData().MethodTyInfo;
1882 assert(DefinitionData && DefinitionData->IsLambda &&
1883 "setting lambda property of non-lambda class");
1884 auto &DL =
static_cast<LambdaDefinitionData &
>(*DefinitionData);
1885 DL.MethodTyInfo = TS;
1889 getLambdaData().DependencyKind =
Kind;
1893 assert(DefinitionData && DefinitionData->IsLambda &&
1894 "setting lambda property of non-lambda class");
1895 auto &DL =
static_cast<LambdaDefinitionData &
>(*DefinitionData);
1896 DL.IsGenericLambda = IsGeneric;
1905 return K >= firstCXXRecord && K <= lastCXXRecord;
1913 llvm::PointerIntPair<Expr *, 2, ExplicitSpecKind> ExplicitSpec{
1927 ExplicitSpec.getPointer();
1943 !ExplicitSpec.getPointer();
1968 void anchor()
override;
1976 Expr *TrailingRequiresClause)
1977 :
FunctionDecl(CXXDeductionGuide,
C, DC, StartLoc, NameInfo,
T, TInfo,
1979 TrailingRequiresClause),
1980 Ctor(Ctor), ExplicitSpec(ES) {
2000 Expr *TrailingRequiresClause =
nullptr);
2049 :
Decl(RequiresExprBody, DC, StartLoc),
DeclContext(RequiresExprBody) {}
2079 void anchor()
override;
2087 Expr *TrailingRequiresClause =
nullptr)
2089 isInline, ConstexprKind, TrailingRequiresClause) {
2100 Expr *TrailingRequiresClause =
nullptr);
2126 return OOK == OO_New || OOK == OO_Array_New || OOK == OO_Delete ||
2127 OOK == OO_Array_Delete;
2152 bool IsAppleKext)
const {
2182 return cast<CXXMethodDecl>(
2198 llvm::TinyPtrVector<const CXXMethodDecl *>::const_iterator>;
2276 bool MayBeBase =
false);
2280 bool MayBeBase =
false)
const {
2288 bool MayBeBase =
false);
2291 bool MayBeBase =
false)
const {
2299 return K >= firstCXXMethod && K <= lastCXXMethod;
2322 llvm::PointerUnion<TypeSourceInfo *, FieldDecl *, IndirectFieldDecl *>
2345 LLVM_PREFERRED_TYPE(
bool)
2346 unsigned IsDelegating : 1;
2350 LLVM_PREFERRED_TYPE(
bool)
2351 unsigned IsVirtual : 1;
2355 LLVM_PREFERRED_TYPE(
bool)
2356 unsigned IsWritten : 1;
2360 unsigned SourceOrder : 13;
2391 return isa<TypeSourceInfo *>(Initializee) && !IsDelegating;
2403 return isa<IndirectFieldDecl *>(Initializee);
2413 return Init->getStmtClass() == Stmt::CXXDefaultInitExprClass;
2419 return isa<TypeSourceInfo *>(Initializee) && IsDelegating;
2431 return MemberOrEllipsisLocation;
2460 return cast<FieldDecl *>(Initializee);
2466 return cast<FieldDecl *>(Initializee);
2468 return cast<IndirectFieldDecl *>(Initializee)->getAnonField();
2474 return cast<IndirectFieldDecl *>(Initializee);
2479 return MemberOrEllipsisLocation;
2495 return IsWritten ?
static_cast<int>(SourceOrder) : -1;
2506 assert(!IsWritten &&
2507 "setSourceOrder() used on implicit initializer");
2508 assert(SourceOrder == 0 &&
2509 "calling twice setSourceOrder() on the same initializer");
2511 "setSourceOrder() used to make an initializer implicit");
2513 SourceOrder =
static_cast<unsigned>(Pos);
2532 : Shadow(Shadow), BaseCtor(BaseCtor) {}
2534 explicit operator bool()
const {
return Shadow; }
2552 private llvm::TrailingObjects<CXXConstructorDecl, InheritedConstructor,
2553 ExplicitSpecifier> {
2568 Expr *TrailingRequiresClause);
2570 void anchor()
override;
2572 size_t numTrailingObjects(OverloadToken<InheritedConstructor>)
const {
2575 size_t numTrailingObjects(OverloadToken<ExplicitSpecifier>)
const {
2581 return *getTrailingObjects<ExplicitSpecifier>();
2588 enum TrailingAllocKind {
2589 TAKInheritsConstructor = 1,
2590 TAKHasTailExplicit = 1 << 1,
2593 uint64_t getTrailingAllocKind()
const {
2594 return numTrailingObjects(OverloadToken<InheritedConstructor>()) |
2595 (numTrailingObjects(OverloadToken<ExplicitSpecifier>()) << 1);
2604 uint64_t AllocKind);
2611 Expr *TrailingRequiresClause =
nullptr);
2616 "cannot set this explicit specifier. no trail-allocated space for "
2650 const auto *ConstThis =
this;
2669 std::reverse_iterator<init_const_iterator>;
2697 numCtorInitializers &&
"NumCtorInitializers overflow!");
2701 CtorInitializers = Initializers;
2737 unsigned TypeQuals = 0;
2751 unsigned TypeQuals = 0;
2824 Expr *OperatorDeleteThisArg =
nullptr;
2830 Expr *TrailingRequiresClause =
nullptr)
2837 void anchor()
override;
2843 bool UsesFPIntrin,
bool isInline,
bool isImplicitlyDeclared,
2845 Expr *TrailingRequiresClause =
nullptr);
2886 Expr *TrailingRequiresClause =
nullptr)
2889 EndLocation, TrailingRequiresClause),
2891 void anchor()
override;
2904 Expr *TrailingRequiresClause =
nullptr);
2953 virtual void anchor();
3056 :
NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc),
3057 NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc),
3058 NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) {}
3068 void anchor()
override;
3088 return NominatedNamespace;
3161 NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc),
3162 QualifierLoc(QualifierLoc), Namespace(Namespace) {}
3164 void anchor()
override;
3211 if (
auto *AD = dyn_cast<NamespaceAliasDecl>(Namespace))
3212 return AD->getNamespace();
3214 return cast<NamespaceDecl>(Namespace);
3247 public Mergeable<LifetimeExtendedTemporaryDecl> {
3251 Stmt *ExprWithTemporary =
nullptr;
3256 unsigned ManglingNumber;
3260 virtual void anchor();
3265 ExprWithTemporary(Temp), ExtendingDecl(EDecl),
3266 ManglingNumber(Mangling) {}
3269 :
Decl(
Decl::LifetimeExtendedTemporary, EmptyShell{}) {}
3273 unsigned Mangling) {
3315 return K == Decl::LifetimeExtendedTemporary;
3348 void anchor()
override;
3360 UsingShadowDecl *getMostRecentDeclImpl()
override {
3407 assert(ND &&
"Target decl is null!");
3423 return dyn_cast_or_null<UsingShadowDecl>(UsingOrNextShadow);
3428 return K == Decl::UsingShadow || K == Decl::ConstructorUsingShadow;
3441 llvm::PointerIntPair<UsingShadowDecl *, 1, bool> FirstUsingShadow;
3448 void anchor()
override;
3481 Current = Current->getNextUsingShadowDecl();
3492 return x.Current == y.Current;
3495 return x.Current != y.Current;
3545 UsingLocation(UL), QualifierLoc(QualifierLoc),
3550 void anchor()
override;
3588 bool HasTypenameKeyword);
3631 LLVM_PREFERRED_TYPE(
bool)
3632 unsigned IsVirtual : 1;
3636 bool TargetInVirtualBase)
3638 Using->getDeclName(), Using,
3639 Target->getUnderlyingDecl()),
3640 NominatedBaseClassShadowDecl(
3641 dyn_cast<ConstructorUsingShadowDecl>(
Target)),
3642 ConstructedBaseClassShadowDecl(NominatedBaseClassShadowDecl),
3643 IsVirtual(TargetInVirtualBase) {
3647 if (NominatedBaseClassShadowDecl &&
3648 NominatedBaseClassShadowDecl->constructsVirtualBase()) {
3649 ConstructedBaseClassShadowDecl =
3650 NominatedBaseClassShadowDecl->ConstructedBaseClassShadowDecl;
3658 void anchor()
override;
3692 return NominatedBaseClassShadowDecl;
3698 return ConstructedBaseClassShadowDecl;
3708 return cast<CXXRecordDecl>((ConstructedBaseClassShadowDecl
3709 ? ConstructedBaseClassShadowDecl
3741 :
BaseUsingDecl(UsingEnum, DC, NL, DN), UsingLocation(UL), EnumLocation(EL),
3744 void anchor()
override;
3762 return ETL.getQualifierLoc();
3812 private llvm::TrailingObjects<UsingPackDecl, NamedDecl *> {
3818 unsigned NumExpansions;
3823 InstantiatedFrom ? InstantiatedFrom->getLocation()
3825 InstantiatedFrom ? InstantiatedFrom->getDeclName()
3827 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3828 std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3829 getTrailingObjects<NamedDecl *>());
3832 void anchor()
override;
3847 return llvm::ArrayRef(getTrailingObjects<NamedDecl *>(), NumExpansions);
3855 unsigned NumExpansions);
3858 return InstantiatedFrom->getSourceRange();
3880 public Mergeable<UnresolvedUsingValueDecl> {
3901 UsingLocation(UsingLoc), EllipsisLoc(EllipsisLoc),
3902 QualifierLoc(QualifierLoc), DNLoc(NameInfo.
getInfo()) {}
3904 void anchor()
override;
3977 public Mergeable<UnresolvedUsingTypenameDecl> {
3995 :
TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName,
3997 TypenameLocation(TypenameLoc), EllipsisLoc(EllipsisLoc),
3998 QualifierLoc(QualifierLoc) {}
4000 void anchor()
override;
4062 void anchor()
override;
4077 llvm::PointerIntPair<Expr *, 1, bool> AssertExprAndFailed;
4084 :
Decl(StaticAssert, DC, StaticAssertLoc),
4085 AssertExprAndFailed(AssertExpr, Failed), Message(Message),
4086 RParenLoc(RParenLoc) {}
4088 virtual void anchor();
4105 bool isFailed()
const {
return AssertExprAndFailed.getInt(); }
4132 Expr *Binding =
nullptr;
4137 void anchor()
override;
4164 this->Binding = Binding;
4184 private llvm::TrailingObjects<DecompositionDecl, BindingDecl *> {
4186 unsigned NumBindings;
4192 :
VarDecl(Decomposition,
C, DC, StartLoc, LSquareLoc,
nullptr,
T, TInfo,
4196 getTrailingObjects<BindingDecl *>());
4198 B->setDecomposedDecl(
this);
4201 void anchor()
override;
4214 unsigned NumBindings);
4217 return llvm::ArrayRef(getTrailingObjects<BindingDecl *>(), NumBindings);
4260 GetterId(Getter), SetterId(Setter) {}
4262 void anchor()
override;
4307 public llvm::FoldingSetNode {
4319 void anchor()
override;
4345 ID.AddInteger(
P.Part1);
4346 ID.AddInteger(
P.Part2);
4347 ID.AddInteger(
P.Part3);
4348 ID.AddInteger(
P.getPart4And5AsUint64());
4363 public Mergeable<UnnamedGlobalConstantDecl>,
4364 public llvm::FoldingSetNode {
4369 void anchor()
override;
4407const StreamingDiagnostic &
operator<<(
const StreamingDiagnostic &DB,
const LambdaCapture * Capture
enum clang::sema::@1718::IndirectLocalPathEntry::EntryKind Kind
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified.
Defines the LambdaCapture class.
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Defines the clang::LangOptions interface.
llvm::MachO::Target Target
Defines an enumeration for C++ overloaded operators.
Defines the clang::SourceLocation class and associated facilities.
Defines various enumerations that describe declaration and type specifiers.
Defines the clang::TypeLoc interface and its subclasses.
C Language Family Type Representation.
const NestedNameSpecifier * Specifier
__DEVICE__ void * memcpy(void *__a, const void *__b, size_t __c)
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat],...
void Profile(llvm::FoldingSetNodeID &ID) const
profile this value.
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Reads an AST files chain containing the contents of a translation unit.
An object for streaming information to a record.
Writes an AST file containing the contents of a translation unit.
Represents an access specifier followed by colon ':'.
static AccessSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
SourceLocation getAccessSpecifierLoc() const
The location of the access specifier.
void setAccessSpecifierLoc(SourceLocation ASLoc)
Sets the location of the access specifier.
void setColonLoc(SourceLocation CLoc)
Sets the location of the colon.
Iterates through the using shadow declarations associated with this using declaration.
shadow_iterator()=default
reference operator*() const
pointer operator->() const
shadow_iterator & operator++()
std::forward_iterator_tag iterator_category
shadow_iterator(UsingShadowDecl *C)
friend bool operator==(shadow_iterator x, shadow_iterator y)
shadow_iterator operator++(int)
friend bool operator!=(shadow_iterator x, shadow_iterator y)
std::ptrdiff_t difference_type
Represents a C++ declaration that introduces decls from somewhere else.
llvm::iterator_range< shadow_iterator > shadow_range
bool getShadowFlag() const
A bool flag for use by a derived type.
unsigned shadow_size() const
Return the number of shadowed declarations associated with this using declaration.
void addShadowDecl(UsingShadowDecl *S)
shadow_range shadows() const
shadow_iterator shadow_end() const
static bool classofKind(Kind K)
BaseUsingDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
shadow_iterator shadow_begin() const
void setShadowFlag(bool V)
A bool flag a derived type may set.
void removeShadowDecl(UsingShadowDecl *S)
static bool classof(const Decl *D)
A binding in a decomposition declaration.
VarDecl * getHoldingVar() const
Get the variable (if any) that holds the value of evaluating the binding.
ValueDecl * getDecomposedDecl() const
Get the decomposition declaration that this binding represents a decomposition of.
Expr * getBinding() const
Get the expression to which this declaration is bound.
static bool classof(const Decl *D)
void setBinding(QualType DeclaredType, Expr *Binding)
Set the binding for this BindingDecl, along with its declared type (which should be a possibly-cv-qua...
void setDecomposedDecl(ValueDecl *Decomposed)
Set the decomposed variable for this BindingDecl.
static BindingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classofKind(Kind K)
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
Represents a base class of a C++ class.
void setInheritConstructors(bool Inherit=true)
Set that this base class's constructors should be inherited.
SourceLocation getBeginLoc() const LLVM_READONLY
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
QualType getType() const
Retrieves the type of the base class.
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
CXXBaseSpecifier()=default
bool getInheritConstructors() const
Determine whether this base class's constructors get inherited.
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
SourceLocation getBaseTypeLoc() const LLVM_READONLY
Get the location at which the base class type was written.
SourceLocation getEndLoc() const LLVM_READONLY
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs.
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
Represents a C++ constructor within a class.
init_const_iterator init_end() const
Retrieve an iterator past the last initializer.
init_iterator init_end()
Retrieve an iterator past the last initializer.
std::reverse_iterator< init_iterator > init_reverse_iterator
std::reverse_iterator< init_const_iterator > init_const_reverse_iterator
init_reverse_iterator init_rbegin()
CXXConstructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setInheritingConstructor(bool isIC=true)
State that this is an implicit constructor synthesized to model a call to a constructor inherited fro...
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
ExplicitSpecifier getExplicitSpecifier()
init_iterator init_begin()
Retrieve an iterator to the first initializer.
CXXConstructorDecl * getTargetConstructor() const
When this constructor delegates to another, retrieve the target.
static bool classofKind(Kind K)
static CXXConstructorDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, uint64_t AllocKind)
bool isDefaultConstructor() const
Whether this constructor is a default constructor (C++ [class.ctor]p5), which can be used to default-...
bool isDelegatingConstructor() const
Determine whether this constructor is a delegating constructor.
bool isSpecializationCopyingObject() const
Determine whether this is a member template specialization that would copy the object to itself.
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
bool isMoveConstructor() const
Determine whether this constructor is a move constructor (C++11 [class.copy]p3), which can be used to...
init_const_reverse_iterator init_rbegin() const
void setNumCtorInitializers(unsigned numCtorInitializers)
void setExplicitSpecifier(ExplicitSpecifier ES)
init_const_range inits() const
bool isCopyOrMoveConstructor() const
Determine whether this a copy or move constructor.
init_const_reverse_iterator init_rend() const
bool isInheritingConstructor() const
Determine whether this is an implicit constructor synthesized to model a call to a constructor inheri...
init_reverse_iterator init_rend()
llvm::iterator_range< init_iterator > init_range
CXXCtorInitializer *const * init_const_iterator
Iterates through the member/base initializer list.
const ExplicitSpecifier getExplicitSpecifier() const
unsigned getNumCtorInitializers() const
Determine the number of arguments used to initialize the member or base.
llvm::iterator_range< init_const_iterator > init_const_range
bool isConvertingConstructor(bool AllowExplicit) const
Whether this constructor is a converting constructor (C++ [class.conv.ctor]), which can be used for u...
const CXXConstructorDecl * getCanonicalDecl() const
static bool classof(const Decl *D)
void setCtorInitializers(CXXCtorInitializer **Initializers)
bool isCopyConstructor() const
Whether this constructor is a copy constructor (C++ [class.copy]p2, which can be used to copy the cla...
Represents a C++ conversion function within a class.
bool isLambdaToBlockPointerConversion() const
Determine whether this conversion function is a conversion from a lambda closure type to a block poin...
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
ExplicitSpecifier getExplicitSpecifier()
QualType getConversionType() const
Returns the type that this conversion function is converting to.
void setExplicitSpecifier(ExplicitSpecifier ES)
static CXXConversionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const CXXConversionDecl * getCanonicalDecl() const
CXXConversionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
const ExplicitSpecifier getExplicitSpecifier() const
Represents a C++ base or member initializer.
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
Expr * getInit() const
Get the initializer.
SourceLocation getRParenLoc() const
SourceLocation getEllipsisLoc() const
SourceLocation getLParenLoc() const
SourceRange getSourceRange() const LLVM_READONLY
Determine the source range covering the entire initializer.
int getSourceOrder() const
Return the source position of the initializer, counting from 0.
SourceLocation getSourceLocation() const
Determine the source location of the initializer.
bool isAnyMemberInitializer() const
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
void setSourceOrder(int Pos)
Set the source order of this initializer.
bool isIndirectMemberInitializer() const
int64_t getID(const ASTContext &Context) const
bool isInClassMemberInitializer() const
Determine whether this initializer is an implicit initializer generated for a field with an initializ...
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
SourceLocation getMemberLocation() const
FieldDecl * getAnyMember() const
IndirectFieldDecl * getIndirectMember() const
TypeLoc getBaseClassLoc() const
If this is a base class initializer, returns the type of the base class with location information.
bool isBaseVirtual() const
Returns whether the base is virtual or not.
Represents a C++ deduction guide declaration.
void setDeductionCandidateKind(DeductionCandidate K)
static CXXDeductionGuideDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool isExplicit() const
Return true if the declaration is already resolved to be explicit.
CXXConstructorDecl * getCorrespondingConstructor() const
Get the constructor from which this deduction guide was generated, if this is an implicit deduction g...
ExplicitSpecifier getExplicitSpecifier()
static bool classofKind(Kind K)
TemplateDecl * getDeducedTemplate() const
Get the template for which this guide performs deduction.
DeductionCandidate getDeductionCandidateKind() const
const ExplicitSpecifier getExplicitSpecifier() const
static bool classof(const Decl *D)
Represents a C++ destructor within a class.
const FunctionDecl * getOperatorDelete() const
static CXXDestructorDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const CXXDestructorDecl * getCanonicalDecl() const
CXXDestructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static bool classofKind(Kind K)
void setOperatorDelete(FunctionDecl *OD, Expr *ThisArg)
Expr * getOperatorDeleteThisArg() const
static bool classof(const Decl *D)
A mapping from each virtual member function to its set of final overriders.
A set of all the primary bases for a class.
Represents a static or instance method of a struct/union/class.
bool isExplicitObjectMemberFunction() const
[C++2b][dcl.fct]/p7 An explicit object member function is a non-static member function with an explic...
static bool classofKind(Kind K)
CXXMethodDecl(Kind DK, ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool UsesFPIntrin, bool isInline, ConstexprSpecKind ConstexprKind, SourceLocation EndLocation, Expr *TrailingRequiresClause=nullptr)
const CXXMethodDecl * getMostRecentDecl() const
CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find if RD declares a function that overrides this function, and if so, return it.
bool isImplicitObjectMemberFunction() const
[C++2b][dcl.fct]/p7 An implicit object member function is a non-static member function without an exp...
void addOverriddenMethod(const CXXMethodDecl *MD)
bool hasInlineBody() const
const CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext) const
bool isUsualDeallocationFunction(SmallVectorImpl< const FunctionDecl * > &PreventedBy) const
Determine whether this is a usual deallocation function (C++ [basic.stc.dynamic.deallocation]p2),...
unsigned getNumExplicitParams() const
CXXMethodDecl * getMostRecentDecl()
overridden_method_range overridden_methods() const
unsigned size_overridden_methods() const
const CXXMethodDecl *const * method_iterator
QualType getFunctionObjectParameterReferenceType() const
Return the type of the object pointed by this.
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this method.
method_iterator begin_overridden_methods() const
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined.
QualType getThisType() const
Return the type of the this pointer.
bool isMoveAssignmentOperator() const
Determine whether this is a move assignment operator.
Qualifiers getMethodQualifiers() const
CXXRecordDecl * getParent()
Return the parent of this method declaration, which is the class in which this method is defined.
QualType getFunctionObjectParameterType() const
const CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext)
If it's possible to devirtualize a call to this method, return the called function.
static bool isStaticOverloadedOperator(OverloadedOperatorKind OOK)
Returns true if the given operator is implicitly static in a record context.
CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find the method in RD that corresponds to this one.
llvm::iterator_range< llvm::TinyPtrVector< const CXXMethodDecl * >::const_iterator > overridden_method_range
static bool classof(const Decl *D)
const CXXMethodDecl * getCanonicalDecl() const
bool isCopyAssignmentOperator() const
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitl...
static CXXMethodDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
method_iterator end_overridden_methods() const
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool isLambdaStaticInvoker() const
Determine whether this is a lambda closure type's static member function that is used for the result ...
const CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
An iterator over the friend declarations of a class.
Represents a C++ struct/union/class.
ctor_iterator ctor_end() const
bool hasCopyConstructorWithConstParam() const
Determine whether this class has a copy constructor with a parameter type which is a reference to a c...
bool hasConstexprDefaultConstructor() const
Determine whether this class has a constexpr default constructor.
bool hasMoveConstructor() const
Determine whether this class has a move constructor.
bool hasDefaultConstructor() const
Determine whether this class has any default constructors.
friend_range friends() const
friend_iterator friend_begin() const
bool hasMutableFields() const
Determine whether this class, or any of its class subobjects, contains a mutable field.
bool isHLSLIntangible() const
Returns true if the class contains HLSL intangible type, either as a field or in base class.
Decl * getLambdaContextDecl() const
Retrieve the declaration that provides additional context for a lambda, when the normal declaration c...
ctor_iterator ctor_begin() const
bool mayBeAbstract() const
Determine whether this class may end up being abstract, even though it is not yet known to be abstrac...
bool hasTrivialMoveAssignment() const
Determine whether this class has a trivial move assignment operator (C++11 [class....
void setLambdaTypeInfo(TypeSourceInfo *TS)
bool isTriviallyCopyable() const
Determine whether this class is considered trivially copyable per (C++11 [class]p6).
bool hasNonTrivialCopyAssignment() const
Determine whether this class has a non-trivial copy assignment operator (C++ [class....
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
bool isEffectivelyFinal() const
Determine whether it's impossible for a class to be derived from this class.
bool hasSimpleMoveConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous move constructor that ...
bool isAggregate() const
Determine whether this class is an aggregate (C++ [dcl.init.aggr]), which is a class with no user-dec...
void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet &Bases) const
Get the indirect primary bases for this class.
bool hasTrivialDefaultConstructor() const
Determine whether this class has a trivial default constructor (C++11 [class.ctor]p5).
void setBases(CXXBaseSpecifier const *const *Bases, unsigned NumBases)
Sets the base classes of this struct or class.
bool isGenericLambda() const
Determine whether this class describes a generic lambda function object (i.e.
base_class_iterator bases_end()
llvm::iterator_range< friend_iterator > friend_range
CXXRecordDecl * getMostRecentDecl()
bool hasPrivateFields() const
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
bool hasUserDeclaredDestructor() const
Determine whether this class has a user-declared destructor.
unsigned getLambdaDependencyKind() const
void setLambdaIsGeneric(bool IsGeneric)
specific_decl_iterator< CXXConstructorDecl > ctor_iterator
Iterator access to constructor members.
bool implicitCopyConstructorHasConstParam() const
Determine whether an implicit copy constructor for this type would have a parameter with a const-qual...
bool defaultedDestructorIsDeleted() const
true if a defaulted destructor for this class would be deleted.
const FunctionDecl * isLocalClass() const
If the class is a local class [class.local], returns the enclosing function declaration.
bool hasInheritedAssignment() const
Determine whether this class has a using-declaration that names a base class assignment operator.
bool hasUninitializedReferenceMember() const
Whether this class or any of its subobjects has any members of reference type which would make value-...
bool allowConstDefaultInit() const
Determine whether declaring a const variable with this type is ok per core issue 253.
CXXRecordDecl * getInstantiatedFromMemberClass() const
If this record is an instantiation of a member class, retrieves the member class from which it was in...
bool hasTrivialDestructorForCall() const
bool defaultedMoveConstructorIsDeleted() const
true if a defaulted move constructor for this class would be deleted.
void completeDefinition() override
Indicates that the definition of this class is now complete.
base_class_const_iterator bases_end() const
bool isLiteral() const
Determine whether this class is a literal type.
bool hasUserDeclaredMoveAssignment() const
Determine whether this class has had a move assignment declared by the user.
CXXRecordDecl * getTemplateInstantiationPattern()
bool defaultedDestructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
bool mayBeNonDynamicClass() const
bool isStandardLayout() const
Determine whether this class is standard-layout per C++ [class]p7.
void setCaptures(ASTContext &Context, ArrayRef< LambdaCapture > Captures)
Set the captures for this lambda closure type.
void pushFriendDecl(FriendDecl *FD)
unsigned getDeviceLambdaManglingNumber() const
Retrieve the device side mangling number.
llvm::iterator_range< capture_const_iterator > capture_const_range
bool hasKnownLambdaInternalLinkage() const
The lambda is known to has internal linkage no matter whether it has name mangling number.
specific_decl_iterator< CXXMethodDecl > method_iterator
Iterator access to method members.
bool hasProtectedFields() const
bool hasAnyDependentBases() const
Determine whether this class has any dependent base classes which are not the current instantiation.
unsigned getLambdaIndexInContext() const
Retrieve the index of this lambda within the context declaration returned by getLambdaContextDecl().
void setTrivialForCallFlags(CXXMethodDecl *MD)
const CXXRecordDecl * getPreviousDecl() const
bool isLambda() const
Determine whether this class describes a lambda function object.
bool hasTrivialMoveConstructor() const
Determine whether this class has a trivial move constructor (C++11 [class.copy]p12)
bool needsImplicitDefaultConstructor() const
Determine if we need to declare a default constructor for this class.
void viewInheritance(ASTContext &Context) const
Renders and displays an inheritance diagram for this C++ class and all of its base classes (transitiv...
bool needsImplicitMoveConstructor() const
Determine whether this class should get an implicit move constructor or if any existing special membe...
bool hasUserDeclaredCopyAssignment() const
Determine whether this class has a user-declared copy assignment operator.
capture_const_iterator captures_end() const
bool isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is provably not derived from the type Base.
void addedSelectedDestructor(CXXDestructorDecl *DD)
Notify the class that this destructor is now selected.
unsigned getLambdaManglingNumber() const
If this is the closure type of a lambda expression, retrieve the number to be used for name mangling ...
bool isNeverDependentLambda() const
bool hasFriends() const
Determines whether this record has any friends.
method_range methods() const
static bool classof(const Decl *D)
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
CXXRecordDecl * getDefinition() const
bool needsOverloadResolutionForCopyAssignment() const
Determine whether we need to eagerly declare a defaulted copy assignment operator for this class.
static AccessSpecifier MergeAccess(AccessSpecifier PathAccess, AccessSpecifier DeclAccess)
Calculates the access of a decl that is reached along a path.
bool isParsingBaseSpecifiers() const
void getCaptureFields(llvm::DenseMap< const ValueDecl *, FieldDecl * > &Captures, FieldDecl *&ThisCapture) const
For a closure type, retrieve the mapping from captured variables and this to the non-static data memb...
bool hasConstexprNonCopyMoveConstructor() const
Determine whether this class has at least one constexpr constructor other than the copy or move const...
static CXXRecordDecl * CreateLambda(const ASTContext &C, DeclContext *DC, TypeSourceInfo *Info, SourceLocation Loc, unsigned DependencyKind, bool IsGeneric, LambdaCaptureDefault CaptureDefault)
llvm::iterator_range< conversion_iterator > getVisibleConversionFunctions() const
Get all conversion functions visible in current class, including conversion function templates.
bool defaultedDefaultConstructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
bool hasTrivialCopyConstructor() const
Determine whether this class has a trivial copy constructor (C++ [class.copy]p6, C++11 [class....
void setImplicitMoveAssignmentIsDeleted()
Set that we attempted to declare an implicit move assignment operator, but overload resolution failed...
bool hasConstexprDestructor() const
Determine whether this class has a constexpr destructor.
bool isPolymorphic() const
Whether this class is polymorphic (C++ [class.virtual]), which means that the class contains or inher...
unsigned getNumBases() const
Retrieves the number of base classes of this class.
bool hasNonLiteralTypeFieldsOrBases() const
Determine whether this class has a non-literal or/ volatile type non-static data member or base class...
base_class_const_range bases() const
bool defaultedCopyConstructorIsDeleted() const
true if a defaulted copy constructor for this class would be deleted.
CXXRecordDecl * getMostRecentNonInjectedDecl()
bool isStructural() const
Determine whether this is a structural type.
bool hasMoveAssignment() const
Determine whether this class has a move assignment operator.
bool isTriviallyCopyConstructible() const
Determine whether this class is considered trivially copyable per.
bool hasTrivialCopyConstructorForCall() const
bool isCapturelessLambda() const
llvm::iterator_range< specific_decl_iterator< CXXMethodDecl > > method_range
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
bool hasInitMethod() const
bool lookupInBases(BaseMatchesCallback BaseMatches, CXXBasePaths &Paths, bool LookupInDependent=false) const
Look for entities within the base classes of this C++ class, transitively searching all base class su...
method_iterator method_begin() const
Method begin iterator.
bool lambdaIsDefaultConstructibleAndAssignable() const
Determine whether this lambda should have an implicit default constructor and copy and move assignmen...
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine whether this particular class is a specialization or instantiation of a class template or m...
base_class_iterator bases_begin()
FunctionTemplateDecl * getDependentLambdaCallOperator() const
Retrieve the dependent lambda call operator of the closure type if this is a templated closure type.
bool hasTrivialCopyAssignment() const
Determine whether this class has a trivial copy assignment operator (C++ [class.copy]p11,...
void addedEligibleSpecialMemberFunction(const CXXMethodDecl *MD, unsigned SMKind)
Notify the class that an eligible SMF has been added.
conversion_iterator conversion_end() const
base_class_range vbases()
bool hasUserProvidedDefaultConstructor() const
Whether this class has a user-provided default constructor per C++11.
base_class_iterator vbases_begin()
capture_const_range captures() const
void setImplicitMoveConstructorIsDeleted()
Set that we attempted to declare an implicit move constructor, but overload resolution failed so we d...
void finishedDefaultedOrDeletedMember(CXXMethodDecl *MD)
Indicates that the declaration of a defaulted or deleted special member function is now complete.
bool isAbstract() const
Determine whether this class has a pure virtual function.
base_class_const_iterator bases_begin() const
TypeSourceInfo * getLambdaTypeInfo() const
bool hasVariantMembers() const
Determine whether this class has any variant members.
void setImplicitCopyConstructorIsDeleted()
Set that we attempted to declare an implicit copy constructor, but overload resolution failed so we d...
CXXRecordDecl(Kind K, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl)
bool isDynamicClass() const
bool isCLike() const
True if this class is C-like, without C++-specific features, e.g.
void setInstantiationOfMemberClass(CXXRecordDecl *RD, TemplateSpecializationKind TSK)
Specify that this record is an instantiation of the member class RD.
bool hasInClassInitializer() const
Whether this class has any in-class initializers for non-static data members (including those in anon...
bool mayBeDynamicClass() const
bool needsImplicitCopyConstructor() const
Determine whether this class needs an implicit copy constructor to be lazily declared.
base_class_const_iterator vbases_end() const
bool hasIrrelevantDestructor() const
Determine whether this class has a destructor which has no semantic effect.
static CXXRecordDecl * CreateDeserialized(const ASTContext &C, GlobalDeclID ID)
bool isDependentLambda() const
Determine whether this lambda expression was known to be dependent at the time it was created,...
bool hasSimpleMoveAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous move assignment operat...
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12)
bool hasNonTrivialCopyConstructorForCall() const
bool hasDirectFields() const
Determine whether this class has direct non-static data members.
const CXXRecordDecl * getCanonicalDecl() const
MSInheritanceModel getMSInheritanceModel() const
Returns the inheritance model used for this record.
bool hasUserDeclaredCopyConstructor() const
Determine whether this class has a user-declared copy constructor.
bool isCXX11StandardLayout() const
Determine whether this class was standard-layout per C++11 [class]p7, specifically using the C++11 ru...
bool nullFieldOffsetIsZero() const
In the Microsoft C++ ABI, use zero for the field offset of a null data member pointer if we can guara...
bool hasUserDeclaredConstructor() const
Determine whether this class has any user-declared constructors.
base_class_const_iterator vbases_begin() const
llvm::iterator_range< base_class_iterator > base_class_range
unsigned getODRHash() const
LambdaNumbering getLambdaNumbering() const
llvm::iterator_range< specific_decl_iterator< CXXConstructorDecl > > ctor_range
bool hasDefinition() const
ArrayRef< NamedDecl * > getLambdaExplicitTemplateParameters() const
Retrieve the lambda template parameters that were specified explicitly.
void setImplicitCopyAssignmentIsDeleted()
Set that we attempted to declare an implicit copy assignment operator, but overload resolution failed...
bool needsImplicitDestructor() const
Determine whether this class needs an implicit destructor to be lazily declared.
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
bool isPOD() const
Whether this class is a POD-type (C++ [class]p4)
void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const
Retrieve the final overriders for each virtual member function in the class hierarchy where this clas...
llvm::function_ref< bool(const CXXBaseSpecifier *Specifier, CXXBasePath &Path)> BaseMatchesCallback
Function type used by lookupInBases() to determine whether a specific base class subobject matches th...
void removeConversion(const NamedDecl *Old)
Removes a conversion function from this class.
const CXXRecordDecl * getMostRecentNonInjectedDecl() const
MSInheritanceModel calculateInheritanceModel() const
Calculate what the inheritance model would be for this class.
bool hasSimpleCopyConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous copy constructor that ...
bool isCurrentInstantiation(const DeclContext *CurContext) const
Determine whether this dependent class is a current instantiation, when viewed from within the given ...
MSVtorDispMode getMSVtorDispMode() const
Controls when vtordisps will be emitted if this record is used as a virtual base.
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class.
base_class_iterator vbases_end()
void setInitMethod(bool Val)
bool isEmpty() const
Determine whether this is an empty class in the sense of (C++11 [meta.unary.prop]).
LambdaCaptureDefault getLambdaCaptureDefault() const
bool hasMemberName(DeclarationName N) const
Determine whether this class has a member with the given name, possibly in a non-dependent base class...
bool needsOverloadResolutionForMoveAssignment() const
Determine whether we need to eagerly declare a move assignment operator for this class.
CXXDestructorDecl * getDestructor() const
Returns the destructor decl for this class.
bool hasCopyAssignmentWithConstParam() const
Determine whether this class has a copy assignment operator with a parameter type which is a referenc...
bool hasNonTrivialMoveAssignment() const
Determine whether this class has a non-trivial move assignment operator (C++11 [class....
bool hasNonTrivialDestructorForCall() const
void setHasTrivialSpecialMemberForCall()
method_iterator method_end() const
Method past-the-end iterator.
static bool classofKind(Kind K)
capture_const_iterator captures_begin() const
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
llvm::iterator_range< base_class_const_iterator > base_class_const_range
bool hasUserDeclaredMoveOperation() const
Whether this class has a user-declared move constructor or assignment operator.
llvm::function_ref< bool(const CXXRecordDecl *BaseDefinition)> ForallBasesCallback
Function type used by forallBases() as a callback.
bool hasInheritedConstructor() const
Determine whether this class has a using-declaration that names a user-declared base class constructo...
static bool FindVirtualBaseClass(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, const CXXRecordDecl *BaseRecord)
Base-class lookup callback that determines whether the given base class specifier refers to a specifi...
CXXMethodDecl * getLambdaStaticInvoker() const
Retrieve the lambda static invoker, the address of which is returned by the conversion operator,...
bool hasNonTrivialDefaultConstructor() const
Determine whether this class has a non-trivial default constructor (C++11 [class.ctor]p5).
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class.
static bool FindBaseClass(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, const CXXRecordDecl *BaseRecord)
Base-class lookup callback that determines whether the given base class specifier refers to a specifi...
void setImplicitDestructorIsDeleted()
Set that we attempted to declare an implicit destructor, but overload resolution failed so we deleted...
bool hasUserDeclaredMoveConstructor() const
Determine whether this class has had a move constructor declared by the user.
bool needsImplicitMoveAssignment() const
Determine whether this class should get an implicit move assignment operator or if any existing speci...
bool hasSimpleDestructor() const
true if we know for sure that this class has an accessible destructor that is not deleted.
friend_iterator friend_end() const
void setDescribedClassTemplate(ClassTemplateDecl *Template)
bool isVirtuallyDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is virtually derived from the class Base.
bool isInterfaceLike() const
unsigned capture_size() const
void setIsParsingBaseSpecifiers()
bool hasNonTrivialMoveConstructorForCall() const
bool needsImplicitCopyAssignment() const
Determine whether this class needs an implicit copy assignment operator to be lazily declared.
void setLambdaNumbering(LambdaNumbering Numbering)
Set the mangling numbers and context declaration for a lambda class.
bool isAnyDestructorNoReturn() const
Returns true if the class destructor, or any implicitly invoked destructors are marked noreturn.
bool forallBases(ForallBasesCallback BaseMatches) const
Determines if the given callback holds for all the direct or indirect base classes of this type.
base_class_const_range vbases() const
void setLambdaDependencyKind(unsigned Kind)
bool hasTrivialMoveConstructorForCall() const
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization,...
std::vector< const NamedDecl * > lookupDependentName(DeclarationName Name, llvm::function_ref< bool(const NamedDecl *ND)> Filter)
Performs an imprecise lookup of a dependent name in this class.
FunctionDecl * isLocalClass()
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6,...
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
const LambdaCapture * getCapture(unsigned I) const
const CXXRecordDecl * getMostRecentDecl() const
const CXXRecordDecl * getStandardLayoutBaseWithFields() const
If this is a standard-layout class or union, any and all data members will be declared in the same ty...
bool hasSimpleCopyAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous copy assignment operat...
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
void setTemplateSpecializationKind(TemplateSpecializationKind TSK)
Set the kind of specialization or template instantiation this is.
bool isTrivial() const
Determine whether this class is considered trivial.
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
conversion_iterator conversion_begin() const
CXXRecordDecl * getPreviousDecl()
bool isDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is derived from the class Base.
bool implicitCopyAssignmentHasConstParam() const
Determine whether an implicit copy assignment operator for this type would have a parameter with a co...
Declaration of a class template.
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
const CXXRecordDecl * getParent() const
Returns the parent of this using shadow declaration, which is the class in which this is declared.
static ConstructorUsingShadowDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
CXXRecordDecl * getParent()
static bool classof(const Decl *D)
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
static bool classofKind(Kind K)
UsingDecl * getIntroducer() const
Override the UsingShadowDecl's getIntroducer, returning the UsingDecl that introduced this.
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext,...
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
DeclContext * getParent()
getParent - Returns the containing DeclContext.
FunctionDeclBitfields FunctionDeclBits
CXXConstructorDeclBitfields CXXConstructorDeclBits
decl_iterator decls_end() const
LinkageSpecDeclBitfields LinkageSpecDeclBits
decl_iterator decls_begin() const
Decl - This represents one declaration (or definition), e.g.
SourceLocation getEndLoc() const LLVM_READONLY
ASTContext & getASTContext() const LLVM_READONLY
Kind
Lists the kind of concrete classes of Decl.
unsigned getIdentifierNamespace() const
void setAccess(AccessSpecifier AS)
SourceLocation getLocation() const
IdentifierNamespace
IdentifierNamespace - The different namespaces in which declarations may appear.
@ IDNS_TagFriend
This declaration is a friend class.
@ IDNS_OrdinaryFriend
This declaration is a friend function.
@ IDNS_LocalExtern
This declaration is a function-local extern declaration of a variable or function.
void setImplicit(bool I=true)
void setLocation(SourceLocation L)
DeclContext * getDeclContext()
const LangOptions & getLangOpts() const LLVM_READONLY
Helper to get the language options from the ASTContext.
DeclarationNameLoc - Additional source/type location info for a declaration name.
The name of a declaration.
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name.
static DeclarationName getUsingDirectiveName()
Returns the name for all C++ using-directives.
Represents a ValueDecl that came out of a declarator.
A decomposition declaration.
void printName(raw_ostream &OS, const PrintingPolicy &Policy) const override
Pretty-print the unqualified name of this declaration.
ArrayRef< BindingDecl * > bindings() const
static bool classof(const Decl *D)
static bool classofKind(Kind K)
static DecompositionDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumBindings)
A helper class that allows the use of isa/cast/dyncast to detect TagType objects of enums.
Store information needed for an explicit specifier.
bool isExplicit() const
Determine whether this specifier is known to correspond to an explicit declaration.
ExplicitSpecKind getKind() const
bool isInvalid() const
Determine if the explicit specifier is invalid.
static ExplicitSpecifier Invalid()
static const ExplicitSpecifier getFromDecl(const FunctionDecl *Function)
const Expr * getExpr() const
ExplicitSpecifier()=default
void setKind(ExplicitSpecKind Kind)
static ExplicitSpecifier getFromDecl(FunctionDecl *Function)
bool isSpecified() const
Determine if the declaration had an explicit specifier of any kind.
bool isEquivalent(const ExplicitSpecifier Other) const
Check for equivalence of explicit specifiers.
ExplicitSpecifier(Expr *Expression, ExplicitSpecKind Kind)
This represents one expression.
Represents a member of a struct/union/class.
FriendDecl - Represents the declaration of a friend entity, which can be a function,...
Represents a function declaration or definition.
void setIsPureVirtual(bool P=true)
bool UsesFPIntrin() const
Determine whether the function was declared in source context that requires constrained FP intrinsics...
QualType getReturnType() const
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool isPureVirtual() const
Whether this virtual function is pure, i.e.
void setRangeEnd(SourceLocation E)
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
unsigned getNumParams() const
Return the number of parameters this function must have based on its FunctionType.
Represents a prototype with parameter type info, e.g.
Declaration of a template function.
FunctionType - C99 6.7.5.3 - Function Declarators.
One of these records is kept for each identifier that is lexed.
Represents a field injected from an anonymous union/struct into the parent scope.
Description of a constructor that was inherited from a base class.
InheritedConstructor()=default
CXXConstructorDecl * getConstructor() const
InheritedConstructor(ConstructorUsingShadowDecl *Shadow, CXXConstructorDecl *BaseCtor)
ConstructorUsingShadowDecl * getShadowDecl() const
Describes the capture of a variable or of this, or of a C++1y init-capture.
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
const ValueDecl * getExtendingDecl() const
unsigned getManglingNumber() const
APValue * getValue() const
APValue * getOrCreateValue(bool MayCreate) const
Get the storage for the constant value of a materialized temporary of static storage duration.
static bool classof(const Decl *D)
Stmt::child_range childrenExpr()
StorageDuration getStorageDuration() const
Retrieve the storage duration for the materialized temporary.
Stmt::const_child_range childrenExpr() const
static LifetimeExtendedTemporaryDecl * Create(Expr *Temp, ValueDecl *EDec, unsigned Mangling)
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
static LifetimeExtendedTemporaryDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const Expr * getTemporaryExpr() const
ValueDecl * getExtendingDecl()
static bool classofKind(Kind K)
Represents a linkage specification.
void setExternLoc(SourceLocation L)
void setLanguage(LinkageSpecLanguageIDs L)
Set the language specified by this linkage specification.
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setRBraceLoc(SourceLocation L)
static LinkageSpecDecl * castFromDeclContext(const DeclContext *DC)
static DeclContext * castToDeclContext(const LinkageSpecDecl *D)
LinkageSpecLanguageIDs getLanguage() const
Return the language specified by this linkage specification.
SourceLocation getExternLoc() const
SourceLocation getRBraceLoc() const
SourceLocation getEndLoc() const LLVM_READONLY
static bool classof(const Decl *D)
static LinkageSpecDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
static bool classof(const Decl *D)
Parts getParts() const
Get the decomposed parts of this declaration.
static bool classofKind(Kind K)
static void Profile(llvm::FoldingSetNodeID &ID, Parts P)
void Profile(llvm::FoldingSetNodeID &ID)
APValue & getAsAPValue() const
Get the value of this MSGuidDecl as an APValue.
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this UUID in a human-readable format.
An instance of this class represents the declaration of a property member.
static bool classof(const Decl *D)
IdentifierInfo * getGetterId() const
IdentifierInfo * getSetterId() const
static MSPropertyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a prvalue temporary that is written into memory so that a reference can bind to it.
Provides information a specialization of a member of a class template, which may be a member function...
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
UsingDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
This represents a decl that may have a name.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
NamedDecl * getMostRecentDecl()
Represents a C++ namespace alias.
static NamespaceAliasDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamespaceAliasDecl * getCanonicalDecl() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
redeclarable_base::redecl_range redecl_range
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
SourceLocation getAliasLoc() const
Returns the location of the alias name, i.e.
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
static bool classof(const Decl *D)
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
NamespaceAliasDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
redeclarable_base::redecl_iterator redecl_iterator
static bool classofKind(Kind K)
const NamespaceDecl * getNamespace() const
Represent a C++ namespace.
A C++ nested-name-specifier augmented with source location information.
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
A (possibly-)qualified type.
void Profile(llvm::FoldingSetNodeID &ID) const
QualType getNonReferenceType() const
If Type is a reference type (e.g., const int&), returns the type that the reference refers to ("const...
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
The collection of all-type qualifiers we support.
Represents a struct/union/class.
bool isInjectedClassName() const
Determines whether this declaration represents the injected class name.
Provides common interface for the Decls that can be redeclared.
NamespaceAliasDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
UsingShadowDecl * getNextRedeclaration() const
NamespaceAliasDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
redecl_iterator redecls_end() const
llvm::iterator_range< redecl_iterator > redecl_range
NamespaceAliasDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
redecl_iterator redecls_begin() const
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
Represents the body of a requires-expression.
static DeclContext * castToDeclContext(const RequiresExprBodyDecl *D)
static RequiresExprBodyDecl * castFromDeclContext(const DeclContext *DC)
static bool classofKind(Kind K)
static RequiresExprBodyDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
A trivial tuple used to represent a source range.
Represents a C++11 static_assert declaration.
const Expr * getMessage() const
static bool classofKind(Kind K)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const Expr * getAssertExpr() const
SourceLocation getRParenLoc() const
static StaticAssertDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
Stmt - This represents one statement.
llvm::iterator_range< child_iterator > child_range
llvm::iterator_range< const_child_iterator > const_child_range
void startDefinition()
Starts the definition of this tag declaration.
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
The base class of all kinds of template declarations (e.g., class, function, etc.).
Stores a list of template parameters for a TemplateDecl and its derived classes.
Represents a declaration of a type.
SourceLocation getBeginLoc() const LLVM_READONLY
Base wrapper for a particular "section" of type source info.
SourceLocation getBeginLoc() const
Get the begin source location.
A container of type source information.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
QualType getType() const
Return the type wrapped by this type source info.
The base class of the type hierarchy.
const T * castAs() const
Member-template castAs<specific type>.
const T * getAs() const
Member-template getAs<specific type>'.
TagDecl * getAsTagDecl() const
Retrieves the TagDecl that this type refers to, either because the type is a TagType or because it is...
An artificial decl, representing a global anonymous constant value which is uniquified by value withi...
const APValue & getValue() const
static bool classofKind(Kind K)
static bool classof(const Decl *D)
void printName(llvm::raw_ostream &OS, const PrintingPolicy &Policy) const override
Print this in a human-readable format.
static void Profile(llvm::FoldingSetNodeID &ID, QualType Ty, const APValue &APVal)
void Profile(llvm::FoldingSetNodeID &ID)
The iterator over UnresolvedSets.
This node is generated when a using-declaration that was annotated with attribute((using_if_exists)) ...
static UnresolvedUsingIfExistsDecl * CreateDeserialized(ASTContext &Ctx, GlobalDeclID ID)
static bool classof(const Decl *D)
static bool classofKind(Kind K)
Represents a dependent using declaration which was marked with typename.
bool isPackExpansion() const
Determine whether this is a pack expansion.
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
static bool classofKind(Kind K)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
static bool classof(const Decl *D)
UnresolvedUsingTypenameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
const UnresolvedUsingTypenameDecl * getCanonicalDecl() const
DeclarationNameInfo getNameInfo() const
static UnresolvedUsingTypenameDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a dependent using declaration which was not marked with typename.
const UnresolvedUsingValueDecl * getCanonicalDecl() const
bool isPackExpansion() const
Determine whether this is a pack expansion.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
static bool classofKind(Kind K)
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
static bool classof(const Decl *D)
DeclarationNameInfo getNameInfo() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
UnresolvedUsingValueDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
static UnresolvedUsingValueDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
Represents a C++ using-declaration.
void setTypename(bool TN)
Sets whether the using declaration has 'typename'.
UsingDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
bool hasTypename() const
Return true if the using declaration has 'typename'.
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
static UsingDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const UsingDecl * getCanonicalDecl() const
DeclarationNameInfo getNameInfo() const
static bool classof(const Decl *D)
static bool classofKind(Kind K)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
Represents C++ using-directive.
static UsingDirectiveDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
const NamedDecl * getNominatedNamespaceAsWritten() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const DeclContext * getCommonAncestor() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
static bool classofKind(Kind K)
SourceLocation getUsingLoc() const
Return the location of the using keyword.
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
const NamespaceDecl * getNominatedNamespace() const
static bool classof(const Decl *D)
NamedDecl * getNominatedNamespaceAsWritten()
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
SourceLocation getIdentLocation() const
Returns the location of this using declaration's identifier.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
Represents a C++ using-enum-declaration.
void setEnumType(TypeSourceInfo *TSI)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
void setEnumLoc(SourceLocation L)
NestedNameSpecifierLoc getQualifierLoc() const
SourceLocation getEnumLoc() const
The source location of the 'enum' keyword.
void setUsingLoc(SourceLocation L)
UsingEnumDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
NestedNameSpecifier * getQualifier() const
EnumDecl * getEnumDecl() const
const UsingEnumDecl * getCanonicalDecl() const
TypeSourceInfo * getEnumType() const
static bool classofKind(Kind K)
static UsingEnumDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
TypeLoc getEnumTypeLoc() const
SourceLocation getUsingLoc() const
The source location of the 'using' keyword.
Represents a pack of using declarations that a single using-declarator pack-expanded into.
static UsingPackDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID, unsigned NumExpansions)
const UsingPackDecl * getCanonicalDecl() const
UsingPackDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Represents a shadow declaration implicitly introduced into a scope by a (resolved) using-declaration ...
UsingShadowDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
redeclarable_base::redecl_range redecl_range
static UsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, DeclarationName Name, BaseUsingDecl *Introducer, NamedDecl *Target)
UsingShadowDecl * getNextUsingShadowDecl() const
The next using shadow declaration contained in the shadow decl chain of the using declaration which i...
void setTargetDecl(NamedDecl *ND)
Sets the underlying declaration which has been brought into the local scope.
static bool classofKind(Kind K)
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
redeclarable_base::redecl_iterator redecl_iterator
UsingShadowDecl(Kind K, ASTContext &C, DeclContext *DC, SourceLocation Loc, DeclarationName Name, BaseUsingDecl *Introducer, NamedDecl *Target)
static UsingShadowDecl * CreateDeserialized(ASTContext &C, GlobalDeclID ID)
static bool classof(const Decl *D)
friend class BaseUsingDecl
BaseUsingDecl * getIntroducer() const
Gets the (written or instantiated) using declaration that introduced this declaration.
const UsingShadowDecl * getCanonicalDecl() const
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
void setType(QualType newType)
Represents a variable declaration or definition.
The JSON file list parser is used to communicate input to InstallAPI.
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
ConstexprSpecKind
Define the kind of constexpr specifier.
LinkageSpecLanguageIDs
Represents the language in a linkage specification.
RefQualifierKind
The kind of C++11 ref-qualifier associated with a function type.
@ Create
'create' clause, allowed on Compute and Combined constructs, plus 'data', 'enter data',...
StorageClass
Storage classes.
const StreamingDiagnostic & operator<<(const StreamingDiagnostic &DB, const ASTContext::SectionInfo &Section)
Insertion operator for diagnostics.
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
LazyOffsetPtr< Decl, GlobalDeclID, &ExternalASTSource::GetExternalDecl > LazyDeclPtr
A lazy pointer to a declaration.
const FunctionProtoType * T
DeductionCandidate
Only used by CXXDeductionGuideDecl.
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
CallingConv
CallingConv - Specifies the calling convention that a function uses.
LazyOffsetPtr< CXXBaseSpecifier, uint64_t, &ExternalASTSource::GetExternalCXXBaseSpecifiers > LazyCXXBaseSpecifiersPtr
A lazy pointer to a set of CXXBaseSpecifiers.
@ Other
Other implicit parameter.
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
Information about how a lambda is numbered within its context.
unsigned DeviceManglingNumber
bool HasKnownInternalLinkage
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspon...
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
DeclarationName getName() const
getName - Returns the embedded declaration name.
const DeclarationNameLoc & getInfo() const
Parts of a decomposed MSGuidDecl.
uint16_t Part2
...-89ab-...
uint32_t Part1
{01234567-...
uint16_t Part3
...-cdef-...
uint8_t Part4And5[8]
...-0123-456789abcdef}
uint64_t getPart4And5AsUint64() const
Describes how types, statements, expressions, and declarations should be printed.