16 #ifndef LLVM_CLANG_AST_DECLCXX_H
17 #define LLVM_CLANG_AST_DECLCXX_H
25 #include "llvm/ADT/DenseMap.h"
26 #include "llvm/ADT/PointerIntPair.h"
27 #include "llvm/Support/Compiler.h"
31 class ClassTemplateDecl;
32 class ClassTemplateSpecializationDecl;
33 class ConstructorUsingShadowDecl;
36 class CXXConstructorDecl;
37 class CXXConversionDecl;
38 class CXXDestructorDecl;
41 class CXXMemberLookupCriteria;
42 class CXXFinalOverriderMap;
43 class CXXIndirectPrimaryBaseSet;
82 return ::clang::AnyFunctionDecl::getFromNamedDecl(
83 static_cast< ::clang::NamedDecl*>(P));
86 enum { NumLowBitsAvailable = 2 };
104 virtual void anchor();
110 :
Decl(AccessSpec, DC, ASLoc), ColonLoc(ColonLoc) {
114 :
Decl(AccessSpec, Empty) { }
169 unsigned Virtual : 1;
175 unsigned BaseOfClass : 1;
185 unsigned InheritConstructors : 1;
198 : Range(R), EllipsisLoc(EllipsisLoc), Virtual(V), BaseOfClass(BC),
199 Access(A), InheritConstructors(
false), BaseTypeInfo(TInfo) { }
226 InheritConstructors = Inherit;
272 enum SpecialMemberFlags {
273 SMF_DefaultConstructor = 0x1,
274 SMF_CopyConstructor = 0x2,
275 SMF_MoveConstructor = 0x4,
276 SMF_CopyAssignment = 0x8,
277 SMF_MoveAssignment = 0x10,
278 SMF_Destructor = 0x20,
282 struct DefinitionData {
286 unsigned UserDeclaredConstructor : 1;
289 unsigned UserDeclaredSpecialMembers : 6;
292 unsigned Aggregate : 1;
295 unsigned PlainOldData : 1;
305 unsigned Polymorphic : 1;
309 unsigned Abstract : 1;
325 unsigned IsStandardLayout : 1;
331 unsigned HasNoNonEmptyBases : 1;
334 unsigned HasPrivateFields : 1;
337 unsigned HasProtectedFields : 1;
340 unsigned HasPublicFields : 1;
343 unsigned HasMutableFields : 1;
347 unsigned HasVariantMembers : 1;
350 unsigned HasOnlyCMembers : 1;
354 unsigned HasInClassInitializer : 1;
361 unsigned HasUninitializedReferenceMember : 1;
365 unsigned HasUninitializedFields : 1;
369 unsigned HasInheritedConstructor : 1;
373 unsigned HasInheritedAssignment : 1;
378 unsigned NeedOverloadResolutionForCopyConstructor : 1;
379 unsigned NeedOverloadResolutionForMoveConstructor : 1;
380 unsigned NeedOverloadResolutionForMoveAssignment : 1;
381 unsigned NeedOverloadResolutionForDestructor : 1;
387 unsigned DefaultedCopyConstructorIsDeleted : 1;
388 unsigned DefaultedMoveConstructorIsDeleted : 1;
389 unsigned DefaultedMoveAssignmentIsDeleted : 1;
390 unsigned DefaultedDestructorIsDeleted : 1;
399 unsigned HasTrivialSpecialMembers : 6;
407 unsigned DeclaredNonTrivialSpecialMembers : 6;
410 unsigned HasIrrelevantDestructor : 1;
414 unsigned HasConstexprNonCopyMoveConstructor : 1;
418 unsigned HasDefaultedDefaultConstructor : 1;
424 unsigned CanPassInRegisters : 1;
428 unsigned DefaultedDefaultConstructorIsConstexpr : 1;
434 unsigned HasConstexprDefaultConstructor : 1;
438 unsigned HasNonLiteralTypeFieldsOrBases : 1;
442 unsigned ComputedVisibleConversions : 1;
446 unsigned UserProvidedDefaultConstructor : 1;
450 unsigned DeclaredSpecialMembers : 6;
454 unsigned ImplicitCopyConstructorCanHaveConstParamForVBase : 1;
455 unsigned ImplicitCopyConstructorCanHaveConstParamForNonVBase : 1;
459 unsigned ImplicitCopyAssignmentHasConstParam : 1;
463 unsigned HasDeclaredCopyConstructorWithConstParam : 1;
467 unsigned HasDeclaredCopyAssignmentWithConstParam : 1;
470 unsigned IsLambda : 1;
473 unsigned IsParsingBaseSpecifiers : 1;
475 unsigned HasODRHash : 1;
518 if (!Bases.isOffset())
519 return Bases.get(
nullptr);
520 return getBasesSlowCase();
525 if (!VBases.isOffset())
526 return VBases.get(
nullptr);
527 return getVBasesSlowCase();
531 return llvm::makeArrayRef(getBases(), NumBases);
534 return llvm::makeArrayRef(getVBases(), NumVBases);
542 struct DefinitionData *DefinitionData;
545 struct LambdaDefinitionData :
public DefinitionData {
549 bool Dependent,
bool IsGeneric,
551 : DefinitionData(D), Dependent(Dependent), IsGenericLambda(IsGeneric),
552 CaptureDefault(CaptureDefault), NumCaptures(0), NumExplicitCaptures(0),
553 ManglingNumber(0), ContextDecl(
nullptr), Captures(
nullptr),
560 PlainOldData =
false;
571 unsigned Dependent : 1;
574 unsigned IsGenericLambda : 1;
577 unsigned CaptureDefault : 2;
580 unsigned NumCaptures : 15;
583 unsigned NumExplicitCaptures : 13;
587 unsigned ManglingNumber;
604 struct DefinitionData *dataPtr()
const {
607 return DefinitionData;
610 struct DefinitionData &data()
const {
611 auto *DD = dataPtr();
612 assert(DD &&
"queried property of class with no definition");
616 struct LambdaDefinitionData &getLambdaData()
const {
619 auto *DD = DefinitionData;
620 assert(DD && DD->IsLambda &&
"queried lambda property of non-lambda class");
621 return static_cast<LambdaDefinitionData&
>(*DD);
633 llvm::PointerUnion<ClassTemplateDecl*, MemberSpecializationInfo*>
634 TemplateOrInstantiation;
648 void addedMember(
Decl *D);
650 void markedVirtualFunctionPure();
679 return cast_or_null<CXXRecordDecl>(
687 return cast<CXXRecordDecl>(
698 auto *DD = DefinitionData ? DefinitionData : dataPtr();
699 return DD ? DD->Definition :
nullptr;
708 bool DelayTypeCreation =
false);
711 bool DependentLambda,
bool IsGeneric,
716 return data().Polymorphic || data().NumVBases != 0;
722 return data().IsParsingBaseSpecifiers;
734 typedef llvm::iterator_range<base_class_const_iterator>
776 typedef llvm::iterator_range<specific_decl_iterator<CXXMethodDecl>>
795 typedef llvm::iterator_range<specific_decl_iterator<CXXConstructorDecl>>
810 typedef llvm::iterator_range<friend_iterator>
friend_range;
819 return data().FirstFriend.isValid();
826 (data().DeclaredSpecialMembers & SMF_CopyConstructor)) &&
827 "this property has not yet been computed by Sema");
828 return data().DefaultedCopyConstructorIsDeleted;
835 (data().DeclaredSpecialMembers & SMF_MoveConstructor)) &&
836 "this property has not yet been computed by Sema");
837 return data().DefaultedMoveConstructorIsDeleted;
842 return !data().DefaultedDestructorIsDeleted;
849 !data().DefaultedCopyConstructorIsDeleted;
856 !data().DefaultedMoveConstructorIsDeleted;
863 !data().DefaultedMoveAssignmentIsDeleted;
870 !data().DefaultedDestructorIsDeleted;
875 return (data().DeclaredSpecialMembers & SMF_DefaultConstructor) ||
884 return !data().UserDeclaredConstructor &&
885 !(data().DeclaredSpecialMembers & SMF_DefaultConstructor) &&
896 return data().UserDeclaredConstructor;
902 return data().UserProvidedDefaultConstructor;
909 return data().UserDeclaredSpecialMembers & SMF_CopyConstructor;
915 return !(data().DeclaredSpecialMembers & SMF_CopyConstructor);
927 if (data().UserDeclaredSpecialMembers &
928 (SMF_MoveConstructor | SMF_MoveAssignment))
930 return data().NeedOverloadResolutionForCopyConstructor;
936 return data().ImplicitCopyConstructorCanHaveConstParamForNonVBase &&
938 data().ImplicitCopyConstructorCanHaveConstParamForVBase);
944 return data().HasDeclaredCopyConstructorWithConstParam ||
955 return data().UserDeclaredSpecialMembers &
956 (SMF_MoveConstructor | SMF_MoveAssignment);
962 return data().UserDeclaredSpecialMembers & SMF_MoveConstructor;
967 return (data().DeclaredSpecialMembers & SMF_MoveConstructor) ||
974 assert((data().DefaultedCopyConstructorIsDeleted ||
976 "Copy constructor should not be deleted");
977 data().DefaultedCopyConstructorIsDeleted =
true;
983 assert((data().DefaultedMoveConstructorIsDeleted ||
985 "move constructor should not be deleted");
986 data().DefaultedMoveConstructorIsDeleted =
true;
992 return !(data().DeclaredSpecialMembers & SMF_MoveConstructor) &&
1002 return data().NeedOverloadResolutionForMoveConstructor;
1010 return data().UserDeclaredSpecialMembers & SMF_CopyAssignment;
1016 return !(data().DeclaredSpecialMembers & SMF_CopyAssignment);
1022 return data().HasMutableFields;
1028 return data().ImplicitCopyAssignmentHasConstParam;
1035 return data().HasDeclaredCopyAssignmentWithConstParam ||
1043 return data().UserDeclaredSpecialMembers & SMF_MoveAssignment;
1048 return (data().DeclaredSpecialMembers & SMF_MoveAssignment) ||
1055 assert((data().DefaultedMoveAssignmentIsDeleted ||
1057 "move assignment should not be deleted");
1058 data().DefaultedMoveAssignmentIsDeleted =
true;
1065 return !(data().DeclaredSpecialMembers & SMF_MoveAssignment) &&
1079 return data().NeedOverloadResolutionForMoveAssignment;
1086 return data().UserDeclaredSpecialMembers & SMF_Destructor;
1092 return !(data().DeclaredSpecialMembers & SMF_Destructor);
1098 return data().NeedOverloadResolutionForDestructor;
1104 auto *DD = DefinitionData;
1105 return DD && DD->IsLambda;
1144 void getCaptureFields(llvm::DenseMap<const VarDecl *, FieldDecl *> &Captures,
1154 return isLambda() ? getLambdaData().Captures :
nullptr;
1199 data().HasUninitializedReferenceMember;
1210 bool isPOD()
const {
return data().PlainOldData; }
1230 return D.HasPublicFields || D.HasProtectedFields || D.HasPrivateFields;
1259 (data().HasTrivialSpecialMembers & SMF_DefaultConstructor);
1265 return (data().DeclaredNonTrivialSpecialMembers & SMF_DefaultConstructor) ||
1267 !(data().HasTrivialSpecialMembers & SMF_DefaultConstructor));
1273 return data().HasConstexprNonCopyMoveConstructor ||
1281 return data().DefaultedDefaultConstructorIsConstexpr &&
1287 return data().HasConstexprDefaultConstructor ||
1295 return data().HasTrivialSpecialMembers & SMF_CopyConstructor;
1301 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyConstructor ||
1309 (data().HasTrivialSpecialMembers & SMF_MoveConstructor);
1315 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveConstructor) ||
1317 !(data().HasTrivialSpecialMembers & SMF_MoveConstructor));
1323 return data().HasTrivialSpecialMembers & SMF_CopyAssignment;
1329 return data().DeclaredNonTrivialSpecialMembers & SMF_CopyAssignment ||
1337 (data().HasTrivialSpecialMembers & SMF_MoveAssignment);
1343 return (data().DeclaredNonTrivialSpecialMembers & SMF_MoveAssignment) ||
1345 !(data().HasTrivialSpecialMembers & SMF_MoveAssignment));
1351 return data().HasTrivialSpecialMembers & SMF_Destructor;
1357 return !(data().HasTrivialSpecialMembers & SMF_Destructor);
1363 return !data().HasUninitializedFields ||
1364 !(data().HasDefaultedDefaultConstructor ||
1374 return data().HasIrrelevantDestructor;
1380 return data().CanPassInRegisters;
1386 data().CanPassInRegisters = CanPass;
1392 return data().HasNonLiteralTypeFieldsOrBases;
1398 return data().HasInheritedConstructor;
1404 return data().HasInheritedAssignment;
1520 return RD->isLocalClass();
1588 typedef llvm::function_ref<bool(const CXXRecordDecl *BaseDefinition)>
1605 bool AllowShortCircuit =
true)
const;
1642 bool LookupInDependent =
false)
const;
1723 std::vector<const NamedDecl *>
1725 llvm::function_ref<
bool(
const NamedDecl *ND)> Filter);
1736 assert(DeclAccess !=
AS_none);
1738 return (PathAccess > DeclAccess ? PathAccess : DeclAccess);
1773 assert(
isLambda() &&
"Not a lambda closure type!");
1774 return getLambdaData().ManglingNumber;
1791 getLambdaData().ManglingNumber = ManglingNumber;
1792 getLambdaData().ContextDecl = ContextDecl;
1807 return !MSInheritanceAttr::hasOnlyOneField(
false,
1828 return isLambda() && getLambdaData().Dependent;
1832 return getLambdaData().MethodTyInfo;
1837 return K >= firstCXXRecord && K <= lastCXXRecord;
1858 void anchor()
override;
1864 :
FunctionDecl(CXXDeductionGuide, C, DC, StartLoc, NameInfo, T, TInfo,
1904 void anchor()
override;
1911 :
FunctionDecl(DK, C, RD, StartLoc, NameInfo, T, TInfo,
1912 SC, isInline, isConstexpr) {
1940 return OOK == OO_New || OOK == OO_Array_New || OOK == OO_Delete ||
1941 OOK == OO_Array_Delete;
1967 bool IsAppleKext)
const {
1992 return cast<CXXMethodDecl>(
2074 bool MayBeBase =
false);
2078 bool MayBeBase =
false)
const {
2086 return K >= firstCXXMethod && K <= lastCXXMethod;
2109 llvm::PointerUnion3<TypeSourceInfo *, FieldDecl *, IndirectFieldDecl *>
2132 unsigned IsDelegating : 1;
2136 unsigned IsVirtual : 1;
2140 unsigned IsWritten : 1;
2144 unsigned SourceOrder : 13;
2194 return Init->
getStmtClass() == Stmt::CXXDefaultInitExprClass;
2211 return MemberOrEllipsisLocation;
2258 return MemberOrEllipsisLocation;
2274 return IsWritten ?
static_cast<int>(SourceOrder) : -1;
2285 assert(!IsWritten &&
2286 "setSourceOrder() used on implicit initializer");
2287 assert(SourceOrder == 0 &&
2288 "calling twice setSourceOrder() on the same initializer");
2290 "setSourceOrder() used to make an initializer implicit");
2292 SourceOrder =
static_cast<unsigned>(Pos);
2311 : Shadow(Shadow), BaseCtor(BaseCtor) {}
2313 explicit operator bool()
const {
return Shadow; }
2332 void anchor()
override;
2338 unsigned NumCtorInitializers : 31;
2343 unsigned IsInheritingConstructor : 1;
2351 :
CXXMethodDecl(CXXConstructor, C, RD, StartLoc, NameInfo, T, TInfo,
2353 CtorInitializers(
nullptr), NumCtorInitializers(0),
2354 IsInheritingConstructor((
bool)Inherited) {
2357 *getTrailingObjects<InheritedConstructor>() = Inherited;
2363 bool InheritsConstructor);
2367 bool isExplicit,
bool isInline,
bool isImplicitlyDeclared,
2387 const auto *ConstThis =
this;
2403 typedef std::reverse_iterator<init_const_iterator>
2423 return NumCtorInitializers;
2427 NumCtorInitializers = numCtorInitializers;
2431 CtorInitializers = Initializers;
2475 unsigned TypeQuals = 0;
2489 unsigned TypeQuals = 0;
2521 return IsInheritingConstructor ? *getTrailingObjects<InheritedConstructor>()
2552 void anchor()
override;
2559 bool isInline,
bool isImplicitlyDeclared)
2560 :
CXXMethodDecl(CXXDestructor, C, RD, StartLoc, NameInfo, T, TInfo,
2562 OperatorDelete(
nullptr) {
2572 bool isImplicitlyDeclared);
2606 void anchor()
override;
2613 :
CXXMethodDecl(CXXConversion, C, RD, StartLoc, NameInfo, T, TInfo,
2614 SC_None, isInline, isConstexpr, EndLocation) {
2667 virtual void anchor();
2681 unsigned Language : 3;
2687 unsigned HasBraces : 1;
2696 Language(lang), HasBraces(HasBraces), ExternLoc(ExternLoc),
2701 SourceLocation ExternLoc,
2714 assert(!RBraceLoc.
isValid() || HasBraces);
2723 HasBraces = RBraceLoc.
isValid();
2759 void anchor()
override;
2790 :
NamedDecl(UsingDirective, DC, IdentLoc, getName()), UsingLoc(UsingLoc),
2791 NamespaceLoc(NamespcLoc), QualifierLoc(QualifierLoc),
2792 NominatedNamespace(Nominated), CommonAncestor(CommonAncestor) { }
2807 return NominatedNamespace;
2863 void anchor()
override;
2885 NamespaceLoc(NamespaceLoc), IdentLoc(IdentLoc),
2886 QualifierLoc(QualifierLoc), Namespace(Namespace) {}
2934 return AD->getNamespace();
2936 return cast<NamespaceDecl>(Namespace);
2979 void anchor()
override;
3009 return new (
C, DC)
UsingShadowDecl(UsingShadow, C, DC, Loc, Using, Target);
3037 assert(ND &&
"Target decl is null!");
3048 return dyn_cast_or_null<UsingShadowDecl>(UsingOrNextShadow);
3053 return K == Decl::UsingShadow || K == Decl::ConstructorUsingShadow;
3071 void anchor()
override;
3087 unsigned IsVirtual : 1;
3091 bool TargetInVirtualBase)
3094 NominatedBaseClassShadowDecl(
3095 dyn_cast<ConstructorUsingShadowDecl>(Target)),
3096 ConstructedBaseClassShadowDecl(NominatedBaseClassShadowDecl),
3097 IsVirtual(TargetInVirtualBase) {
3101 if (NominatedBaseClassShadowDecl &&
3103 ConstructedBaseClassShadowDecl =
3104 NominatedBaseClassShadowDecl->ConstructedBaseClassShadowDecl;
3110 NominatedBaseClassShadowDecl(), ConstructedBaseClassShadowDecl(),
3136 return NominatedBaseClassShadowDecl;
3142 return ConstructedBaseClassShadowDecl;
3152 return cast<CXXRecordDecl>((ConstructedBaseClassShadowDecl
3153 ? ConstructedBaseClassShadowDecl
3184 void anchor()
override;
3201 llvm::PointerIntPair<UsingShadowDecl *, 1, bool> FirstUsingShadow;
3207 UsingLocation(UL), QualifierLoc(QualifierLoc),
3208 DNLoc(NameInfo.
getInfo()), FirstUsingShadow(
nullptr, HasTypenameKeyword) {
3271 return x.Current == y.Current;
3274 return x.Current != y.Current;
3301 bool HasTypenameKeyword);
3334 void anchor()
override;
3341 unsigned NumExpansions;
3346 InstantiatedFrom ? InstantiatedFrom->
getLocation()
3348 InstantiatedFrom ? InstantiatedFrom->
getDeclName()
3350 InstantiatedFrom(InstantiatedFrom), NumExpansions(UsingDecls.size()) {
3351 std::uninitialized_copy(UsingDecls.begin(), UsingDecls.end(),
3352 getTrailingObjects<NamedDecl *>());
3364 return llvm::makeArrayRef(getTrailingObjects<NamedDecl *>(), NumExpansions);
3372 unsigned NumExpansions);
3401 public Mergeable<UnresolvedUsingValueDecl> {
3402 void anchor()
override;
3424 UsingLocation(UsingLoc), EllipsisLoc(EllipsisLoc),
3425 QualifierLoc(QualifierLoc), DNLoc(NameInfo.
getInfo())
3499 public Mergeable<UnresolvedUsingTypenameDecl> {
3500 void anchor()
override;
3517 :
TypeDecl(UnresolvedUsingTypename, DC, TargetNameLoc, TargetName,
3519 TypenameLocation(TypenameLoc), EllipsisLoc(EllipsisLoc),
3520 QualifierLoc(QualifierLoc) { }
3577 virtual void anchor();
3578 llvm::PointerIntPair<Expr *, 1, bool> AssertExprAndFailed;
3585 :
Decl(StaticAssert, DC, StaticAssertLoc),
3586 AssertExprAndFailed(AssertExpr, Failed), Message(Message),
3587 RParenLoc(RParenLoc) { }
3602 bool isFailed()
const {
return AssertExprAndFailed.getInt(); }
3625 void anchor()
override;
3655 this->Binding = Binding;
3675 void anchor()
override;
3678 unsigned NumBindings;
3684 :
VarDecl(Decomposition, C, DC, StartLoc, LSquareLoc,
nullptr, T, TInfo,
3686 NumBindings(Bindings.size()) {
3687 std::uninitialized_copy(Bindings.begin(), Bindings.end(),
3688 getTrailingObjects<BindingDecl *>());
3699 unsigned NumBindings);
3702 return llvm::makeArrayRef(getTrailingObjects<BindingDecl *>(), NumBindings);
3705 void printName(raw_ostream &os)
const override;
3748 GetterId(Getter), SetterId(Setter) {}
VarDecl * getHoldingVar() const
Get the variable (if any) that holds the value of evaluating the binding.
llvm::iterator_range< base_class_iterator > base_class_range
void setSourceOrder(int Pos)
Set the source order of this initializer.
Defines the clang::ASTContext interface.
SourceLocation getEnd() const
bool isExplicitSpecified() const
Whether this deduction guide was declared with the 'explicit' specifier.
StmtClass getStmtClass() const
bool hasFriends() const
Determines whether this record has any friends.
void setImplicit(bool I=true)
FunctionDecl - An instance of this class is created to represent a function declaration or definition...
bool isDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is derived from the class Base.
bool needsImplicitMoveConstructor() const
Determine whether this class should get an implicit move constructor or if any existing special membe...
SourceLocation getIdentLocation() const
Returns the location of this using declaration's identifier.
bool needsOverloadResolutionForDestructor() const
Determine whether we need to eagerly declare a destructor for this class.
MemberSpecializationInfo * getMemberSpecializationInfo() const
If this class is an instantiation of a member class of a class template specialization, retrieves the member specialization information.
A (possibly-)qualified type.
bool isVirtual() const
Determines whether the base class is a virtual base class (or not).
capture_const_range captures() const
static bool classof(const Decl *D)
bool isBaseOfClass() const
Determine whether this base class is a base of a class declared with the 'class' keyword (vs...
QualType getConversionType() const
Returns the type that this conversion function is converting to.
bool hasTrivialDestructor() const
Determine whether this class has a trivial destructor (C++ [class.dtor]p3)
bool isParsingBaseSpecifiers() const
QualType getType() const
Retrieves the type of the base class.
static UnresolvedUsingValueDecl * CreateDeserialized(ASTContext &C, unsigned ID)
method_range methods() const
static bool classof(const Decl *D)
MSInheritanceAttr::Spelling getMSInheritanceModel() const
Returns the inheritance model used for this record.
bool allowConstDefaultInit() const
Determine whether declaring a const variable with this type is ok per core issue 253.
bool isUserProvided() const
True if this method is user-declared and was not deleted or defaulted on its first declaration...
ArrayRef< NamedDecl * > expansions() const
Get the set of using declarations that this pack expanded into.
Iterates through the using shadow declarations associated with this using declaration.
Stmt - This represents one statement.
const UsingDecl * getCanonicalDecl() const
static bool classofKind(Kind K)
FunctionType - C99 6.7.5.3 - Function Declarators.
redeclarable_base::redecl_iterator redecl_iterator
static bool classof(const Decl *D)
llvm::iterator_range< base_class_const_iterator > base_class_const_range
static AccessSpecDecl * CreateDeserialized(ASTContext &C, unsigned ID)
bool isInClassMemberInitializer() const
Determine whether this initializer is an implicit initializer generated for a field with an initializ...
UsingShadowDecl * pointer
bool needsOverloadResolutionForCopyConstructor() const
Determine whether we need to eagerly declare a defaulted copy constructor for this class...
DeclaratorDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL)
Decl - This represents one declaration (or definition), e.g.
void setRangeEnd(SourceLocation E)
capture_const_iterator captures_begin() const
void setAccessSpecifierLoc(SourceLocation ASLoc)
Sets the location of the access specifier.
bool isSpecializationCopyingObject() const
Determine whether this is a member template specialization that would copy the object to itself...
LambdaCaptureDefault
The default, if any, capture method for a lambda expression.
const NamespaceDecl * getNamespace() const
bool hasNonTrivialDestructor() const
Determine whether this class has a non-trivial destructor (C++ [class.dtor]p3)
NamedDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N)
void setPure(bool P=true)
llvm::iterator_range< conversion_iterator > getVisibleConversionFunctions()
Get all conversion functions visible in current class, including conversion function templates...
unsigned getODRHash() const
init_reverse_iterator init_rend()
method_iterator method_begin() const
Method begin iterator.
bool hasDefinition() const
const DiagnosticBuilder & operator<<(const DiagnosticBuilder &DB, const Attr *At)
RefQualifierKind getRefQualifier() const
Retrieve the ref-qualifier associated with this method.
The base class of the type hierarchy.
static bool classof(const Decl *D)
bool hasUserDeclaredMoveOperation() const
Whether this class has a user-declared move constructor or assignment operator.
const FunctionDecl * isLocalClass() const
If the class is a local class [class.local], returns the enclosing function declaration.
friend_range friends() const
bool forallBases(ForallBasesCallback BaseMatches, bool AllowShortCircuit=true) const
Determines if the given callback holds for all the direct or indirect base classes of this type...
SourceLocation getRParenLoc() const
NamespaceDecl - Represent a C++ namespace.
specific_decl_iterator< CXXConstructorDecl > ctor_iterator
Iterator access to constructor members.
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.
bool defaultedDefaultConstructorIsConstexpr() const
Determine whether a defaulted default constructor for this class would be constexpr.
static bool classof(const Decl *D)
Expr * getBinding() const
Get the expression to which this declaration is bound.
SourceLocation getLocEnd() const LLVM_READONLY
static bool classofKind(Kind K)
bool needsImplicitDestructor() const
Determine whether this class needs an implicit destructor to be lazily declared.
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 hasUserDeclaredCopyAssignment() const
Determine whether this class has a user-declared copy assignment operator.
static bool classof(const Decl *D)
Represents a C++ constructor within a class.
float __ovld __cnfn distance(float p0, float p1)
Returns the distance between p0 and p1.
const UnresolvedUsingTypenameDecl * getCanonicalDecl() const
bool isCopyAssignmentOperator() const
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitl...
CXXCtorInitializer(ASTContext &Context, TypeSourceInfo *TInfo, bool IsVirtual, SourceLocation L, Expr *Init, SourceLocation R, SourceLocation EllipsisLoc)
Creates a new base-class initializer.
friend bool operator!=(shadow_iterator x, shadow_iterator y)
FriendDecl - Represents the declaration of a friend entity, which can be a function, a type, or a templated function or type.
VarDecl - An instance of this class is created to represent a variable declaration or definition...
static CXXConversionDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isExplicit, bool isConstexpr, SourceLocation EndLocation)
Expr * getInit() const
Get the initializer.
SourceLocation getRParenLoc() const
void finishedDefaultedOrDeletedMember(CXXMethodDecl *MD)
Indicates that the declaration of a defaulted or deleted special member function is now complete...
static bool classof(const Decl *D)
static bool FindOrdinaryMemberInDependentClasses(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name)
Base-class lookup callback that determines whether there exists a member with the given name...
unsigned getNumCtorInitializers() const
Determine the number of arguments used to initialize the member or base.
llvm::iterator_range< capture_const_iterator > capture_const_range
bool isCLike() const
True if this class is C-like, without C++-specific features, e.g.
static MSPropertyDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T, TypeSourceInfo *TInfo, SourceLocation StartL, IdentifierInfo *Getter, IdentifierInfo *Setter)
QualType getThisType(ASTContext &C) const
Returns the type of the this pointer.
const CXXRecordDecl * getCanonicalDecl() const
NamedDecl * getUnderlyingDecl()
Looks through UsingDecls and ObjCCompatibleAliasDecls for the underlying named decl.
static bool FindOMPReductionMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name)
Base-class lookup callback that determines whether there exists an OpenMP declare reduction member wi...
const CXXRecordDecl * getMostRecentDecl() const
Stores a list of template parameters for a TemplateDecl and its derived classes.
decl_iterator decls_end() const
bool hasNonTrivialMoveAssignment() const
Determine whether this class has a non-trivial move assignment operator (C++11 [class.copy]p25)
llvm::iterator_range< friend_iterator > friend_range
unsigned IsExplicitSpecified
UsingShadowDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static AccessSpecDecl * Create(ASTContext &C, AccessSpecifier AS, DeclContext *DC, SourceLocation ASLoc, SourceLocation ColonLoc)
Represents any kind of function declaration, whether it is a concrete function or a function template...
bool isMoveAssignmentOperator() const
Determine whether this is a move assignment operator.
bool hasMutableFields() const
Determine whether this class, or any of its class subobjects, contains a mutable field.
const CXXRecordDecl * getTemplateInstantiationPattern() const
Retrieve the record declaration from which this record could be instantiated.
const DeclContext * getCommonAncestor() const
std::vector< const NamedDecl * > lookupDependentName(const DeclarationName &Name, llvm::function_ref< bool(const NamedDecl *ND)> Filter)
Performs an imprecise lookup of a dependent name in this class.
bool isBaseInitializer() const
Determine whether this initializer is initializing a base class.
NamedDecl * getTargetDecl() const
Gets the underlying declaration which has been brought into the local scope.
static bool classof(const Decl *D)
bool isPackExpansion() const
Determine whether this is a pack expansion.
bool isUsualDeallocationFunction() const
Determine whether this is a usual deallocation function (C++ [basic.stc.dynamic.deallocation]p2), which is an overloaded delete or delete[] operator with a particular signature.
SourceLocation getEllipsisLoc() const
An UnresolvedSet-like class that might not have been loaded from the external AST source yet...
bool hasTrivialCopyConstructor() const
Determine whether this class has a trivial copy constructor (C++ [class.copy]p6, C++11 [class...
void setTemplateSpecializationKind(TemplateSpecializationKind TSK)
Set the kind of specialization or template instantiation this is.
reference operator*() const
Base wrapper for a particular "section" of type source info.
RecordDecl - Represents a struct/union/class.
ConstructorUsingShadowDecl * getConstructedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the base class for which we don't have an explicit ini...
An iterator over the friend declarations of a class.
Description of a constructor that was inherited from a base class.
Provides common interface for the Decls that can be redeclared.
SourceLocation getLocEnd() const LLVM_READONLY
DeclarationName getName() const
getName - Returns the embedded declaration name.
One of these records is kept for each identifier that is lexed.
MSVtorDispAttr::Mode getMSVtorDispMode() const
Controls when vtordisps will be emitted if this record is used as a virtual base. ...
bool isEmpty() const
Determine whether this is an empty class in the sense of (C++11 [meta.unary.prop]).
method_iterator end_overridden_methods() const
CXXRecordDecl * getParent()
Returns the parent of this method declaration, which is the class in which this method is defined...
StringLiteral * getMessage()
static bool classof(const Decl *D)
const UnresolvedUsingValueDecl * getCanonicalDecl() const
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.
bool isDelegatingConstructor() const
Determine whether this constructor is a delegating constructor.
NamespaceDecl * getNamespace()
Retrieve the namespace declaration aliased by this directive.
static bool classofKind(Kind K)
bool hasNonTrivialCopyConstructor() const
Determine whether this class has a non-trivial copy constructor (C++ [class.copy]p6, C++11 [class.copy]p12)
void setLanguage(LanguageIDs L)
Set the language specified by this linkage specification.
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
static bool classof(const Decl *D)
bool isExplicitSpecified() const
Whether this function is marked as explicit explicitly.
SourceLocation getLocStart() const LLVM_READONLY
QualType getReturnType() const
FieldDecl - An instance of this class is created by Sema::ActOnField to represent a member of a struc...
bool hasInheritedConstructor() const
Determine whether this class has a using-declaration that names a user-declared base class constructo...
CXXConstructorDecl * getTargetConstructor() const
When this constructor delegates to another, retrieve the target.
bool isMemberInitializer() const
Determine whether this initializer is initializing a non-static data member.
bool needsOverloadResolutionForMoveConstructor() const
Determine whether we need to eagerly declare a defaulted move constructor for this class...
UsingShadowDecl * reference
static CXXRecordDecl * CreateDeserialized(const ASTContext &C, unsigned ID)
bool isPure() const
Whether this virtual function is pure, i.e.
void startDefinition()
Starts the definition of this tag declaration.
redecl_iterator redecls_begin() const
unsigned getIdentifierNamespace() const
CXXMethodDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
CXXRecordDecl * getDefinition() const
static bool classofKind(Kind K)
unsigned shadow_size() const
Return the number of shadowed declarations associated with this using declaration.
The iterator over UnresolvedSets.
static UnresolvedUsingTypenameDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation TypenameLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TargetNameLoc, DeclarationName TargetName, SourceLocation EllipsisLoc)
virtual SourceRange getSourceRange() const LLVM_READONLY
Source range that this declaration covers.
static bool classof(const Decl *D)
UsingShadowDecl * value_type
TypeSourceInfo * getLambdaTypeInfo() const
bool hasInClassInitializer() const
Whether this class has any in-class initializers for non-static data members (including those in anon...
static CXXDeductionGuideDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, bool IsExplicit, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, SourceLocation EndLocation)
bool hasNonTrivialDefaultConstructor() const
Determine whether this class has a non-trivial default constructor (C++11 [class.ctor]p5).
const NamedDecl * getNominatedNamespaceAsWritten() const
SourceLocation getNamespaceKeyLocation() const
Returns the location of the namespace keyword.
static bool classofKind(Kind K)
Represents an access specifier followed by colon ':'.
bool needsImplicitCopyAssignment() const
Determine whether this class needs an implicit copy assignment operator to be lazily declared...
void addShadowDecl(UsingShadowDecl *S)
static StaticAssertDecl * CreateDeserialized(ASTContext &C, unsigned ID)
static CXXRecordDecl * CreateLambda(const ASTContext &C, DeclContext *DC, TypeSourceInfo *Info, SourceLocation Loc, bool DependentLambda, bool IsGeneric, LambdaCaptureDefault CaptureDefault)
bool isAnyDestructorNoReturn() const
Returns true if the class destructor, or any implicitly invoked destructors are marked noreturn...
NamespaceAliasDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
CXXBaseSpecifier * base_class_iterator
Iterator that traverses the base classes of a class.
pointer operator->() const
bool hasBraces() const
Determines whether this linkage specification had braces in its syntactic form.
void setImplicitCopyConstructorIsDeleted()
Set that we attempted to declare an implicit copy constructor, but overload resolution failed so we d...
void getIndirectPrimaryBases(CXXIndirectPrimaryBaseSet &Bases) const
Get the indirect primary bases for this class.
static bool classofKind(Kind K)
Represents a C++ using-declaration.
UnresolvedUsingValueDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
bool implicitCopyConstructorHasConstParam() const
Determine whether an implicit copy constructor for this type would have a parameter with a const-qual...
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
friend_iterator friend_end() const
bool isInheritingConstructor() const
Determine whether this is an implicit constructor synthesized to model a call to a constructor inheri...
bool hasMoveConstructor() const
Determine whether this class has a move constructor.
ConstructorUsingShadowDecl * getNominatedBaseClassShadowDecl() const
Get the inheriting constructor declaration for the direct base class from which this using shadow dec...
UsingShadowDecl * getNextRedeclaration() const
unsigned getLambdaManglingNumber() const
If this is the closure type of a lambda expression, retrieve the number to be used for name mangling ...
void completeDefinition() override
Indicates that the definition of this class is now complete.
TypeDecl(Kind DK, DeclContext *DC, SourceLocation L, IdentifierInfo *Id, SourceLocation StartL=SourceLocation())
IdentifierInfo * getSetterId() const
const LangOptions & getLangOpts() const
std::reverse_iterator< init_const_iterator > init_const_reverse_iterator
CXXMethodDecl(Kind DK, ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, bool isConstexpr, SourceLocation EndLocation)
IndirectFieldDecl * getIndirectMember() const
NamedDecl * getAliasedNamespace() const
Retrieve the namespace that this alias refers to, which may either be a NamespaceDecl or a NamespaceA...
SourceLocation getEllipsisLoc() const
For a pack expansion, determine the location of the ellipsis.
const CXXRecordDecl * getParent() const
Returns the parent of this method declaration, which is the class in which this method is defined...
bool isDefaulted() const
Whether this function is defaulted per C++0x.
shadow_iterator shadow_begin() const
const CXXMethodDecl * getMostRecentDecl() const
NamedDecl * getNominatedNamespaceAsWritten()
static UnresolvedUsingTypenameDecl * CreateDeserialized(ASTContext &C, unsigned ID)
FunctionDecl * isLocalClass()
static bool classof(const Decl *D)
bool hasCopyAssignmentWithConstParam() const
Determine whether this class has a copy assignment operator with a parameter type which is a referenc...
bool hasNonLiteralTypeFieldsOrBases() const
Determine whether this class has a non-literal or/ volatile type non-static data member or base class...
TypeDecl - Represents a declaration of a type.
void setLambdaMangling(unsigned ManglingNumber, Decl *ContextDecl)
Set the mangling number and context declaration for a lambda class.
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 isExplicitSpecified() const
Whether this function is marked as explicit explicitly.
static DeclContext * castToDeclContext(const LinkageSpecDecl *D)
const UsingShadowDecl * getCanonicalDecl() const
CXXRecordDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
const Type * getBaseClass() const
If this is a base class initializer, returns the type of the base class.
bool isDelegatingInitializer() const
Determine whether this initializer is creating a delegating constructor.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
NamedDecl * getInstantiatedFromUsingDecl() const
Get the using declaration from which this was instantiated.
CXXConversionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
base_class_iterator bases_begin()
init_const_reverse_iterator init_rbegin() const
SourceLocation getLocEnd() const LLVM_READONLY
void setNumCtorInitializers(unsigned numCtorInitializers)
A C++ lambda expression, which produces a function object (of unspecified type) that can be invoked l...
static NamespaceAliasDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation NamespaceLoc, SourceLocation AliasLoc, IdentifierInfo *Alias, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Namespace)
CXXConstructorDecl * getConstructor() const
Get the constructor or constructor template in the derived class correspnding to this using shadow de...
ArrayRef< BindingDecl * > bindings() const
bool canPassInRegisters() const
Determine whether this class has at least one trivial, non-deleted copy or move constructor.
Represents a linkage specification.
base_class_const_range vbases() const
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
CXXRecordDecl * getNominatedBaseClass() const
Get the base class that was named in the using declaration.
bool isWritten() const
Determine whether this initializer is explicitly written in the source code.
decl_iterator decls_begin() const
A binding in a decomposition declaration.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
bool isLambdaToBlockPointerConversion() const
Determine whether this conversion function is a conversion from a lambda closure type to a block poin...
init_iterator init_begin()
Retrieve an iterator to the first initializer.
bool defaultedCopyConstructorIsDeleted() const
true if a defaulted copy constructor for this class would be deleted.
CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false)
Find the method in RD that corresponds to this one.
shadow_iterator shadow_end() const
SourceLocation getAliasLoc() const
Returns the location of the alias name, i.e.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
bool isAbstract() const
Determine whether this class has a pure virtual function.
SourceLocation getUsingLoc() const
Return the source location of the 'using' keyword.
SourceLocation getLoc() const
getLoc - Returns the main location of the declaration name.
CXXConstructorDecl * getConstructor() const
CXXRecordDecl(Kind K, TagKind TK, const ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl)
static CXXDeductionGuideDecl * CreateDeserialized(ASTContext &C, unsigned ID)
UsingDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
void setBases(CXXBaseSpecifier const *const *Bases, unsigned NumBases)
Sets the base classes of this struct or class.
llvm::iterator_range< redecl_iterator > redecl_range
CXXConstructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool hasConstexprNonCopyMoveConstructor() const
Determine whether this class has at least one constexpr constructor other than the copy or move const...
TypeLoc getBaseClassLoc() const
If this is a base class initializer, returns the type of the base class with location information...
llvm::iterator_range< shadow_iterator > shadow_range
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()
bool hasCopyConstructorWithConstParam() const
Determine whether this class has a copy constructor with a parameter type which is a reference to a c...
A little helper class used to produce diagnostics.
Represents a prototype with parameter type info, e.g.
bool hasIrrelevantDestructor() const
Determine whether this class has a destructor which has no semantic effect.
CXXRecordDecl * getInstantiatedFromMemberClass() const
If this record is an instantiation of a member class, retrieves the member class from which it was in...
SourceLocation getLocStart() const LLVM_READONLY
base_class_const_iterator vbases_end() const
CXXDestructorDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
static bool classofKind(Kind K)
Represents a ValueDecl that came out of a declarator.
bool needsImplicitMoveAssignment() const
Determine whether this class should get an implicit move assignment operator or if any existing speci...
static bool classof(const Decl *D)
FieldDecl * getAnonField() const
init_reverse_iterator init_rbegin()
bool isGenericLambda() const
Determine whether this class describes a generic lambda function object (i.e.
init_const_range inits() const
static StaticAssertDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StaticAssertLoc, Expr *AssertExpr, StringLiteral *Message, SourceLocation RParenLoc, bool Failed)
const CXXMethodDecl *const * method_iterator
static CXXDestructorDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isInline, bool isImplicitlyDeclared)
InheritedConstructor getInheritedConstructor() const
Get the constructor that this inheriting constructor is based on.
const CXXMethodDecl * getCanonicalDecl() const
static bool classof(const Decl *D)
static bool classofKind(Kind K)
bool isMoveConstructor() const
Determine whether this constructor is a move constructor (C++11 [class.copy]p3), which can be used to...
bool isDeleted() const
Whether this function has been deleted.
const LambdaCapture * capture_const_iterator
Represents a shadow constructor declaration introduced into a class by a C++11 using-declaration that...
unsigned getTypeQualifiers() const
ValueDecl - Represent the declaration of a variable (in which case it is an lvalue) a function (in wh...
Expr - This represents one expression.
MSInheritanceAttr::Spelling calculateInheritanceModel() const
Calculate what the inheritance model would be for this class.
bool isExplicit() const
Whether this deduction guide is explicit.
SourceLocation getLParenLoc() const
static bool classofKind(Kind K)
static LinkageSpecDecl * CreateDeserialized(ASTContext &C, unsigned ID)
friend_iterator friend_begin() const
TemplateDecl * getCXXDeductionGuideTemplate() const
If this name is the name of a C++ deduction guide, return the template associated with that name...
CXXRecordDecl * getTemplateInstantiationPattern()
redeclarable_base::redecl_range redecl_range
const CXXBaseSpecifier * base_class_const_iterator
Iterator that traverses the base classes of a class.
llvm::iterator_range< specific_decl_iterator< CXXConstructorDecl > > ctor_range
conversion_iterator conversion_end() const
static UnresolvedUsingValueDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, SourceLocation EllipsisLoc)
Represents a C++ destructor within a class.
std::ptrdiff_t difference_type
base_class_const_iterator bases_begin() const
bool isLiteral() const
Determine whether this class is a literal type.
const CXXMethodDecl * getCorrespondingMethodInClass(const CXXRecordDecl *RD, bool MayBeBase=false) const
void setRBraceLoc(SourceLocation L)
AccessSpecifier getAccessSpecifierAsWritten() const
Retrieves the access specifier as written in the source code (which may mean that no access specifier...
bool isFirstDecl() const
True if this is the first declaration in its redeclaration chain.
DeclContext * getDeclContext()
static bool FindNestedNameSpecifierMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name)
Base-class lookup callback that determines whether there exists a member with the given name that can...
bool hasDirectFields() const
Determine whether this class has direct non-static data members.
base_class_iterator vbases_end()
const CXXDestructorDecl * getCanonicalDecl() const
CXXRecordDecl * getConstructedBaseClass() const
Get the base class whose constructor or constructor shadow declaration is passed the constructor argu...
const CXXConstructorDecl * getCanonicalDecl() const
llvm::function_ref< bool(const CXXRecordDecl *BaseDefinition)> ForallBasesCallback
Function type used by forallBases() as a callback.
bool hasUserDeclaredMoveConstructor() const
Determine whether this class has had a move constructor declared by the user.
llvm::iterator_range< init_iterator > init_range
SourceLocation getMemberLocation() const
bool isExplicit() const
Whether this function is explicit.
void setInheritConstructors(bool Inherit=true)
Set that this base class's constructors should be inherited.
static NamespaceAliasDecl * CreateDeserialized(ASTContext &C, unsigned ID)
static CXXConstructorDecl * CreateDeserialized(ASTContext &C, unsigned ID, bool InheritsConstructor)
StorageClass
Storage classes.
bool isIndirectMemberInitializer() const
std::reverse_iterator< init_iterator > init_reverse_iterator
void setTypename(bool TN)
Sets whether the using declaration has 'typename'.
DeclContext * getParent()
getParent - Returns the containing DeclContext.
init_const_reverse_iterator init_rend() const
static bool FindOrdinaryMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name)
Base-class lookup callback that determines whether there exists a member with the given name...
bool isCopyConstructor() const
Whether this constructor is a copy constructor (C++ [class.copy]p2, which can be used to copy the cla...
void setLocation(SourceLocation L)
CXXMethodDecl * getLambdaCallOperator() const
Retrieve the lambda call operator of the closure type if this is a closure type.
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
DeclarationName getDeclName() const
getDeclName - Get the actual, stored name of the declaration, which may be a special name...
unsigned getNumBases() const
Retrieves the number of base classes of this class.
base_class_const_range bases() const
Represents a C++ deduction guide declaration.
void setDescribedClassTemplate(ClassTemplateDecl *Template)
Represents a C++ conversion function within a class.
static UsingDirectiveDecl * CreateDeserialized(ASTContext &C, unsigned ID)
shadow_range shadows() const
UsingPackDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
bool hasNonTrivialCopyAssignment() const
Determine whether this class has a non-trivial copy assignment operator (C++ [class.copy]p11, C++11 [class.copy]p25)
bool needsOverloadResolutionForCopyAssignment() const
Determine whether we need to eagerly declare a defaulted copy assignment operator for this class...
CXXMethodDecl * getMostRecentDecl()
bool hasUninitializedReferenceMember() const
Whether this class or any of its subobjects has any members of reference type which would make value-...
bool isExplicit() const
Whether this function is explicit.
bool isConstexpr() const
Whether this is a (C++11) constexpr function or constexpr constructor.
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
NamespaceAliasDecl * getFirstDecl()
Return the first declaration of this declaration or itself if this is the only declaration.
bool isVirtualAsWritten() const
Whether this function is marked as virtual explicitly.
static CXXRecordDecl * Create(const ASTContext &C, TagKind TK, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, CXXRecordDecl *PrevDecl=nullptr, bool DelayTypeCreation=false)
DeclarationNameInfo getNameInfo() const
CXXCtorInitializer ** init_iterator
Iterates through the member/base initializer list.
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
const Expr * getAssertExpr() const
TypeLoc getTypeLoc() const
Return the TypeLoc wrapper for the type source info.
redecl_range redecls() const
Returns an iterator range for all the redeclarations of the same decl.
void setColonLoc(SourceLocation CLoc)
Sets the location of the colon.
specific_decl_iterator< CXXMethodDecl > method_iterator
Iterator access to method members.
SourceLocation getExternLoc() const
IdentifierInfo * getGetterId() const
UnresolvedUsingTypenameDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
static UsingShadowDecl * CreateDeserialized(ASTContext &C, unsigned ID)
NamespaceAliasDecl * getPreviousDecl()
Return the previous declaration of this declaration or NULL if this is the first declaration.
const CXXConversionDecl * getCanonicalDecl() const
SourceRange getSourceRange() const LLVM_READONLY
Determine the source range covering the entire initializer.
shadow_iterator(UsingShadowDecl *C)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
static CXXDestructorDecl * CreateDeserialized(ASTContext &C, unsigned ID)
Encodes a location in the source.
void setOperatorDelete(FunctionDecl *OD)
static bool classofKind(Kind K)
static DecompositionDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation LSquareLoc, QualType T, TypeSourceInfo *TInfo, StorageClass S, ArrayRef< BindingDecl * > Bindings)
method_iterator begin_overridden_methods() const
A set of all the primary bases for a class.
FieldDecl * getAnyMember() const
UsingShadowDecl * getNextUsingShadowDecl() const
The next using shadow declaration contained in the shadow decl chain of the using declaration which i...
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
bool isValid() const
Return true if this is a valid SourceLocation object.
bool hasSimpleMoveConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous move constructor that ...
ASTContext & getASTContext() const LLVM_READONLY
unsigned size_overridden_methods() const
bool isPackExpansion() const
Determine whether this base specifier is a pack expansion.
static DecompositionDecl * CreateDeserialized(ASTContext &C, unsigned ID, unsigned NumBindings)
SourceLocation getTargetNameLoc() const
Returns the location of the identifier in the named namespace.
redeclarable_base::redecl_iterator redecl_iterator
Represents a dependent using declaration which was not marked with typename.
bool mayBeAbstract() const
Determine whether this class may end up being abstract, even though it is not yet known to be abstrac...
TagDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
init_iterator init_end()
Retrieve an iterator past the last initializer.
bool hasSimpleCopyConstructor() const
true if we know for sure that this class has a single, accessible, unambiguous copy constructor that ...
const StringLiteral * getMessage() const
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...
UnresolvedSetIterator conversion_iterator
void removeShadowDecl(UsingShadowDecl *S)
void setCtorInitializers(CXXCtorInitializer **Initializers)
std::vector< const UsingDecl * > UsingDecls
Represents a static or instance method of a struct/union/class.
bool needsOverloadResolutionForMoveAssignment() const
Determine whether we need to eagerly declare a move assignment operator for this class.
SourceLocation getSourceLocation() const
Determine the source location of the initializer.
Represents a C++ nested name specifier, such as "\::std::vector<int>::".
void addOverriddenMethod(const CXXMethodDecl *MD)
redecl_iterator redecls_end() const
static bool classofKind(Kind K)
bool isCopyOrMoveConstructor() const
Determine whether this a copy or move constructor.
bool isBaseVirtual() const
Returns whether the base is virtual or not.
bool hasUserProvidedDefaultConstructor() const
Whether this class has a user-provided default constructor per C++11.
bool hasInlineBody() const
void setImplicitMoveConstructorIsDeleted()
Set that we attempted to declare an implicit move constructor, but overload resolution failed so we d...
static bool classofKind(Kind K)
ASTContext::overridden_method_range overridden_method_range
UsingDecl * getCanonicalDecl() override
Retrieves the canonical declaration of this declaration.
static MSPropertyDecl * CreateDeserialized(ASTContext &C, unsigned ID)
SourceLocation getUsingLoc() const
Returns the source location of the 'using' keyword.
FunctionDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass S, bool isInlineSpecified, bool isConstexprSpecified)
static ConstructorUsingShadowDecl * CreateDeserialized(ASTContext &C, unsigned ID)
static bool classof(const Decl *D)
Decl * getLambdaContextDecl() const
Retrieve the declaration that provides additional context for a lambda, when the normal declaration c...
RefQualifierKind
The kind of C++11 ref-qualifier associated with a function type.
static bool classof(const Decl *D)
bool isPackExpansion() const
Determine whether this initializer is a pack expansion.
static ConstructorUsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target, bool IsVirtual)
void setIsParsingBaseSpecifiers()
SourceLocation getBegin() const
const T * castAs() const
Member-template castAs<specific type>.
bool getInheritConstructors() const
Determine whether this base class's constructors get inherited.
void getCaptureFields(llvm::DenseMap< const VarDecl *, FieldDecl * > &Captures, FieldDecl *&ThisCapture) const
For a closure type, retrieve the mapping from captured variables and this to the non-static data memb...
method_iterator method_end() const
Method past-the-end iterator.
bool isVirtuallyDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is virtually derived from the class Base.
Represents a C++11 static_assert declaration.
const UsingPackDecl * getCanonicalDecl() const
int getSourceOrder() const
Return the source position of the initializer, counting from 0.
std::forward_iterator_tag iterator_category
ConstructorUsingShadowDecl * getShadowDecl() const
__PTRDIFF_TYPE__ ptrdiff_t
A signed integer type that is the result of subtracting two pointers.
QualType getType() const
Return the type wrapped by this type source info.
bool hasMoveAssignment() const
Determine whether this class has a move assignment operator.
bool isDynamicClass() const
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
CXXMethodDecl * getLambdaStaticInvoker() const
Retrieve the lambda static invoker, the address of which is returned by the conversion operator...
SourceLocation getUsingLoc() const
Return the location of the using keyword.
CXXBaseSpecifier(SourceRange R, bool V, bool BC, AccessSpecifier A, TypeSourceInfo *TInfo, SourceLocation EllipsisLoc)
ClassTemplateDecl * getDescribedClassTemplate() const
Retrieves the class template that is described by this class declaration.
bool hasTrivialCopyAssignment() const
Determine whether this class has a trivial copy assignment operator (C++ [class.copy]p11, C++11 [class.copy]p25)
bool hasSimpleDestructor() const
true if we know for sure that this class has an accessible destructor that is not deleted...
DeclarationNameLoc - Additional source/type location info for a declaration name. ...
TemplateSpecializationKind getTemplateSpecializationKind() const
Determine whether this particular class is a specialization or instantiation of a class template or m...
TagTypeKind
The kind of a tag type.
TypeSourceInfo * getTypeSourceInfo() const
Returns the declarator information for a base class or delegating initializer.
static bool isStaticOverloadedOperator(OverloadedOperatorKind OOK)
Returns true if the given operator is implicitly static in a record context.
SourceLocation getColonLoc() const
The location of the colon following the access specifier.
NamespaceDecl * getNominatedNamespace()
Returns the namespace nominated by this using-directive.
static LinkageSpecDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation ExternLoc, SourceLocation LangLoc, LanguageIDs Lang, bool HasBraces)
static bool classof(const Decl *D)
bool hasTypename() const
Return true if the using declaration has 'typename'.
static CXXConversionDecl * CreateDeserialized(ASTContext &C, unsigned ID)
bool isAccessDeclaration() const
Return true if it is a C++03 access declaration (no 'using').
DeclContext - This is used only as base class of specific decl types that can act as declaration cont...
AccessSpecifier getAccessSpecifier() const
Returns the access specifier for this base specifier.
The base class of all kinds of template declarations (e.g., class, function, etc.).
OverloadedOperatorKind
Enumeration specifying the different kinds of C++ overloaded operators.
CXXDestructorDecl * getDestructor() const
Returns the destructor decl for this class.
static AnyFunctionDecl getFromNamedDecl(NamedDecl *ND)
const CXXRecordDecl * getPreviousDecl() const
bool isPackExpansion() const
Determine whether this is a pack expansion.
llvm::iterator_range< init_const_iterator > init_const_range
SourceLocation getLocStart() const LLVM_READONLY
bool hasSimpleMoveAssignment() const
true if we know for sure that this class has a single, accessible, unambiguous move assignment operat...
bool hasVariantMembers() const
Determine whether this class has any variant members.
Reads an AST files chain containing the contents of a translation unit.
SourceLocation getBaseTypeLoc() const LLVM_READONLY
Get the location at which the base class type was written.
void setConstructor(NamedDecl *Ctor)
IndirectFieldDecl - An instance of this class is created to represent a field injected from an anonym...
void setUsingLoc(SourceLocation L)
Set the source location of the 'using' keyword.
bool defaultedMoveConstructorIsDeleted() const
true if a defaulted move constructor for this class would be deleted.
DeclContext * getCommonAncestor()
Returns the common ancestor context of this using-directive and its nominated namespace.
void removeConversion(const NamedDecl *Old)
Removes a conversion function from this class.
A decomposition declaration.
llvm::iterator_range< specific_decl_iterator< CXXMethodDecl > > method_range
const NamespaceAliasDecl * getCanonicalDecl() const
IdentifierNamespace
IdentifierNamespace - The different namespaces in which declarations may appear.
LanguageIDs getLanguage() const
Return the language specified by this linkage specification.
Represents a dependent using declaration which was marked with typename.
static UsingDirectiveDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingLoc, SourceLocation NamespaceLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation IdentLoc, NamedDecl *Nominated, DeclContext *CommonAncestor)
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...
bool hasTrivialDefaultConstructor() const
Determine whether this class has a trivial default constructor (C++11 [class.ctor]p5).
DeclarationName - The name of a declaration.
A mapping from each virtual member function to its set of final overriders.
UsingShadowDecl(Kind K, ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target)
bool hasTrivialMoveConstructor() const
Determine whether this class has a trivial move constructor (C++11 [class.copy]p12) ...
static UsingPackDecl * Create(ASTContext &C, DeclContext *DC, NamedDecl *InstantiatedFrom, ArrayRef< NamedDecl * > UsingDecls)
bool hasUserDeclaredMoveAssignment() const
Determine whether this class has had a move assignment declared by the user.
base_class_iterator vbases_begin()
TemplateSpecializationKind
Describes the kind of template specialization that a particular template specialization declaration r...
bool isCurrentInstantiation(const DeclContext *CurContext) const
Determine whether this dependent class is a current instantiation, when viewed from within the given ...
void setExternLoc(SourceLocation L)
FieldDecl * getMember() const
If this is a member initializer, returns the declaration of the non-static data member being initiali...
bool hasAnyDependentBases() const
Determine whether this class has any dependent base classes which are not the current instantiation...
DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the correspnd...
bool hasUserDeclaredCopyConstructor() const
Determine whether this class has a user-declared copy constructor.
bool isLambda() const
Determine whether this class describes a lambda function object.
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).
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...
bool hasTrivialMoveAssignment() const
Determine whether this class has a trivial move assignment operator (C++11 [class.copy]p25)
static bool classofKind(Kind K)
static bool classof(const Decl *D)
const CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext) const
static inline::clang::AnyFunctionDecl getFromVoidPointer(void *P)
redeclarable_base::redecl_range redecl_range
const T * getAs() const
Member-template getAs<specific type>'.
CXXMethodDecl * getDevirtualizedMethod(const Expr *Base, bool IsAppleKext)
If it's possible to devirtualize a call to this method, return the called function.
UsingDecl * getUsingDecl() const
Gets the using declaration to which this declaration is tied.
Represents a C++ base or member initializer.
LanguageIDs
Represents the language in a linkage specification.
bool isConvertingConstructor(bool AllowExplicit) const
Whether this constructor is a converting constructor (C++ [class.conv.ctor]), which can be used for u...
base_class_const_iterator bases_end() const
static CXXMethodDecl * CreateDeserialized(ASTContext &C, unsigned ID)
bool isLambdaStaticInvoker() const
Determine whether this is a lambda closure type's static member function that is used for the result ...
static bool classofKind(Kind K)
static LinkageSpecDecl * castFromDeclContext(const DeclContext *DC)
const DeclarationNameLoc & getInfo() const
static UsingShadowDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation Loc, UsingDecl *Using, NamedDecl *Target)
SourceLocation getRBraceLoc() const
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
bool isTrivial() const
Determine whether this class is considered trivial.
TypeSourceInfo * getTypeSourceInfo() const
Retrieves the type and source location of the base class.
static CXXMethodDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, bool isConstexpr, SourceLocation EndLocation)
NamedDecl * get() const
Retrieve the underlying function or function template.
static bool FindTagMember(const CXXBaseSpecifier *Specifier, CXXBasePath &Path, DeclarationName Name)
Base-class lookup callback that determines whether there exists a tag with the given name...
void setInstantiationOfMemberClass(CXXRecordDecl *RD, TemplateSpecializationKind TSK)
Specify that this record is an instantiation of the member class RD.
AnyFunctionDecl(FunctionDecl *FD)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name of the namespace.
Represents a base class of a C++ class.
bool isAnyMemberInitializer() const
SourceLocation getTypenameLoc() const
Returns the source location of the 'typename' keyword.
TemplateParameterList * getGenericLambdaTemplateParameterList() const
Retrieve the generic lambda's template parameter list.
static BindingDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation IdLoc, IdentifierInfo *Id)
bool isDefaultConstructor() const
Whether this constructor is a default constructor (C++ [class.ctor]p5), which can be used to default-...
static bool classofKind(Kind K)
NestedNameSpecifier * getQualifier() const
Retrieve the nested-name-specifier that qualifies the name.
bool hasNonTrivialMoveConstructor() const
Determine whether this class has a non-trivial move constructor (C++11 [class.copy]p12) ...
static bool classofKind(Kind K)
const NamespaceDecl * getNominatedNamespace() const
ValueDecl(Kind DK, DeclContext *DC, SourceLocation L, DeclarationName N, QualType T)
void setImplicitMoveAssignmentIsDeleted()
Set that we attempted to declare an implicit move assignment operator, but overload resolution failed...
bool isAggregate() const
Determine whether this class is an aggregate (C++ [dcl.init.aggr]), which is a class with no user-dec...
QualType getUnqualifiedType() const
Retrieve the unqualified variant of the given type, removing as little sugar as possible.
Represents a C++ struct/union/class.
bool hasUserDeclaredDestructor() const
Determine whether this class has a user-declared destructor.
bool isTriviallyCopyable() const
Determine whether this class is considered trivially copyable per (C++11 [class]p6).
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 implicitCopyAssignmentHasConstParam() const
Determine whether an implicit copy assignment operator for this type would have a parameter with a co...
ctor_iterator ctor_begin() const
static bool classof(const Decl *D)
bool needsImplicitDefaultConstructor() const
Determine if we need to declare a default constructor for this class.
An object for streaming information to a record.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
static bool classofKind(Kind K)
Provides information a specialization of a member of a class template, which may be a member function...
NestedNameSpecifier * getNestedNameSpecifier() const
Retrieve the nested-name-specifier to which this instance refers.
void printName(raw_ostream &os) const override
TemplateDecl * getDeducedTemplate() const
Get the template for which this guide performs deduction.
base_class_iterator bases_end()
friend bool operator==(shadow_iterator x, shadow_iterator y)
Decl(Kind DK, DeclContext *DC, SourceLocation L)
shadow_iterator & operator++()
static UsingDecl * Create(ASTContext &C, DeclContext *DC, SourceLocation UsingL, NestedNameSpecifierLoc QualifierLoc, const DeclarationNameInfo &NameInfo, bool HasTypenameKeyword)
Declaration of a class template.
static void * getAsVoidPointer(::clang::AnyFunctionDecl F)
Writes an AST file containing the contents of a translation unit.
SourceLocation getAccessSpecifierLoc() const
The location of the access specifier.
SourceLocation getEllipsisLoc() const
Get the location of the ellipsis if this is a pack expansion.
StringLiteral - This represents a string literal expression, e.g.
capture_const_iterator captures_end() const
bool needsImplicitCopyConstructor() const
Determine whether this class needs an implicit copy constructor to be lazily declared.
const FunctionDecl * getOperatorDelete() const
Kind
Lists the kind of concrete classes of Decl.
bool defaultedDestructorIsDeleted() const
true if a defaulted destructor for this class would be deleted.
VarDecl(Kind DK, ASTContext &C, DeclContext *DC, SourceLocation StartLoc, SourceLocation IdLoc, IdentifierInfo *Id, QualType T, TypeSourceInfo *TInfo, StorageClass SC)
static UsingPackDecl * CreateDeserialized(ASTContext &C, unsigned ID, unsigned NumExpansions)
NamespaceAliasDecl * getMostRecentDecl()
Returns the most recent (re)declaration of this declaration.
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name of the namespace, with source-location inf...
bool isStandardLayout() const
Determine whether this class has standard layout per (C++ [class]p7)
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
conversion_iterator conversion_begin() const
bool constructsVirtualBase() const
Returns true if the constructed base class is a virtual base class subobject of this declaration's cl...
bool isDependentLambda() const
Determine whether this lambda expression was known to be dependent at the time it was created...
NamedDecl * getMostRecentDecl()
bool isProvablyNotDerivedFrom(const CXXRecordDecl *Base) const
Determine whether this class is provably not derived from the type Base.
CXXCtorInitializer *const * init_const_iterator
Iterates through the member/base initializer list.
static bool classof(const Decl *D)
NestedNameSpecifierLoc getQualifierLoc() const
Retrieve the nested-name-specifier that qualifies the name, with source-location information.
BasePaths - Represents the set of paths from a derived class to one of its (direct or indirect) bases...
bool hasDefaultConstructor() const
Determine whether this class has any default constructors.
void setCanPassInRegisters(bool CanPass)
Set that we can pass this RecordDecl in registers.
An instance of this class represents the declaration of a property member.
base_class_const_iterator vbases_begin() const
shadow_iterator operator++(int)
ctor_iterator ctor_end() const
A trivial tuple used to represent a source range.
static bool classofKind(Kind K)
SourceLocation getLocation() const
unsigned getNumVBases() const
Retrieves the number of virtual base classes of this class.
FunctionDecl * getCanonicalDecl() override
Retrieves the "canonical" declaration of the given declaration.
static bool classofKind(Kind K)
NamedDecl - This represents a decl with a name.
const CXXRecordDecl * getParent() const
Returns the parent of this using shadow declaration, which is the class in which this is declared...
static DeclarationName getUsingDirectiveName()
getUsingDirectiveName - Return name for all using-directives.
void setAccess(AccessSpecifier AS)
DeclarationNameInfo getNameInfo() const
Represents a C++ namespace alias.
static UsingDecl * CreateDeserialized(ASTContext &C, unsigned ID)
SourceRange getSourceRange() const LLVM_READONLY
Retrieves the source range that contains the entire base specifier.
void getFinalOverriders(CXXFinalOverriderMap &FinaOverriders) const
Retrieve the final overriders for each virtual member function in the class hierarchy where this clas...
Represents C++ using-directive.
bool hasConstexprDefaultConstructor() const
Determine whether this class has a constexpr default constructor.
bool isPolymorphic() const
Whether this class is polymorphic (C++ [class.virtual]), which means that the class contains or inher...
LambdaCaptureDefault getLambdaCaptureDefault() const
bool nullFieldOffsetIsZero() const
In the Microsoft C++ ABI, use zero for the field offset of a null data member pointer if we can guara...
static BindingDecl * CreateDeserialized(ASTContext &C, unsigned ID)
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...
void setType(QualType newType)
static CXXConstructorDecl * Create(ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, bool isExplicit, bool isInline, bool isImplicitlyDeclared, bool isConstexpr, InheritedConstructor Inherited=InheritedConstructor())
llvm::iterator_range< overridden_cxx_method_iterator > overridden_method_range
bool hasInheritedAssignment() const
Determine whether this class has a using-declaration that names a base class assignment operator...
init_const_iterator init_end() const
Retrieve an iterator past the last initializer.
base_class_range vbases()
overridden_method_range overridden_methods() const
Declaration of a template function.
void setTargetDecl(NamedDecl *ND)
Sets the underlying declaration which has been brought into the local scope.
void pushFriendDecl(FriendDecl *FD)
Represents a shadow declaration introduced into a scope by a (resolved) using declaration.
SourceLocation getNamespaceLoc() const
Returns the location of the namespace keyword.
Represents a pack of using declarations that a single using-declarator pack-expanded into...
bool hasUserDeclaredConstructor() const
Determine whether this class has any user-declared constructors.
Defines the LambdaCapture class.
void viewInheritance(ASTContext &Context) const
Renders and displays an inheritance diagram for this C++ class and all of its base classes (transitiv...
SourceRange getSourceRange() const override LLVM_READONLY
Source range that this declaration covers.
CXXRecordDecl * getParent()
DeclarationNameInfo getNameInfo() const
bool isPOD() const
Whether this class is a POD-type (C++ [class]p4)