15 #ifndef LLVM_CLANG_AST_DECLCXX_H 16 #define LLVM_CLANG_AST_DECLCXX_H 38 #include "llvm/ADT/ArrayRef.h" 39 #include "llvm/ADT/DenseMap.h" 40 #include "llvm/ADT/PointerIntPair.h" 41 #include "llvm/ADT/PointerUnion.h" 42 #include "llvm/ADT/STLExtras.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" 56 class ClassTemplateDecl;
57 class ConstructorUsingShadowDecl;
60 class CXXConstructorDecl;
61 class CXXDestructorDecl;
62 class CXXFinalOverriderMap;
63 class CXXIndirectPrimaryBaseSet;
65 class DecompositionDecl;
66 class DiagnosticBuilder;
68 class FunctionTemplateDecl;
70 class MemberSpecializationInfo;
72 class TemplateParameterList;
91 :
Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) {
97 virtual void anchor();
162 unsigned BaseOfClass : 1;
172 unsigned InheritConstructors : 1;
184 : Range(R), EllipsisLoc(EllipsisLoc),
Virtual(V), BaseOfClass(BC),
185 Access(A), InheritConstructors(
false), BaseTypeInfo(TInfo) {}
212 InheritConstructors = Inherit;
267 enum SpecialMemberFlags {
268 SMF_DefaultConstructor = 0x1,
269 SMF_CopyConstructor = 0x2,
270 SMF_MoveConstructor = 0x4,
271 SMF_CopyAssignment = 0x8,
272 SMF_MoveAssignment = 0x10,
273 SMF_Destructor = 0x20,
277 struct DefinitionData {
278 #define FIELD(Name, Width, Merge) \ 279 unsigned Name : Width; 280 #include "CXXRecordDeclDefinitionBits.def" 283 unsigned IsLambda : 1;
286 unsigned IsParsingBaseSpecifiers : 1;
290 unsigned ComputedVisibleConversions : 1;
292 unsigned HasODRHash : 1;
295 unsigned ODRHash = 0;
298 unsigned NumBases = 0;
301 unsigned NumVBases = 0;
315 LazyASTUnresolvedSet Conversions;
322 LazyASTUnresolvedSet VisibleConversions;
325 CXXRecordDecl *Definition;
333 DefinitionData(CXXRecordDecl *D);
336 CXXBaseSpecifier *getBases()
const {
337 if (!Bases.isOffset())
338 return Bases.get(
nullptr);
339 return getBasesSlowCase();
343 CXXBaseSpecifier *getVBases()
const {
344 if (!VBases.isOffset())
345 return VBases.get(
nullptr);
346 return getVBasesSlowCase();
349 ArrayRef<CXXBaseSpecifier> bases()
const {
350 return llvm::makeArrayRef(getBases(), NumBases);
353 ArrayRef<CXXBaseSpecifier> vbases()
const {
354 return llvm::makeArrayRef(getVBases(), NumVBases);
358 CXXBaseSpecifier *getBasesSlowCase()
const;
359 CXXBaseSpecifier *getVBasesSlowCase()
const;
362 struct DefinitionData *DefinitionData;
365 struct LambdaDefinitionData :
public DefinitionData {
366 using Capture = LambdaCapture;
376 unsigned Dependent : 1;
379 unsigned IsGenericLambda : 1;
382 unsigned CaptureDefault : 2;
385 unsigned NumCaptures : 15;
388 unsigned NumExplicitCaptures : 13;
391 unsigned HasKnownInternalLinkage : 1;
395 unsigned ManglingNumber : 31;
405 Capture *Captures =
nullptr;
408 TypeSourceInfo *MethodTyInfo;
410 LambdaDefinitionData(CXXRecordDecl *D, TypeSourceInfo *Info,
bool Dependent,
412 : DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric),
413 CaptureDefault(CaptureDefault), NumCaptures(0),
414 NumExplicitCaptures(0), HasKnownInternalLinkage(0), ManglingNumber(0),
421 PlainOldData =
false;
425 struct DefinitionData *dataPtr()
const {
428 return DefinitionData;
431 struct DefinitionData &data()
const {
432 auto *DD = dataPtr();
433 assert(DD &&
"queried property of class with no definition");
437 struct LambdaDefinitionData &getLambdaData()
const {
440 auto *DD = DefinitionData;
441 assert(DD && DD->IsLambda &&
"queried lambda property of non-lambda class");
442 return static_cast<LambdaDefinitionData&
>(*DD);
454 llvm::PointerUnion<ClassTemplateDecl *, MemberSpecializationInfo *>
455 TemplateOrInstantiation;
459 void addedClassSubobject(CXXRecordDecl *
Base);
466 void addedMember(
Decl *D);
468 void markedVirtualFunctionPure();
472 FriendDecl *getFirstFriend()
const;
477 bool hasSubobjectAtOffsetZeroOfEmptyBaseType(ASTContext &Ctx,
478 const CXXRecordDecl *
X);
482 SourceLocation StartLoc, SourceLocation IdLoc,
483 IdentifierInfo *
Id, CXXRecordDecl *PrevDecl);
501 return cast_or_null<CXXRecordDecl>(
510 return cast<CXXRecordDecl>(
530 return const_cast<CXXRecordDecl*
>(
this)->getMostRecentNonInjectedDecl();
536 auto *DD = DefinitionData ? DefinitionData : dataPtr();
537 return DD ? DD->Definition :
nullptr;
546 bool DelayTypeCreation =
false);
549 bool DependentLambda,
bool IsGeneric,
554 return data().Polymorphic || data().NumVBases != 0;
560 return !
hasDefinition() || isDynamicClass() || hasAnyDependentBases();
566 return !
hasDefinition() || !isDynamicClass() || hasAnyDependentBases();
572 return data().IsParsingBaseSpecifiers;
575 unsigned getODRHash()
const;
585 llvm::iterator_range<base_class_const_iterator>;
598 return bases_begin() + data().NumBases;
615 return vbases_begin() + data().NumVBases;
620 bool hasAnyDependentBases()
const;
627 llvm::iterator_range<specific_decl_iterator<CXXMethodDecl>>;
647 llvm::iterator_range<specific_decl_iterator<CXXConstructorDecl>>;
671 return data().FirstFriend.isValid();
677 assert((!needsOverloadResolutionForCopyConstructor() ||
678 (data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
679 "this property has not yet been computed by Sema");
680 return data().DefaultedCopyConstructorIsDeleted;
686 assert((!needsOverloadResolutionForMoveConstructor() ||
687 (data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
688 "this property has not yet been computed by Sema");
689 return data().DefaultedMoveConstructorIsDeleted;
694 assert((!needsOverloadResolutionForDestructor() ||
695 (data().DeclaredSpecialMembers & SMF_Destructor)) &&
696 "this property has not yet been computed by Sema");
697 return data().DefaultedDestructorIsDeleted;
703 return !hasUserDeclaredCopyConstructor() &&
704 !data().DefaultedCopyConstructorIsDeleted;
710 return !hasUserDeclaredMoveConstructor() && hasMoveConstructor() &&
711 !data().DefaultedMoveConstructorIsDeleted;
717 return !hasUserDeclaredMoveAssignment() && hasMoveAssignment() &&
718 !data().DefaultedMoveAssignmentIsDeleted;
724 return !hasUserDeclaredDestructor() &&
725 !data().DefaultedDestructorIsDeleted;
730 return (data().DeclaredSpecialMembers & SMF_DefaultConstructor) ||
731 needsImplicitDefaultConstructor();
739 return !data().UserDeclaredConstructor &&
740 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor) &&
741 (!isLambda() || lambdaIsDefaultConstructibleAndAssignable());
748 return data().UserDeclaredConstructor;
754 return data().UserProvidedDefaultConstructor;
761 return data().UserDeclaredSpecialMembers & SMF_CopyConstructor;
767 return !(data().DeclaredSpecialMembers & SMF_CopyConstructor);
779 if (data().UserDeclaredSpecialMembers &
780 (SMF_MoveConstructor | SMF_MoveAssignment))
782 return data().NeedOverloadResolutionForCopyConstructor;
788 return data().ImplicitCopyConstructorCanHaveConstParamForNonVBase &&
790 data().ImplicitCopyConstructorCanHaveConstParamForVBase);
796 return data().HasDeclaredCopyConstructorWithConstParam ||
797 (needsImplicitCopyConstructor() &&
798 implicitCopyConstructorHasConstParam());
807 return data().UserDeclaredSpecialMembers &
808 (SMF_MoveConstructor | SMF_MoveAssignment);
814 return data().UserDeclaredSpecialMembers & SMF_MoveConstructor;
819 return (data().DeclaredSpecialMembers & SMF_MoveConstructor) ||
820 needsImplicitMoveConstructor();
826 assert((data().DefaultedCopyConstructorIsDeleted ||
827 needsOverloadResolutionForCopyConstructor()) &&
828 "Copy constructor should not be deleted");
829 data().DefaultedCopyConstructorIsDeleted =
true;
835 assert((data().DefaultedMoveConstructorIsDeleted ||
836 needsOverloadResolutionForMoveConstructor()) &&
837 "move constructor should not be deleted");
838 data().DefaultedMoveConstructorIsDeleted =
true;
844 assert((data().DefaultedDestructorIsDeleted ||
845 needsOverloadResolutionForDestructor()) &&
846 "destructor should not be deleted");
847 data().DefaultedDestructorIsDeleted =
true;
853 return !(data().DeclaredSpecialMembers & SMF_MoveConstructor) &&
854 !hasUserDeclaredCopyConstructor() &&
855 !hasUserDeclaredCopyAssignment() &&
856 !hasUserDeclaredMoveAssignment() &&
857 !hasUserDeclaredDestructor();
863 return data().NeedOverloadResolutionForMoveConstructor;
871 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
877 return !(data().DeclaredSpecialMembers & SMF_CopyAssignment);
883 return data().HasMutableFields;
889 return data().ImplicitCopyAssignmentHasConstParam;
896 return data().HasDeclaredCopyAssignmentWithConstParam ||
897 (needsImplicitCopyAssignment() &&
898 implicitCopyAssignmentHasConstParam());
904 return data().UserDeclaredSpecialMembers & SMF_MoveAssignment;
909 return (data().DeclaredSpecialMembers & SMF_MoveAssignment) ||
910 needsImplicitMoveAssignment();
916 assert((data().DefaultedMoveAssignmentIsDeleted ||
917 needsOverloadResolutionForMoveAssignment()) &&
918 "move assignment should not be deleted");
919 data().DefaultedMoveAssignmentIsDeleted =
true;
926 return !(data().DeclaredSpecialMembers & SMF_MoveAssignment) &&
927 !hasUserDeclaredCopyConstructor() &&
928 !hasUserDeclaredCopyAssignment() &&
929 !hasUserDeclaredMoveConstructor() &&
930 !hasUserDeclaredDestructor() &&
931 (!isLambda() || lambdaIsDefaultConstructibleAndAssignable());
937 return data().NeedOverloadResolutionForMoveAssignment;
944 return data().UserDeclaredSpecialMembers & SMF_Destructor;
950 return !(data().DeclaredSpecialMembers & SMF_Destructor);
956 return data().NeedOverloadResolutionForDestructor;
962 auto *DD = DefinitionData;
963 return DD && DD->IsLambda;
969 bool isGenericLambda()
const;
973 bool lambdaIsDefaultConstructibleAndAssignable()
const;
1013 void getCaptureFields(llvm::DenseMap<const VarDecl *, FieldDecl *> &Captures,
1024 return isLambda() ? getLambdaData().Captures :
nullptr;
1028 return isLambda() ? captures_begin() + getLambdaData().NumCaptures
1045 void removeConversion(
const NamedDecl *Old);
1049 llvm::iterator_range<conversion_iterator>
1050 getVisibleConversionFunctions()
const;
1072 return !isUnion() && !hasUserDeclaredConstructor() &&
1073 data().HasUninitializedReferenceMember;
1084 bool isPOD()
const {
return data().PlainOldData; }
1088 bool isCLike()
const;
1102 return data().HasPrivateFields;
1106 return data().HasProtectedFields;
1112 return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields;
1144 return hasDefaultConstructor() &&
1145 (data().HasTrivialSpecialMembers & SMF_DefaultConstructor);
1151 return (data().DeclaredNonTrivialSpecialMembers & SMF_DefaultConstructor) ||
1152 (needsImplicitDefaultConstructor() &&
1153 !(data().HasTrivialSpecialMembers & SMF_DefaultConstructor));
1159 return data().HasConstexprNonCopyMoveConstructor ||
1160 (needsImplicitDefaultConstructor() &&
1161 defaultedDefaultConstructorIsConstexpr());
1167 return data().DefaultedDefaultConstructorIsConstexpr &&
1168 (!isUnion() || hasInClassInitializer() || !hasVariantMembers() ||
1174 return data().HasConstexprDefaultConstructor ||
1175 (needsImplicitDefaultConstructor() &&
1176 defaultedDefaultConstructorIsConstexpr());
1182 return data().HasTrivialSpecialMembers & SMF_CopyConstructor;
1186 return data().HasTrivialSpecialMembersForCall & SMF_CopyConstructor;
1192 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyConstructor ||
1193 !hasTrivialCopyConstructor();
1197 return (data().DeclaredNonTrivialSpecialMembersForCall &
1198 SMF_CopyConstructor) ||
1199 !hasTrivialCopyConstructorForCall();
1205 return hasMoveConstructor() &&
1206 (data().HasTrivialSpecialMembers & SMF_MoveConstructor);
1210 return hasMoveConstructor() &&
1211 (data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor);
1217 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveConstructor) ||
1218 (needsImplicitMoveConstructor() &&
1219 !(data().HasTrivialSpecialMembers & SMF_MoveConstructor));
1223 return (data().DeclaredNonTrivialSpecialMembersForCall &
1224 SMF_MoveConstructor) ||
1225 (needsImplicitMoveConstructor() &&
1226 !(data().HasTrivialSpecialMembersForCall & SMF_MoveConstructor));
1232 return data().HasTrivialSpecialMembers & SMF_CopyAssignment;
1238 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyAssignment ||
1239 !hasTrivialCopyAssignment();
1245 return hasMoveAssignment() &&
1246 (data().HasTrivialSpecialMembers & SMF_MoveAssignment);
1252 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveAssignment) ||
1253 (needsImplicitMoveAssignment() &&
1254 !(data().HasTrivialSpecialMembers & SMF_MoveAssignment));
1260 return data().DefaultedDestructorIsConstexpr &&
1265 bool hasConstexprDestructor()
const;
1270 return data().HasTrivialSpecialMembers & SMF_Destructor;
1274 return data().HasTrivialSpecialMembersForCall & SMF_Destructor;
1280 return !(data().HasTrivialSpecialMembers & SMF_Destructor);
1284 return !(data().HasTrivialSpecialMembersForCall & SMF_Destructor);
1288 data().HasTrivialSpecialMembersForCall =
1289 (SMF_CopyConstructor | SMF_MoveConstructor | SMF_Destructor);
1295 return !data().HasUninitializedFields ||
1296 !(data().HasDefaultedDefaultConstructor ||
1297 needsImplicitDefaultConstructor());
1306 return data().HasIrrelevantDestructor;
1312 return data().HasNonLiteralTypeFieldsOrBases;
1318 return data().HasInheritedConstructor;
1324 return data().HasInheritedAssignment;
1329 bool isTriviallyCopyable()
const;
1337 return isTriviallyCopyable() && hasTrivialDefaultConstructor();
1359 return (Ctx.
getLangOpts().CPlusPlus2a ? hasConstexprDestructor()
1360 : hasTrivialDestructor()) &&
1362 !hasNonLiteralTypeFieldsOrBases() &&
1363 (isAggregate() || isLambda() ||
1364 hasConstexprNonCopyMoveConstructor() ||
1365 hasTrivialDefaultConstructor());
1424 const CXXRecordDecl *getTemplateInstantiationPattern()
const;
1428 ->getTemplateInstantiationPattern());
1436 bool isAnyDestructorNoReturn()
const;
1454 bool isCurrentInstantiation(
const DeclContext *CurContext)
const;
1499 bool isVirtuallyDerivedFrom(
const CXXRecordDecl *Base)
const;
1511 llvm::function_ref<bool(const CXXRecordDecl *BaseDefinition)>;
1527 bool AllowShortCircuit =
true)
const;
1565 bool LookupInDependent =
false)
const;
1654 std::vector<const NamedDecl *>
1661 void viewInheritance(
ASTContext& Context)
const;
1667 assert(DeclAccess !=
AS_none);
1669 return (PathAccess > DeclAccess ? PathAccess : DeclAccess);
1679 void completeDefinition()
override;
1697 bool mayBeAbstract()
const;
1706 assert(isLambda() &&
"Not a lambda closure type!");
1707 return getLambdaData().ManglingNumber;
1713 assert(isLambda() &&
"Not a lambda closure type!");
1714 return getLambdaData().HasKnownInternalLinkage;
1726 Decl *getLambdaContextDecl()
const;
1731 bool HasKnownInternalLinkage =
false) {
1732 assert(isLambda() &&
"Not a lambda closure type!");
1733 getLambdaData().ManglingNumber = ManglingNumber;
1734 getLambdaData().ContextDecl = ContextDecl;
1735 getLambdaData().HasKnownInternalLinkage = HasKnownInternalLinkage;
1750 bool nullFieldOffsetIsZero()
const;
1768 return isLambda() && getLambdaData().Dependent;
1772 return getLambdaData().MethodTyInfo;
1777 bool isInterfaceLike()
const;
1781 return K >= firstCXXRecord && K <= lastCXXRecord;
1788 llvm::PointerIntPair<Expr *, 2, ExplicitSpecKind> ExplicitSpec{
1794 : ExplicitSpec(Expression, Kind) {}
1802 ExplicitSpec.getPointer();
1818 !ExplicitSpec.getPointer();
1825 return getFromDecl(const_cast<FunctionDecl *>(Function));
1843 void anchor()
override;
1850 :
FunctionDecl(CXXDeductionGuide, C, DC, StartLoc, NameInfo, T, TInfo,
1854 setRangeEnd(EndLocation);
1855 setIsCopyDeductionCandidate(
false);
1880 return getDeclName().getCXXDeductionGuideTemplate();
1884 FunctionDeclBits.IsCopyDeductionCandidate = isCDC;
1888 return FunctionDeclBits.IsCopyDeductionCandidate;
1911 :
Decl(RequiresExprBody, DC, StartLoc),
DeclContext(RequiresExprBody) {}
1932 void anchor()
override;
1940 Expr *TrailingRequiresClause =
nullptr)
1941 :
FunctionDecl(DK, C, RD, StartLoc, NameInfo, T, TInfo, SC, isInline,
1942 ConstexprKind, TrailingRequiresClause) {
1944 setRangeEnd(EndLocation);
1954 Expr *TrailingRequiresClause =
nullptr);
1958 bool isStatic()
const;
1969 return OOK == OO_New || OOK == OO_Array_New || OOK == OO_Delete ||
1970 OOK == OO_Array_Delete;
1995 bool IsAppleKext)
const {
1996 return const_cast<CXXMethodDecl *
>(
this)->getDevirtualizedMethod(
2007 bool isUsualDeallocationFunction(
2012 bool isCopyAssignmentOperator()
const;
2015 bool isMoveAssignmentOperator()
const;
2025 return cast<CXXMethodDecl>(
2038 unsigned size_overridden_methods()
const;
2095 bool hasInlineBody()
const;
2104 bool isLambdaStaticInvoker()
const;
2113 bool MayBeBase =
false);
2117 bool MayBeBase =
false)
const {
2119 ->getCorrespondingMethodInClass(RD, MayBeBase);
2125 bool MayBeBase =
false);
2128 bool MayBeBase =
false)
const {
2130 ->getCorrespondingMethodDeclaredInClass(RD, MayBeBase);
2136 return K >= firstCXXMethod && K <= lastCXXMethod;
2159 llvm::PointerUnion<TypeSourceInfo *, FieldDecl *, IndirectFieldDecl *>
2182 unsigned IsDelegating : 1;
2186 unsigned IsVirtual : 1;
2190 unsigned IsWritten : 1;
2194 unsigned SourceOrder : 13;
2233 return isMemberInitializer() || isIndirectMemberInitializer();
2247 return Init->
getStmtClass() == Stmt::CXXDefaultInitExprClass;
2258 return isBaseInitializer() && MemberOrEllipsisLocation.
isValid();
2263 assert(isPackExpansion() &&
"Initializer is not a pack expansion");
2264 return MemberOrEllipsisLocation;
2270 TypeLoc getBaseClassLoc()
const;
2274 const Type *getBaseClass()
const;
2278 assert(isBaseInitializer() &&
"Must call this on base initializer!");
2292 if (isMemberInitializer())
2298 if (isMemberInitializer())
2300 if (isIndirectMemberInitializer())
2306 if (isIndirectMemberInitializer())
2312 return MemberOrEllipsisLocation;
2328 return IsWritten ?
static_cast<int>(SourceOrder) : -1;
2339 assert(!IsWritten &&
2340 "setSourceOrder() used on implicit initializer");
2341 assert(SourceOrder == 0 &&
2342 "calling twice setSourceOrder() on the same initializer");
2344 "setSourceOrder() used to make an initializer implicit");
2346 SourceOrder =
static_cast<unsigned>(Pos);
2365 : Shadow(Shadow), BaseCtor(BaseCtor) {}
2367 explicit operator bool()
const {
return Shadow; }
2386 ExplicitSpecifier> {
2400 Expr *TrailingRequiresClause);
2402 void anchor()
override;
2404 size_t numTrailingObjects(OverloadToken<InheritedConstructor>)
const {
2405 return CXXConstructorDeclBits.IsInheritingConstructor;
2407 size_t numTrailingObjects(OverloadToken<ExplicitSpecifier>)
const {
2408 return CXXConstructorDeclBits.HasTrailingExplicitSpecifier;
2412 if (CXXConstructorDeclBits.HasTrailingExplicitSpecifier)
2413 return *getTrailingObjects<ExplicitSpecifier>();
2415 nullptr, CXXConstructorDeclBits.IsSimpleExplicit
2422 CXXConstructorDeclBits.HasTrailingExplicitSpecifier) &&
2423 "cannot set this explicit specifier. no trail-allocated space for " 2428 CXXConstructorDeclBits.IsSimpleExplicit = ES.
isExplicit();
2431 enum TraillingAllocKind {
2432 TAKInheritsConstructor = 1,
2433 TAKHasTailExplicit = 1 << 1,
2436 uint64_t getTraillingAllocKind()
const {
2437 return numTrailingObjects(OverloadToken<InheritedConstructor>()) |
2438 (numTrailingObjects(OverloadToken<ExplicitSpecifier>()) << 1);
2454 Expr *TrailingRequiresClause =
nullptr);
2464 bool isExplicit()
const {
return getExplicitSpecifier().isExplicit(); }
2482 const auto *ConstThis =
this;
2491 return init_begin() + getNumCtorInitializers();
2496 return init_begin() + getNumCtorInitializers();
2501 std::reverse_iterator<init_const_iterator>;
2520 return CXXConstructorDeclBits.NumCtorInitializers;
2524 CXXConstructorDeclBits.NumCtorInitializers = numCtorInitializers;
2528 assert(CXXConstructorDeclBits.NumCtorInitializers ==
2529 numCtorInitializers &&
"NumCtorInitializers overflow!");
2533 CtorInitializers = Initializers;
2538 return (getNumCtorInitializers() == 1) &&
2539 init_begin()[0]->isDelegatingInitializer();
2548 bool isDefaultConstructor()
const;
2563 bool isCopyConstructor(
unsigned &TypeQuals)
const;
2569 unsigned TypeQuals = 0;
2570 return isCopyConstructor(TypeQuals);
2578 bool isMoveConstructor(
unsigned &TypeQuals)
const;
2583 unsigned TypeQuals = 0;
2584 return isMoveConstructor(TypeQuals);
2591 bool isCopyOrMoveConstructor(
unsigned &TypeQuals)
const;
2596 return isCopyOrMoveConstructor(Quals);
2602 bool isConvertingConstructor(
bool AllowExplicit)
const;
2607 bool isSpecializationCopyingObject()
const;
2612 return CXXConstructorDeclBits.IsInheritingConstructor;
2618 CXXConstructorDeclBits.IsInheritingConstructor = isIC;
2623 return isInheritingConstructor() ?
2656 Expr *OperatorDeleteThisArg =
nullptr;
2662 Expr *TrailingRequiresClause =
nullptr)
2663 :
CXXMethodDecl(CXXDestructor, C, RD, StartLoc, NameInfo, T, TInfo,
2665 TrailingRequiresClause) {
2669 void anchor()
override;
2676 bool isInline,
bool isImplicitlyDeclared,
2678 Expr *TrailingRequiresClause =
nullptr);
2718 Expr *TrailingRequiresClause =
nullptr)
2719 :
CXXMethodDecl(CXXConversion, C, RD, StartLoc, NameInfo, T, TInfo,
2720 SC_None, isInline, ConstexprKind, EndLocation,
2721 TrailingRequiresClause),
2723 void anchor()
override;
2749 bool isExplicit()
const {
return getExplicitSpecifier().isExplicit(); }
2758 bool isLambdaToBlockPointerConversion()
const;
2779 virtual void anchor();
2808 return static_cast<LanguageIDs>(LinkageSpecDeclBits.Language);
2817 assert(!RBraceLoc.
isValid() || LinkageSpecDeclBits.HasBraces);
2818 return LinkageSpecDeclBits.HasBraces;
2826 LinkageSpecDeclBits.HasBraces = RBraceLoc.
isValid();
2831 return getRBraceLoc();
2834 return decls_empty() ?
getLocation() : decls_begin()->getEndLoc();
2887 NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc),
2888 NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) {}
2898 void anchor()
override;
2918 return NominatedNamespace;
2991 NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc),
2992 QualifierLoc(QualifierLoc), Namespace(Namespace) {}
2994 void anchor()
override;
3016 using redeclarable_base::redecls_begin;
3017 using redeclarable_base::redecls_end;
3018 using redeclarable_base::redecls;
3019 using redeclarable_base::getPreviousDecl;
3020 using redeclarable_base::getMostRecentDecl;
3023 return getFirstDecl();
3026 return getFirstDecl();
3041 if (
auto *AD = dyn_cast<NamespaceAliasDecl>(Namespace))
3042 return AD->getNamespace();
3044 return cast<NamespaceDecl>(Namespace);
3077 public Mergeable<LifetimeExtendedTemporaryDecl> {
3081 Stmt *ExprWithTemporary =
nullptr;
3086 unsigned ManglingNumber;
3090 virtual void anchor();
3095 ExprWithTemporary(Temp), ExtendingDecl(EDecl),
3096 ManglingNumber(Mangling) {}
3103 unsigned Mangling) {
3130 APValue *getOrCreateValue(
bool MayCreate)
const;
3145 return K == Decl::LifetimeExtendedTemporary;
3172 void anchor()
override;
3177 return getNextRedeclaration();
3200 return new (
C, DC)
UsingShadowDecl(UsingShadow, C, DC, Loc, Using, Target);
3208 using redeclarable_base::redecls_begin;
3209 using redeclarable_base::redecls_end;
3210 using redeclarable_base::redecls;
3211 using redeclarable_base::getPreviousDecl;
3212 using redeclarable_base::getMostRecentDecl;
3213 using redeclarable_base::isFirstDecl;
3216 return getFirstDecl();
3219 return getFirstDecl();
3229 assert(ND &&
"Target decl is null!");
3244 return dyn_cast_or_null<UsingShadowDecl>(UsingOrNextShadow);
3249 return K == Decl::UsingShadow || K == Decl::ConstructorUsingShadow;
3278 unsigned IsVirtual : 1;
3282 bool TargetInVirtualBase)
3285 NominatedBaseClassShadowDecl(
3286 dyn_cast<ConstructorUsingShadowDecl>(Target)),
3287 ConstructedBaseClassShadowDecl(NominatedBaseClassShadowDecl),
3288 IsVirtual(TargetInVirtualBase) {
3292 if (NominatedBaseClassShadowDecl &&
3293 NominatedBaseClassShadowDecl->constructsVirtualBase()) {
3294 ConstructedBaseClassShadowDecl =
3295 NominatedBaseClassShadowDecl->ConstructedBaseClassShadowDecl;
3301 :
UsingShadowDecl(ConstructorUsingShadow, C, Empty), IsVirtual(
false) {}
3303 void anchor()
override;
3331 return NominatedBaseClassShadowDecl;
3337 return ConstructedBaseClassShadowDecl;
3347 return cast<CXXRecordDecl>((ConstructedBaseClassShadowDecl
3348 ? ConstructedBaseClassShadowDecl
3385 llvm::PointerIntPair<UsingShadowDecl *, 1, bool> FirstUsingShadow;
3391 UsingLocation(UL), QualifierLoc(QualifierLoc),
3392 DNLoc(NameInfo.
getInfo()), FirstUsingShadow(
nullptr, HasTypenameKeyword) {
3395 void anchor()
override;
3460 return x.Current == y.Current;
3463 return x.Current != y.Current;
3492 bool HasTypenameKeyword);
3527 unsigned NumExpansions;
3532 InstantiatedFrom ? InstantiatedFrom->
getLocation()
3534 InstantiatedFrom ? InstantiatedFrom->
getDeclName()
3536 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3537 std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3538 getTrailingObjects<NamedDecl *>());
3541 void anchor()
override;
3556 return llvm::makeArrayRef(getTrailingObjects<NamedDecl *>(), NumExpansions);
3564 unsigned NumExpansions);
3589 public Mergeable<UnresolvedUsingValueDecl> {
3610 UsingLocation(UsingLoc), EllipsisLoc(EllipsisLoc),
3611 QualifierLoc(QualifierLoc), DNLoc(NameInfo.
getInfo()) {}
3613 void anchor()
override;
3663 return getFirstDecl();
3666 return getFirstDecl();
3686 public Mergeable<UnresolvedUsingTypenameDecl> {
3704 :
TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName,
3706 TypenameLocation(TypenameLoc), EllipsisLoc(EllipsisLoc),
3707 QualifierLoc(QualifierLoc) {}
3709 void anchor()
override;
3752 return getFirstDecl();
3755 return getFirstDecl();
3764 llvm::PointerIntPair<Expr *, 1, bool> AssertExprAndFailed;
3771 :
Decl(StaticAssert, DC, StaticAssertLoc),
3772 AssertExprAndFailed(AssertExpr, Failed), Message(Message),
3773 RParenLoc(RParenLoc) {}
3775 virtual void anchor();
3792 bool isFailed()
const {
return AssertExprAndFailed.getInt(); }
3819 Expr *Binding =
nullptr;
3824 void anchor()
override;
3844 VarDecl *getHoldingVar()
const;
3850 setType(DeclaredType);
3851 this->Binding = Binding;
3873 unsigned NumBindings;
3879 :
VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc,
nullptr, T, TInfo,
3881 NumBindings(Bindings.size()) {
3882 std::uninitialized_copy(Bindings.begin(), Bindings.end(),
3883 getTrailingObjects<BindingDecl *>());
3884 for (
auto *B : Bindings)
3885 B->setDecomposedDecl(
this);
3888 void anchor()
override;
3901 unsigned NumBindings);
3904 return llvm::makeArrayRef(getTrailingObjects<BindingDecl *>(), NumBindings);
3907 void printName(raw_ostream &os)
const override;
3947 GetterId(Getter), SetterId(Setter) {}
3949 void anchor()
override;
3977 #endif // LLVM_CLANG_AST_DECLCXX_H const CXXRecordDecl * getPreviousDecl() const
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
void setSourceOrder(int Pos)
Set the source order of this initializer.
Defines the clang::ASTContext interface.
MSVtorDispMode
In the Microsoft ABI, this controls the placement of virtual displacement members used to implement v...
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
void setImplicit(bool I=true)
Represents a function declaration or definition.
Expr * getInit() const
Get the initializer.
llvm::iterator_range< redecl_iterator > redecl_range
A (possibly-)qualified type.
unsigned getNumCtorInitializers() const
Determine the number of arguments used to initialize the member or base.
bool hasUninitializedReferenceMember() const
Whether this class or any of its subobjects has any members of reference type which would make value-...
bool isStandardLayout() const
Determine whether this class is standard-layout per C++ [class]p7.
static bool classof(const Decl *D)
bool mayBeNonDynamicClass() const
const CXXMethodDecl *const * method_iterator
const DeclarationNameLoc & getInfo() const
unsigned getNumBases() const
Retrieves the number of base classes of this class.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
SourceLocation getLParenLoc() const
static bool classof(const Decl *D)
Iterates through the using shadow declarations associated with this using declaration.
Stmt - This represents one statement.
static bool classofKind(Kind K)
void setInheritingConstructor(bool isIC=true)
State that this is an implicit constructor synthesized to model a call to a constructor inherited fro...
FunctionType - C99 6.7.5.3 - Function Declarators.
static LifetimeExtendedTemporaryDecl * CreateDeserialized(ASTContext &C, unsigned ID)
bool isInClassMemberInitializer() const
Determine whether this initializer is an implicit initializer generated for a field with an initializ...
static bool classof(const Decl *D)
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
static AccessSpecDecl * CreateDeserialized(ASTContext &C, unsigned ID)
C Language Family Type Representation.
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6, C++11 [class.copy]p12)
bool allowConstDefaultInit() const
Determine whether declaring a const variable with this type is ok per core issue 253.
static TemplateSpecializationKind getTemplateSpecializationKind(Decl *D)
Determine what kind of template specialization the given declaration is.
bool hasIrrelevantDestructor() const
Determine whether this class has a destructor which has no semantic effect.
Decl - This represents one declaration (or definition), e.g.
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
SourceLocation getBeginLoc() const LLVM_READONLY
void setAccessSpecifierLoc(SourceLocation ASLoc)
Sets the location of the access specifier.
IdentifierInfo * getGetterId() const
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
bool hasUserDeclaredCopyAssignment() const
Determine whether this class has a user-declared copy assignment operator.
init_const_reverse_iterator init_rend() const
shadow_iterator shadow_end() const
bool isPOD() const
Whether this class is a POD-type (C++ [class]p4)
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
void setPure(bool P=true)
ExplicitSpecifier getExplicitSpecifier()
init_reverse_iterator init_rend()
bool isPackExpansion() const
Determine whether this is a pack expansion.
Decl * getPreviousDecl()
Retrieve the previous declaration that declares the same entity as this declaration, or NULL if there is no previous declaration.
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
ExplicitSpecKind getKind() const
The base class of the type hierarchy.
static bool classof(const Decl *D)
Expr * getOperatorDeleteThisArg() const
const CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext) const
llvm::iterator_range< child_iterator > child_range
Represent a C++ namespace.
std::reverse_iterator< init_iterator > init_reverse_iterator
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
const NamedDecl * getNominatedNamespaceAsWritten() const
SourceLocation getEndLoc() const LLVM_READONLY
bool hasTrivialMoveConstructor() const
Determine whether this class has a trivial move constructor (C++11 [class.copy]p12) ...
AccessSpecifier
A C++ access specifier (public, private, protected), plus the special value "none" which means differ...
const NestedNameSpecifier * Specifier
A container of type source information.
Store information needed for an explicit specifier.
bool hasConstexprNonCopyMoveConstructor() const
Determine whether this class has at least one constexpr constructor other than the copy or move const...
capture_const_range captures() const
StorageDuration
The storage duration for an object (per C++ [basic.stc]).
static bool classof(const Decl *D)
base_class_const_iterator vbases_end() const
bool needsImplicitMoveAssignment() const
Determine whether this class should get an implicit move assignment operator or if any existing speci...
QualType getConversionType() const
Returns the type that this conversion function is converting to.
static bool classofKind(Kind K)
bool hasFriends() const
Determines whether this record has any friends.
Describes the capture of a variable or of this, or of a C++1y init-capture.
Represents a path from a specific derived class (which is not represented as part of the path) to a p...
bool hasUserDeclaredMoveOperation() const
Whether this class has a user-declared move constructor or assignment operator.
unsigned getIdentifierNamespace() const
static bool classof(const Decl *D)
Represents a C++ constructor within a class.
Represents a prvalue temporary that is written into memory so that a reference can bind to it...
bool implicitCopyAssignmentHasConstParam() const
Determine whether an implicit copy assignment operator for this type would have a parameter with a co...
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class...
unsigned Access
Access - Used by C++ decls for the access specifier.
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
static QualType getThisObjectType(ASTContext &C, const FunctionProtoType *FPT, const CXXRecordDecl *Decl)
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
friend bool operator!=(shadow_iterator x, shadow_iterator y)
bool isIndirectMemberInitializer() const
const Expr * getAssertExpr() const
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
Represents a variable declaration or definition.
CXXMethodDecl(Kind DK, ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, ConstexprSpecKind ConstexprKind, SourceLocation EndLocation, Expr *TrailingRequiresClause=nullptr)
static bool classof(const Decl *D)
bool needsImplicitCopyAssignment() const
Determine whether this class needs an implicit copy assignment operator to be lazily declared...
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
bool hasTrivialDefaultConstructor() const
Determine whether this class has a trivial default constructor (C++11 [class.ctor]p5).
Stores a list of template parameters for a TemplateDecl and its derived classes.
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
SourceLocation getEllipsisLoc() const
bool hasDefinition() const
UsingShadowDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
DeclarationNameInfo getNameInfo() const
SourceLocation getRParenLoc() const
reference operator*() const
The collection of all-type qualifiers we support.
static bool classof(const Decl *D)
const FunctionDecl * isLocalClass() const
If the class is a local class [class.local], returns the enclosing function declaration.
bool hasNonTrivialDefaultConstructor() const
Determine whether this class has a non-trivial default constructor (C++11 [class.ctor]p5).
Base wrapper for a particular "section" of type source info.
Represents a struct/union/class.
bool hasTrivialCopyConstructorForCall() const
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
An iterator over the friend declarations of a class.
bool isEmpty() const
Determine whether this is an empty class in the sense of (C++11 [meta.unary.prop]).
Description of a constructor that was inherited from a base class.
DeclarationName getDeclName() const
Get the actual, stored name of the declaration, which may be a special name.
Provides common interface for the Decls that can be redeclared.
One of these records is kept for each identifier that is lexed.
ValueDecl * getExtendingDecl()
CXXRecordDecl * getParent()
Return the parent of this method declaration, which is the class in which this method is defined...
StringLiteral * getMessage()
static bool classof(const Decl *D)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
CXXRecordDecl * getPreviousDecl()
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
A C++ nested-name-specifier augmented with source location information.
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
const ValueDecl * getExtendingDecl() const
static bool classofKind(Kind K)
bool defaultedDefaultConstructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
bool mayBeDynamicClass() const
void setLanguage(LanguageIDs L)
Set the language specified by this linkage specification.
static bool classof(const Decl *D)
Represents a member of a struct/union/class.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
llvm::iterator_range< capture_const_iterator > capture_const_range
const ExplicitSpecifier getExplicitSpecifier() const
This declaration is a friend function.
conversion_iterator conversion_end() const
void startDefinition()
Starts the definition of this tag declaration.
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool isCopyOrMoveConstructor() const
Determine whether this a copy or move constructor.
static bool classofKind(Kind K)
bool hasTrivialMoveAssignment() const
Determine whether this class has a trivial move assignment operator (C++11 [class.copy]p25)
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
The iterator over UnresolvedSets.
static NamespaceDecl * getNamespace(const NestedNameSpecifier *X)
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
static bool classof(const Decl *D)
FieldDecl * getAnonField() const
ExplicitSpecifier(Expr *Expression, ExplicitSpecKind Kind)
bool hasUserDeclaredDestructor() const
Determine whether this class has a user-declared destructor.
method_iterator method_begin() const
Method begin iterator.
static bool classofKind(Kind K)
Represents an access specifier followed by colon ':'.
llvm::iterator_range< init_iterator > init_range
TypeSourceInfo * getLambdaTypeInfo() const
NamespaceAliasDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
llvm::iterator_range< friend_iterator > friend_range
bool hasKnownLambdaInternalLinkage() const
The lambda is known to has internal linkage no matter whether it has name mangling number...
void setImplicitCopyConstructorIsDeleted()
Set that we attempted to declare an implicit copy constructor, but overload resolution failed so we d...
bool hasPrivateFields() const
bool hasProtectedFields() const
static bool classofKind(Kind K)
Represents a C++ using-declaration.
UnresolvedUsingValueDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
ArrayRef< BindingDecl * > bindings() const
bool hasNonLiteralTypeFieldsOrBases() const
Determine whether this class has a non-literal or/ volatile type non-static data member or base class...
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this method.
bool isDelegatingConstructor() const
Determine whether this constructor is a delegating constructor.
bool isBaseVirtual() const
Returns whether the base is virtual or not.
bool hasMoveAssignment() const
Determine whether this class has a move assignment operator.
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
const CXXRecordDecl * getMostRecentNonInjectedDecl() const
bool getInheritConstructors() const
Determine whether this base class's constructors get inherited.
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
bool needsOverloadResolutionForCopyAssignment() const
Determine whether we need to eagerly declare a defaulted copy assignment operator for this class...
NamedDecl * getNominatedNamespaceAsWritten()
bool hasNonTrivialDestructorForCall() const
FunctionDecl * isLocalClass()
MSInheritanceModel
Assigned inheritance model for a class in the MS C++ ABI.
static bool classof(const Decl *D)
Represents a declaration of a type.
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
bool isLambda() const
Determine whether this class describes a lambda function object.
static DeclContext * castToDeclContext(const LinkageSpecDecl *D)
base_class_const_iterator bases_begin() const
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
llvm::iterator_range< init_const_iterator > init_const_range
CXXConversionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool isAnyMemberInitializer() const
base_class_iterator bases_begin()
SourceLocation getExternLoc() const
void setNumCtorInitializers(unsigned numCtorInitializers)
FieldDecl * getAnyMember() const
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
Expr * getTemporaryExpr()
Retrieve the expression to which the temporary materialization conversion was applied.
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
bool hasSimpleCopyConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous copy constructor that ...
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
Represents a linkage specification.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
shadow_iterator shadow_begin() const
bool hasConstexprDefaultConstructor() const
Determine whether this class has a constexpr default constructor.
bool isAbstract() const
Determine whether this class has a pure virtual function.
A binding in a decomposition declaration.
void setKind(ExplicitSpecKind Kind)
init_iterator init_begin()
Retrieve an iterator to the first initializer.
virtual Decl * getMostRecentDeclImpl()
Implementation of getMostRecentDecl(), to be overridden by any subclass that has a redeclaration chai...
virtual Decl * getCanonicalDecl()
Retrieves the "canonical" declaration of the given declaration.
llvm::iterator_range< overridden_cxx_method_iterator > overridden_method_range
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
CXXRecordDecl * getMostRecentNonInjectedDecl()
SourceLocation getRParenLoc() const
llvm::iterator_range< specific_decl_iterator< CXXConstructorDecl > > ctor_range
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
unsigned getLambdaManglingNumber() const
If this is the closure type of a lambda expression, retrieve the number to be used for name mangling ...
bool hasCopyAssignmentWithConstParam() const
Determine whether this class has a copy assignment operator with a parameter type which is a referenc...
CXXConstructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool hasUserProvidedDefaultConstructor() const
Whether this class has a user-provided default constructor per C++11.
InheritedConstructor(ConstructorUsingShadowDecl *Shadow, CXXConstructorDecl *BaseCtor)
A placeholder type used to construct an empty shell of a decl-derived type that will be filled in lat...
CXXRecordDecl * getMostRecentDecl()
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
A little helper class used to produce diagnostics.
llvm::iterator_range< const_child_iterator > const_child_range
init_const_range inits() const
Represents a prototype with parameter type info, e.g.
bool isDynamicClass() const
CXXDestructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static bool classofKind(Kind K)
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
Represents a ValueDecl that came out of a declarator.
static bool classofKind(Kind K)
static bool classof(const Decl *D)
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
ExplicitSpecifier getExplicitSpecifier()
init_reverse_iterator init_rbegin()
LazyOffsetPtr< CXXBaseSpecifier, uint64_t, &ExternalASTSource::GetExternalCXXBaseSpecifiers > LazyCXXBaseSpecifiersPtr
A lazy pointer to a set of CXXBaseSpecifiers.
bool hasTrivialMoveConstructorForCall() const
std::forward_iterator_tag iterator_category
bool isLiteral() const
Determine whether this class is a literal type.
const CXXRecordDecl * getParent() const
Returns the parent of this using shadow declaration, which is the class in which this is declared...
SourceLocation getBeginLoc() const LLVM_READONLY
This declaration is a friend class.
CXXCtorInitializer *const * init_const_iterator
Iterates through the member/base initializer list.
bool hasInheritedConstructor() const
Determine whether this class has a using-declaration that names a user-declared base class constructo...
capture_const_iterator captures_end() const
SourceLocation getBeginLoc() const
Get the begin source location.
static bool classof(const Decl *D)
static bool classofKind(Kind K)
const UnresolvedUsingValueDecl * getCanonicalDecl() const
bool hasUserDeclaredCopyConstructor() const
Determine whether this class has a user-declared copy constructor.
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
Represent the declaration of a variable (in which case it is an lvalue) a function (in which case it ...
const CXXMethodDecl * getCorrespondingMethodDeclaredInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
This represents one expression.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
Defines the clang::LangOptions interface.
const NamespaceDecl * getNominatedNamespace() const
SourceLocation getAliasLoc() const
Returns the location of the alias name, i.e.
ctor_iterator ctor_end() const
Represents the body of a requires-expression.
const CXXConversionDecl * getCanonicalDecl() const
static bool classofKind(Kind K)
base_class_const_range bases() const
bool defaultedMoveConstructorIsDeleted() const
true if a defaulted move constructor for this class would be deleted.
DeclarationNameInfo getNameInfo() const
CXXRecordDecl * getTemplateInstantiationPattern()
const T * castAs() const
Member-template castAs<specific type>.
bool defaultedDestructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
const CXXRecordDecl * getCanonicalDecl() const
Represents a C++ destructor within a class.
init_const_reverse_iterator init_rbegin() const
bool isCopyConstructor() const
Whether this constructor is a copy constructor (C++ [class.copy]p2, which can be used to copy the cla...
const UsingDecl * getCanonicalDecl() const
Stmt::child_range childrenExpr()
bool isCopyDeductionCandidate() const
Defines an enumeration for C++ overloaded operators.
void setRBraceLoc(SourceLocation L)
Decl * getMostRecentDecl()
Retrieve the most recent declaration that declares the same entity as this declaration (which may be ...
bool hasUserDeclaredMoveAssignment() const
Determine whether this class has had a move assignment declared by the user.
bool isPackExpansion() const
Determine whether this is a pack expansion.
DeclContext * getDeclContext()
CXXRecordDecl * getDefinition() const
bool isExplicit() const
Return true if the declartion is already resolved to be explicit.
base_class_iterator vbases_end()
llvm::iterator_range< specific_decl_iterator< CXXMethodDecl > > method_range
static TemplateParameterList * getGenericLambdaTemplateParameterList(LambdaScopeInfo *LSI, Sema &SemaRef)
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
bool hasMoveConstructor() const
Determine whether this class has a move constructor.
const Expr * getExpr() const
const CXXConstructorDecl * getCanonicalDecl() const
bool needsImplicitDestructor() const
Determine whether this class needs an implicit destructor to be lazily declared.
Defines the clang::TypeLoc interface and its subclasses.
bool isTrivial() const
Determine whether this class is considered trivial.
init_const_iterator init_end() const
Retrieve an iterator past the last initializer.
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
bool isPolymorphic() const
Whether this class is polymorphic (C++ [class.virtual]), which means that the class contains or inher...
const CXXMethodDecl * getCanonicalDecl() const
void setInheritConstructors(bool Inherit=true)
Set that this base class's constructors should be inherited.
StorageClass
Storage classes.
const UnresolvedUsingTypenameDecl * getCanonicalDecl() const
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
IdentifierInfo * getSetterId() const
void setTypename(bool TN)
Sets whether the using declaration has 'typename'.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
method_iterator method_end() const
Method past-the-end iterator.
SourceLocation getEnd() const
static bool hasDefinition(const ObjCObjectPointerType *ObjPtr)
void setHasTrivialSpecialMemberForCall()
void setLocation(SourceLocation L)
const ExplicitSpecifier getExplicitSpecifier() const
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs...
bool hasSimpleMoveConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous move constructor that ...
bool hasTrivialCopyConstructor() const
Determine whether this class has a trivial copy constructor (C++ [class.copy]p6, C++11 [class...
Represents a C++ deduction guide declaration.
bool needsImplicitDefaultConstructor() const
Determine if we need to declare a default constructor for this class.
Represents a C++ conversion function within a class.
bool isExplicit() const
Determine whether this specifier is known to correspond to an explicit declaration.
bool hasNonTrivialMoveAssignment() const
Determine whether this class has a non-trivial move assignment operator (C++11 [class.copy]p25)
UsingPackDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
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...
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12) ...
CXXMethodDecl * getMostRecentDecl()
static const ExplicitSpecifier getFromDecl(const FunctionDecl *Function)
const CXXRecordDecl * getMostRecentDecl() const
llvm::iterator_range< shadow_iterator > shadow_range
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
bool hasVariantMembers() const
Determine whether this class has any variant members.
bool isExplicit() const
Return true if the declartion is already resolved to be explicit.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isInjectedClassName() const
Determines whether this declaration represents the injected class name.
SourceLocation getUsingLoc() const
Return the location of the using keyword.
unsigned size_overridden_methods() const
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
const UsingPackDecl * getCanonicalDecl() const
void setColonLoc(SourceLocation CLoc)
Sets the location of the colon.
UnresolvedUsingTypenameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
const NamespaceAliasDecl * getCanonicalDecl() const
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
shadow_iterator(UsingShadowDecl *C)
bool hasTrivialCopyAssignment() const
Determine whether this class has a trivial copy assignment operator (C++ [class.copy]p11, C++11 [class.copy]p25)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
Encodes a location in the source.
bool isPure() const
Whether this virtual function is pure, i.e.
static bool classofKind(Kind K)
redeclarable_base::redecl_iterator redecl_iterator
const CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
A set of all the primary bases for a class.
const StringLiteral * getMessage() const
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
std::ptrdiff_t difference_type
DeclarationName getName() const
getName - Returns the embedded declaration name.
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
std::reverse_iterator< init_const_iterator > init_const_reverse_iterator
APValue * getValue() const
ASTContext & getASTContext() const LLVM_READONLY
Defines several types used to describe C++ lambda expressions that are shared between the parser and ...
Represents a dependent using declaration which was not marked with typename.
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
init_iterator init_end()
Retrieve an iterator past the last initializer.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
llvm::iterator_range< base_class_iterator > base_class_range
void setIsCopyDeductionCandidate(bool isCDC=true)
void setCtorInitializers(CXXCtorInitializer **Initializers)
void setLambdaMangling(unsigned ManglingNumber, Decl *ContextDecl, bool HasKnownInternalLinkage=false)
Set the mangling number and context declaration for a lambda class.
const ExplicitSpecifier getExplicitSpecifier() const
Represents a static or instance method of a struct/union/class.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
static bool classofKind(Kind K)
SourceLocation getIdentLocation() const
Returns the location of this using declaration's identifier.
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
void setImplicitMoveConstructorIsDeleted()
Set that we attempted to declare an implicit move constructor, but overload resolution failed so we d...
static bool classofKind(Kind K)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
llvm::function_ref< bool(const CXXRecordDecl *BaseDefinition)> ForallBasesCallback
Function type used by forallBases() as a callback.
UsingDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
static bool classof(const Decl *D)
RefQualifierKind
The kind of C++11 ref-qualifier associated with a function type.
static bool classof(const Decl *D)
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
static ExplicitSpecifier Invalid()
void setIsParsingBaseSpecifiers()
bool hasNonTrivialMoveConstructorForCall() const
void setImplicitDestructorIsDeleted()
Set that we attempted to declare an implicit destructor, but overload resolution failed so we deleted...
const CXXDestructorDecl * getCanonicalDecl() const
SourceLocation getMemberLocation() const
virtual Decl * getNextRedeclarationImpl()
Returns the next redeclaration or itself if this is the only decl.
Represents a C++11 static_assert declaration.
SourceLocation getEndLoc() const LLVM_READONLY
SourceLocation getRBraceLoc() const
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
SourceLocation getAccessSpecifierLoc() const
The location of the access specifier.
bool defaultedCopyConstructorIsDeleted() const
true if a defaulted copy constructor for this class would be deleted.
int getSourceOrder() const
Return the source position of the initializer, counting from 0.
CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
bool hasInClassInitializer() const
Whether this class has any in-class initializers for non-static data members (including those in anon...
Defines various enumerations that describe declaration and type specifiers.
DeclarationNameLoc - Additional source/type location info for a declaration name. ...
CXXConstructorDecl * getConstructor() const
bool hasSimpleDestructor() const
true if we know for sure that this class has an accessible destructor that is not deleted...
TagTypeKind
The kind of a tag type.
static bool isStaticOverloadedOperator(OverloadedOperatorKind OOK)
Returns true if the given operator is implicitly static in a record context.
bool hasNonTrivialCopyConstructorForCall() const
pointer operator->() const
Dataflow Directional Tag Classes.
bool isExplicit() const
Return true if the declartion is already resolved to be explicit.
unsigned getManglingNumber() const
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
ConstexprSpecKind
Define the kind of constexpr specifier.
bool isValid() const
Return true if this is a valid SourceLocation object.
static bool classof(const Decl *D)
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
The base class of all kinds of template declarations (e.g., class, function, etc.).
static std::string getName(const CallEvent &Call)
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
base_class_const_range vbases() const
bool hasTrivialDestructorForCall() const
Reads an AST files chain containing the contents of a translation unit.
Qualifiers getMethodQualifiers() const
SourceLocation getBaseTypeLoc() const LLVM_READONLY
Get the location at which the base class type was written.
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
Represents a field injected from an anonymous union/struct into the parent scope. ...
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
llvm::iterator_range< base_class_const_iterator > base_class_const_range
A decomposition declaration.
const Expr * getTemporaryExpr() const
bool hasUserDeclaredConstructor() const
Determine whether this class has any user-declared constructors.
IdentifierNamespace
IdentifierNamespace - The different namespaces in which declarations may appear.
Represents a dependent using declaration which was marked with typename.
conversion_iterator conversion_begin() const
The name of a declaration.
StmtClass getStmtClass() const
bool isCXX11StandardLayout() const
Determine whether this class was standard-layout per C++11 [class]p7, specifically using the C++11 ru...
const CXXRecordDecl * getParent() const
Return the parent of this method declaration, which is the class in which this method is defined...
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
DeclarationNameInfo getNameInfo() const
unsigned shadow_size() const
Return the number of shadowed declarations associated with this using declaration.
const NamespaceDecl * getNamespace() const
A mapping from each virtual member function to its set of final overriders.
llvm::iterator_range< redecl_iterator > redecl_range
base_class_const_iterator bases_end() const
base_class_iterator vbases_begin()
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
void setExternLoc(SourceLocation L)
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
specific_decl_iterator - Iterates over a subrange of declarations stored in a DeclContext, providing only those that are of type SpecificDecl (or a class derived from it).
bool hasNonTrivialCopyAssignment() const
Determine whether this class has a non-trivial copy assignment operator (C++ [class.copy]p11, C++11 [class.copy]p25)
bool isMoveConstructor() const
Determine whether this constructor is a move constructor (C++11 [class.copy]p3), which can be used to...
const FunctionDecl * getOperatorDelete() const
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class...
LazyOffsetPtr< Decl, uint32_t, &ExternalASTSource::GetExternalDecl > LazyDeclPtr
A lazy pointer to a declaration.
static AccessSpecifier MergeAccess(AccessSpecifier PathAccess, AccessSpecifier DeclAccess)
Calculates the access of a decl that is reached along a path.
Provides common interface for the Decls that cannot be redeclared, but can be merged if the same decl...
static bool classofKind(Kind K)
static bool classof(const Decl *D)
const CXXMethodDecl * getMostRecentDecl() const
Represents a C++ base or member initializer.
bool isParsingBaseSpecifiers() const
LanguageIDs
Represents the language in a linkage specification.
bool needsOverloadResolutionForMoveAssignment() const
Determine whether we need to eagerly declare a move assignment operator for this class.
IndirectFieldDecl * getIndirectMember() const
ExplicitSpecifier getExplicitSpecifier()
static bool classofKind(Kind K)
base_class_const_iterator vbases_begin() const
static LinkageSpecDecl * castFromDeclContext(const DeclContext *DC)
static UsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target)
const DeclContext * getCommonAncestor() const
APValue - This class implements a discriminated union of [uninitialized] [APSInt] [APFloat]...
Represents a base class of a C++ class.
bool hasTypename() const
Return true if the using declaration has 'typename'.
static bool classofKind(Kind K)
SourceLocation getEndLoc() const LLVM_READONLY
bool needsImplicitCopyConstructor() const
Determine whether this class needs an implicit copy constructor to be lazily declared.
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
X
Add a minimal nested name specifier fixit hint to allow lookup of a tag name from an outer enclosing ...
bool hasMutableFields() const
Determine whether this class, or any of its class subobjects, contains a mutable field.
shadow_range shadows() const
static bool classofKind(Kind K)
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.
Defines the clang::SourceLocation class and associated facilities.
void setImplicitMoveAssignmentIsDeleted()
Set that we attempted to declare an implicit move assignment operator, but overload resolution failed...
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
Represents a C++ struct/union/class.
void setBinding(QualType DeclaredType, Expr *Binding)
Set the binding for this BindingDecl, along with its declared type (which should be a possibly-cv-qua...
bool hasUserDeclaredMoveConstructor() const
Determine whether this class has had a move constructor declared by the user.
bool hasSimpleMoveAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous move assignment operat...
static bool classof(const Decl *D)
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
UsingShadowDecl * getNextUsingShadowDecl() const
The next using shadow declaration contained in the shadow decl chain of the using declaration which i...
An object for streaming information to a record.
void setDecomposedDecl(ValueDecl *Decomposed)
Set the decomposed variable for this BindingDecl.
static bool classofKind(Kind K)
Provides information a specialization of a member of a class template, which may be a member function...
LambdaCaptureDefault getLambdaCaptureDefault() const
bool isDependentLambda() const
Determine whether this lambda expression was known to be dependent at the time it was created...
base_class_iterator bases_end()
friend bool operator==(shadow_iterator x, shadow_iterator y)
shadow_iterator & operator++()
virtual Decl * getPreviousDeclImpl()
Implementation of getPreviousDecl(), to be overridden by any subclass that has a redeclaration chain...
Declaration of a class template.
Writes an AST file containing the contents of a translation unit.
bool isSpecified() const
Determine if the declaration had an explicit specifier of any kind.
bool hasInheritedAssignment() const
Determine whether this class has a using-declaration that names a base class assignment operator...
StringLiteral - This represents a string literal expression, e.g.
Implicit declaration of a temporary that was materialized by a MaterializeTemporaryExpr and lifetime-...
Kind
Lists the kind of concrete classes of Decl.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
ExplicitSpecKind
Define the meaning of possible values of the kind in ExplicitSpecifier.
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
This declaration is a function-local extern declaration of a variable or function.
Expr * getBinding() const
Get the expression to which this declaration is bound.
static bool classof(const Decl *D)
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
bool implicitCopyConstructorHasConstParam() const
Determine whether an implicit copy constructor for this type would have a parameter with a const-qual...
ASTContext::overridden_method_range overridden_method_range
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
capture_const_iterator captures_begin() const
bool needsImplicitMoveConstructor() const
Determine whether this class should get an implicit move constructor or if any existing special membe...
bool hasDirectFields() const
Determine whether this class has direct non-static data members.
An instance of this class represents the declaration of a property member.
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
static DeclarationName getUsingDirectiveName()
Returns the name for all C++ using-directives.
static LifetimeExtendedTemporaryDecl * Create(Expr *Temp, ValueDecl *EDec, unsigned Mangling)
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
shadow_iterator operator++(int)
A trivial tuple used to represent a source range.
static bool classofKind(Kind K)
static bool classof(const Decl *D)
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static bool classofKind(Kind K)
This represents a decl that may have a name.
bool hasCopyConstructorWithConstParam() const
Determine whether this class has a copy constructor with a parameter type which is a reference to a c...
redeclarable_base::redecl_iterator redecl_iterator
void setAccess(AccessSpecifier AS)
Represents a C++ namespace alias.
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
Represents C++ using-directive.
static bool classof(const Decl *D)
bool isAggregate() const
Determine whether this class is an aggregate (C++ [dcl.init.aggr]), which is a class with no user-dec...
SourceLocation getBegin() const
TemplateDecl * getDeducedTemplate() const
Get the template for which this guide performs deduction.
bool isInvalid() const
Determine if the explicit specifier is invalid.
const LangOptions & getLangOpts() const
bool hasDefaultConstructor() const
Determine whether this class has any default constructors.
ctor_iterator ctor_begin() const
base_class_range vbases()
Stmt::const_child_range childrenExpr() const
Declaration of a template function.
void setTargetDecl(NamedDecl *ND)
Sets the underlying declaration which has been brought into the local scope.
SourceLocation getLocation() const
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
Represents a pack of using declarations that a single using-declarator pack-expanded into...
QualType getType() const
Return the type wrapped by this type source info.
static bool isProvablyNotDerivedFrom(Sema &SemaRef, CXXRecordDecl *Record, const BaseSet &Bases)
Determines if the given class is provably not derived from all of the prospective base classes...
const UsingShadowDecl * getCanonicalDecl() const
ConstructorUsingShadowDecl * getShadowDecl() const
static bool classofKind(Kind K)
Defines the LambdaCapture class.
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
CXXRecordDecl * getParent()
bool isInheritingConstructor() const
Determine whether this is an implicit constructor synthesized to model a call to a constructor inheri...
method_range methods() const
QualType getType() const
Retrieves the type of the base class.
bool defaultedDestructorIsDeleted() const
true if a defaulted destructor for this class would be deleted.