clang API Documentation
Represents a static or instance method of a struct/union/class. More...
#include <DeclCXX.h>
Public Types | |
typedef const CXXMethodDecl *const * | method_iterator |
Public Member Functions | |
bool | isStatic () const |
bool | isInstance () const |
bool | isConst () const |
bool | isVolatile () const |
bool | isVirtual () const |
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. | |
bool | isCopyAssignmentOperator () const |
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitly or explicitly. | |
bool | isMoveAssignmentOperator () const |
Determine whether this is a move assignment operator. | |
CXXMethodDecl * | getCanonicalDecl () override |
Retrieves the "canonical" declaration of the given declaration. | |
const CXXMethodDecl * | getCanonicalDecl () const override |
CXXMethodDecl * | getMostRecentDecl () |
Returns the most recent (re)declaration of this declaration. | |
const CXXMethodDecl * | getMostRecentDecl () const |
Returns the most recent (re)declaration of this declaration. | |
bool | isUserProvided () const |
void | addOverriddenMethod (const CXXMethodDecl *MD) |
method_iterator | begin_overridden_methods () const |
method_iterator | end_overridden_methods () const |
unsigned | size_overridden_methods () const |
const CXXRecordDecl * | getParent () const |
CXXRecordDecl * | getParent () |
QualType | getThisType (ASTContext &C) const |
Returns the type of the this pointer. | |
unsigned | getTypeQualifiers () const |
RefQualifierKind | getRefQualifier () const |
Retrieve the ref-qualifier associated with this method. | |
bool | hasInlineBody () const |
bool | isLambdaStaticInvoker () const |
Determine whether this is a lambda closure type's static member function that is used for the result of the lambda's conversion to function pointer (for a lambda with no captures). | |
CXXMethodDecl * | getCorrespondingMethodInClass (const CXXRecordDecl *RD, bool MayBeBase=false) |
Find the method in RD that corresponds to this one. | |
const CXXMethodDecl * | getCorrespondingMethodInClass (const CXXRecordDecl *RD, bool MayBeBase=false) const |
Static Public Member Functions | |
static CXXMethodDecl * | Create (ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, bool isConstexpr, SourceLocation EndLocation) |
static CXXMethodDecl * | CreateDeserialized (ASTContext &C, unsigned ID) |
static bool | isStaticOverloadedOperator (OverloadedOperatorKind OOK) |
static bool | classof (const Decl *D) |
static bool | classofKind (Kind K) |
Protected Member Functions | |
CXXMethodDecl (Kind DK, ASTContext &C, CXXRecordDecl *RD, SourceLocation StartLoc, const DeclarationNameInfo &NameInfo, QualType T, TypeSourceInfo *TInfo, StorageClass SC, bool isInline, bool isConstexpr, SourceLocation EndLocation) |
Represents a static or instance method of a struct/union/class.
In the terminology of the C++ Standard, these are the (static and non-static) member functions, whether virtual or not.
typedef const CXXMethodDecl* const* clang::CXXMethodDecl::method_iterator |
clang::CXXMethodDecl::CXXMethodDecl | ( | Kind | DK, |
ASTContext & | C, | ||
CXXRecordDecl * | RD, | ||
SourceLocation | StartLoc, | ||
const DeclarationNameInfo & | NameInfo, | ||
QualType | T, | ||
TypeSourceInfo * | TInfo, | ||
StorageClass | SC, | ||
bool | isInline, | ||
bool | isConstexpr, | ||
SourceLocation | EndLocation | ||
) | [inline, protected] |
Definition at line 1713 of file DeclCXX.h.
References clang::SourceLocation::isValid(), and clang::FunctionDecl::setRangeEnd().
Referenced by Create(), and CreateDeserialized().
void CXXMethodDecl::addOverriddenMethod | ( | const CXXMethodDecl * | MD | ) |
Definition at line 1547 of file DeclCXX.cpp.
References clang::ASTContext::addOverriddenMethod(), clang::Decl::getASTContext(), getParent(), clang::Decl::isCanonicalDecl(), clang::DeclContext::isDependentContext(), and isVirtual().
Referenced by clang::Sema::AddOverriddenMethods().
Definition at line 1556 of file DeclCXX.cpp.
References clang::Decl::getASTContext(), and clang::ASTContext::overridden_methods_begin().
Referenced by clang::Sema::actOnDelayedExceptionSpecification(), AddMostOverridenMethods(), clang::Sema::CheckConstexprFunctionDecl(), CheckMostOverridenMethods(), clang::Sema::CheckOverrideControl(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), clang::threadSafety::getFirstVirtualDecl(), isVirtual(), MaybeAddOverrideCalls(), recursivelyOverrides(), ReportOverrides(), clang::Sema::SetDeclDeleted(), and clang::ASTDeclWriter::VisitCXXMethodDecl().
static bool clang::CXXMethodDecl::classof | ( | const Decl * | D | ) | [inline, static] |
Reimplemented from clang::FunctionDecl.
Reimplemented in clang::CXXConversionDecl, clang::CXXDestructorDecl, and clang::CXXConstructorDecl.
Definition at line 1873 of file DeclCXX.h.
References classofKind(), and clang::Decl::getKind().
static bool clang::CXXMethodDecl::classofKind | ( | Kind | K | ) | [inline, static] |
Reimplemented from clang::FunctionDecl.
Reimplemented in clang::CXXConversionDecl, clang::CXXDestructorDecl, and clang::CXXConstructorDecl.
Definition at line 1874 of file DeclCXX.h.
Referenced by classof().
CXXMethodDecl * CXXMethodDecl::Create | ( | ASTContext & | C, |
CXXRecordDecl * | RD, | ||
SourceLocation | StartLoc, | ||
const DeclarationNameInfo & | NameInfo, | ||
QualType | T, | ||
TypeSourceInfo * | TInfo, | ||
StorageClass | SC, | ||
bool | isInline, | ||
bool | isConstexpr, | ||
SourceLocation | EndLocation | ||
) | [static] |
Definition at line 1446 of file DeclCXX.cpp.
References AttributeLangSupport::C, and CXXMethodDecl().
Referenced by addFunctionPointerConversion(), CreateNewFunctionDecl(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitMoveAssignment(), clang::Sema::startLambdaDefinition(), clang::TemplateDeclInstantiator::VisitCXXMethodDecl(), and clang::ASTNodeImporter::VisitFunctionDecl().
CXXMethodDecl * CXXMethodDecl::CreateDeserialized | ( | ASTContext & | C, |
unsigned | ID | ||
) | [static] |
Reimplemented from clang::FunctionDecl.
Reimplemented in clang::CXXConversionDecl, clang::CXXDestructorDecl, and clang::CXXConstructorDecl.
Definition at line 1457 of file DeclCXX.cpp.
References AttributeLangSupport::C, CXXMethodDecl(), and clang::SC_None.
Definition at line 1561 of file DeclCXX.cpp.
References clang::Decl::getASTContext(), and clang::ASTContext::overridden_methods_end().
Referenced by clang::Sema::actOnDelayedExceptionSpecification(), AddMostOverridenMethods(), CheckMostOverridenMethods(), clang::Sema::CheckOverrideControl(), clang::threadSafety::getFirstVirtualDecl(), isVirtual(), MaybeAddOverrideCalls(), recursivelyOverrides(), ReportOverrides(), clang::Sema::SetDeclDeleted(), and clang::ASTDeclWriter::VisitCXXMethodDecl().
CXXMethodDecl* clang::CXXMethodDecl::getCanonicalDecl | ( | ) | [inline, override, virtual] |
Retrieves the "canonical" declaration of the given declaration.
Reimplemented from clang::FunctionDecl.
Reimplemented in clang::CXXConstructorDecl.
Definition at line 1778 of file DeclCXX.h.
Referenced by AddMostOverridenMethods(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), CheckMostOverridenMethods(), clang::ASTContext::DeclMustBeEmitted(), clang::Sema::EvaluateImplicitExceptionSpec(), FindHiddenVirtualMethod(), getCanonicalDecl(), getCorrespondingMethodInClass(), clang::threadSafety::getFirstVirtualDecl(), clang::CXXInstanceCall::getInitialStackFrameContents(), isStatic(), isUserProvided(), isVirtual(), MaybeAddOverrideCalls(), clang::ASTContext::overridden_methods_begin(), clang::ASTContext::overridden_methods_end(), clang::ASTContext::overridden_methods_size(), recursivelyOverrides(), and clang::ASTDeclReader::VisitCXXMethodDecl().
const CXXMethodDecl* clang::CXXMethodDecl::getCanonicalDecl | ( | ) | const [inline, override, virtual] |
Reimplemented from clang::FunctionDecl.
Reimplemented in clang::CXXConstructorDecl.
Definition at line 1781 of file DeclCXX.h.
References getCanonicalDecl().
CXXMethodDecl * CXXMethodDecl::getCorrespondingMethodInClass | ( | const CXXRecordDecl * | RD, |
bool | MayBeBase = false |
||
) |
Find the method in RD
that corresponds to this one.
Find if RD
or one of the classes it inherits from override this method. If so, return it. RD
is assumed to be a subclass of the class defining this method (or be the class itself), unless MayBeBase
is set to true.
Definition at line 1404 of file DeclCXX.cpp.
References clang::CXXRecordDecl::bases(), clang::Type::getAs(), clang::CXXRecordDecl::getCanonicalDecl(), getCanonicalDecl(), clang::RecordType::getDecl(), clang::NamedDecl::getDeclName(), clang::CXXRecordDecl::getDestructor(), getParent(), clang::DeclContext::lookup(), and recursivelyOverrides().
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), getCorrespondingMethodInClass(), clang::CXXInstanceCall::getRuntimeDefinition(), and MarkExprReferenced().
const CXXMethodDecl* clang::CXXMethodDecl::getCorrespondingMethodInClass | ( | const CXXRecordDecl * | RD, |
bool | MayBeBase = false |
||
) | const [inline] |
Definition at line 1866 of file DeclCXX.h.
References getCorrespondingMethodInClass().
CXXMethodDecl* clang::CXXMethodDecl::getMostRecentDecl | ( | ) | [inline] |
Returns the most recent (re)declaration of this declaration.
Reimplemented from clang::Redeclarable< FunctionDecl >.
Definition at line 1785 of file DeclCXX.h.
Referenced by getMostRecentDecl(), and clang::ASTDeclWriter::VisitCXXMethodDecl().
const CXXMethodDecl* clang::CXXMethodDecl::getMostRecentDecl | ( | ) | const [inline] |
Returns the most recent (re)declaration of this declaration.
Reimplemented from clang::Redeclarable< FunctionDecl >.
Definition at line 1789 of file DeclCXX.h.
References getMostRecentDecl().
const CXXRecordDecl* clang::CXXMethodDecl::getParent | ( | ) | const [inline] |
Returns the parent of this method declaration, which is the class in which this method is defined.
Reimplemented from clang::DeclContext.
Definition at line 1810 of file DeclCXX.h.
Referenced by clang::Sema::ActOnFunctionDeclarator(), AddImplicitObjectParameterType(), clang::Sema::AddOverloadCandidate(), addOverriddenMethod(), clang::CodeGen::CodeGenTypes::arrangeCXXStructorDeclaration(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::BuildCXXConstructExpr(), clang::Sema::BuildCXXMemberCallExpr(), BuildImplicitBaseInitializer(), BuildImplicitMemberInitializer(), clang::Sema::buildLambdaScope(), clang::Sema::BuildMemInitializer(), clang::CodeGen::CodeGenFunction::CanDevirtualizeMemberFunctionCall(), CanSkipVTablePointerInitialization(), clang::Sema::CheckConstexprFunctionDecl(), clang::Sema::CheckConstructorAccess(), clang::Sema::CheckDelayedMemberExceptionSpecs(), clang::Sema::CheckDestructor(), clang::Sema::CheckDestructorAccess(), clang::Sema::CheckExplicitlyDefaultedSpecialMember(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckOverridingFunctionExceptionSpec(), clang::Sema::CheckPureMethod(), clang::Sema::CodeCompleteConstructorInitializer(), commonEmitCXXMemberOrOperatorCall(), compareConversionFunctions(), clang::Sema::ComputeDefaultedCopyAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedCopyCtorExceptionSpec(), clang::Sema::ComputeDefaultedDefaultCtorExceptionSpec(), clang::Sema::ComputeDefaultedDtorExceptionSpec(), clang::Sema::ComputeDefaultedMoveAssignmentExceptionSpec(), clang::Sema::ComputeDefaultedMoveCtorExceptionSpec(), clang::Sema::ComputeInheritingCtorExceptionSpec(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitCopyConstructor(), clang::Sema::DefineImplicitDefaultConstructor(), clang::Sema::DefineImplicitDestructor(), clang::Sema::DefineImplicitLambdaToBlockPointerConversion(), clang::Sema::DefineImplicitLambdaToFunctionPointerConversion(), clang::Sema::DefineImplicitMoveAssignment(), clang::Sema::DefineImplicitMoveConstructor(), clang::Sema::DefineInheritingConstructor(), clang::InitializationSequence::Diagnose(), DiagnoseBadTarget(), DiagnoseBaseOrMemInitializerOrder(), diagnoseDeprecatedCopyOperation(), clang::Sema::DiagnoseEmptyLookup(), diagnoseInstanceReference(), clang::CodeGen::CodeGenFunction::EmitCtorPrologue(), clang::CodeGen::CodeGenFunction::EmitCXXAggrConstructorCall(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitCXXMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitDelegatingCXXConstructorCall(), clang::CodeGen::CodeGenFunction::EmitDestructorBody(), clang::CodeGen::CodeGenFunction::EmitLambdaDelegatingInvokeBody(), clang::CodeGen::CGCXXABI::EmitMemberPointer(), clang::CodeGen::CodeGenFunction::EmitNewArrayInitializer(), clang::CodeGen::CodeGenFunction::EnterDtorCleanups(), clang::Sema::FindHiddenVirtualMethods(), getCodegenToUse(), getCorrespondingMethodInClass(), GetDiagForGotoScopeDecl(), clang::ento::LikelyFalsePositiveSuppressionBRVisitor::getEndPath(), clang::CXXInstanceCall::getInitialStackFrameContents(), getNonClosureContext(), getParent(), clang::CXXInstanceCall::getRuntimeDefinition(), clang::CodeGen::CGCXXABI::getThisArgumentTypeForMethod(), getThisType(), clang::VTableContextBase::getThunkInfo(), HandleConstructorCall(), clang::Sema::InstantiateMemInitializers(), clang::Expr::isConstantInitializer(), IsConstructorDelegationValid(), isCopyAssignmentOperator(), clang::CXXConstructorDecl::isCopyOrMoveConstructor(), isCXXSharedPtrDtor(), clang::isGenericLambdaCallOperatorSpecialization(), clang::isLambdaCallOperator(), clang::isLambdaConversionOperator(), isLambdaStaticInvoker(), clang::CXXConversionDecl::isLambdaToBlockPointerConversion(), isMoveAssignmentOperator(), clang::CXXConstructorDecl::isSpecializationCopyingObject(), clang::Sema::isSpecialMemberAccessibleForDeletion(), IsStandardConversion(), mayInlineCallKind(), clang::Sema::MergeCXXFunctionDecl(), PerformConstructorInitialization(), clang::Sema::PerformMoveOrCopyInitialization(), clang::Sema::PerformObjectArgumentInitialization(), RebuildLambdaScopeInfo(), recordFixedType(), clang::Sema::SetCtorInitializers(), clang::Sema::SetDeclDefaulted(), clang::Sema::SetDelegatingInitializer(), clang::ASTContext::setNonKeyFunction(), clang::Sema::ShouldDeleteSpecialMember(), SpecializeCorrespondingLambdaCallOperatorAndInvoker(), clang::Sema::SpecialMemberIsTrivial(), clang::CodeGen::CodeGenFunction::StartFunction(), clang::CodeGen::CodeGenModule::TryEmitBaseDestructorAsAlias(), TryStaticMemberPointerUpcast(), clang::FunctionCallFilterCCC::ValidateCandidate(), and InitialOverriddenDefinitionCollector::visit().
CXXRecordDecl* clang::CXXMethodDecl::getParent | ( | ) | [inline] |
Returns the parent of this method declaration, which is the class in which this method is defined.
Reimplemented from clang::DeclContext.
Definition at line 1816 of file DeclCXX.h.
References getParent().
RefQualifierKind clang::CXXMethodDecl::getRefQualifier | ( | ) | const [inline] |
Retrieve the ref-qualifier associated with this method.
In the following example, f()
has an lvalue ref-qualifier, g()
has an rvalue ref-qualifier, and h()
has no ref-qualifier.
struct X { void f() &; void g() &&; void h(); };
Definition at line 1841 of file DeclCXX.h.
References clang::Type::getAs(), and clang::ValueDecl::getType().
Referenced by AddImplicitObjectParameterType(), clang::Sema::IsOverload(), and TryObjectArgumentInitialization().
QualType CXXMethodDecl::getThisType | ( | ASTContext & | C | ) | const |
Returns the type of the this
pointer.
Should only be called for instance (i.e., non-static) methods.
Definition at line 1571 of file DeclCXX.cpp.
References clang::Qualifiers::fromCVRMask(), getParent(), clang::ASTContext::getPointerType(), clang::ASTContext::getQualifiedType(), clang::ASTContext::getTypeDeclType(), getTypeQualifiers(), and isInstance().
Referenced by clang::CodeGen::CGCXXABI::buildThisParam(), checkForConsumableClass(), commonEmitCXXMemberOrOperatorCall(), clang::CodeGen::CodeGenFunction::EmitCallAndReturnForThunk(), clang::CodeGen::CodeGenFunction::EmitCXXConstructorCall(), clang::CodeGen::CGDebugInfo::EmitDeclareOfBlockLiteralArgVariable(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::CodeGen::CodeGenFunction::GenerateCode(), clang::ento::SValBuilder::getCXXThis(), IsInitializerListConstructorConversion(), clang::Sema::PerformObjectArgumentInitialization(), clang::CodeGen::CodeGenFunction::StartThunk(), and clang::consumed::ConsumedStmtVisitor::VisitCXXConstructExpr().
unsigned clang::CXXMethodDecl::getTypeQualifiers | ( | ) | const [inline] |
Definition at line 1826 of file DeclCXX.h.
References clang::Type::getAs(), and clang::ValueDecl::getType().
Referenced by AddImplicitObjectParameterType(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::DefineImplicitCopyAssignment(), clang::Sema::DefineImplicitMoveAssignment(), getThisType(), clang::Sema::IsOverload(), and TryObjectArgumentInitialization().
bool CXXMethodDecl::hasInlineBody | ( | ) | const |
Definition at line 1586 of file DeclCXX.cpp.
References clang::FunctionDecl::getTemplateInstantiationPattern(), clang::FunctionDecl::hasBody(), and clang::FunctionDecl::isOutOfLine().
bool clang::CXXMethodDecl::isConst | ( | ) | const [inline] |
Definition at line 1751 of file DeclCXX.h.
References clang::Type::castAs(), clang::ValueDecl::getType(), and isConst().
Referenced by clang::Sema::ActOnStartOfLambdaDefinition(), clang::Sema::CheckFunctionTemplateSpecialization(), DiagnoseInvalidRedeclaration(), isConst(), clang::LambdaExpr::isMutable(), and RebuildLambdaScopeInfo().
bool CXXMethodDecl::isCopyAssignmentOperator | ( | ) | const |
Determine whether this is a copy-assignment operator, regardless of whether it was declared implicitly or explicitly.
Definition at line 1505 of file DeclCXX.cpp.
References clang::Type::getAs(), clang::Decl::getASTContext(), clang::ASTContext::getCanonicalType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), getParent(), clang::Type::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), and isStatic().
Referenced by clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(), EvaluateUnaryTypeTrait(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::Sema::getSpecialMember(), and isTrivialObjectAssignment().
bool clang::CXXMethodDecl::isInstance | ( | ) | const [inline] |
Definition at line 1737 of file DeclCXX.h.
References isStatic().
Referenced by clang::CodeGen::CodeGenTypes::arrangeCXXMethodDeclaration(), clang::Sema::CheckConstexprFunctionDecl(), clang::Sema::CheckOverrideControl(), commonEmitCXXMemberOrOperatorCall(), clang::Sema::DiagnoseEmptyLookup(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(), clang::CodeGen::CodeGenFunction::EmitSynthesizedCXXCopyCtorCall(), clang::comments::DeclInfo::fill(), clang::CodeGen::CodeGenFunction::GenerateCode(), and getThisType().
bool CXXMethodDecl::isLambdaStaticInvoker | ( | ) | const |
Determine whether this is a lambda closure type's static member function that is used for the result of the lambda's conversion to function pointer (for a lambda with no captures).
The function itself, if used, will have a placeholder body that will be supplied by IR generation to either forward to the function call operator or clone the function call operator.
Definition at line 1597 of file DeclCXX.cpp.
References clang::CXXRecordDecl::getLambdaStaticInvoker(), getParent(), clang::FunctionDecl::getPrimaryTemplate(), clang::FunctionTemplateDecl::getTemplatedDecl(), clang::FunctionDecl::isFunctionTemplateSpecialization(), clang::CXXRecordDecl::isGenericLambda(), clang::CXXRecordDecl::isLambda(), and P.
bool CXXMethodDecl::isMoveAssignmentOperator | ( | ) | const |
Determine whether this is a move assignment operator.
Definition at line 1526 of file DeclCXX.cpp.
References clang::Decl::getASTContext(), clang::ASTContext::getCanonicalType(), clang::FunctionDecl::getDescribedFunctionTemplate(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), getParent(), clang::Type::getPointeeType(), clang::FunctionDecl::getPrimaryTemplate(), clang::ValueDecl::getType(), clang::ASTContext::getTypeDeclType(), clang::ASTContext::hasSameUnqualifiedType(), and isStatic().
Referenced by clang::Sema::AddMethodCandidate(), checkMoveAssignmentForRepeatedMove(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallExpr(), EvaluateUnaryTypeTrait(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::Sema::getSpecialMember(), isTrivialObjectAssignment(), and clang::Sema::ShouldDeleteSpecialMember().
bool CXXMethodDecl::isStatic | ( | ) | const |
Definition at line 1380 of file DeclCXX.cpp.
References getCanonicalDecl(), clang::DeclarationName::getCXXOverloadedOperator(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getStorageClass(), isStaticOverloadedOperator(), and clang::SC_Static.
Referenced by clang::Sema::actOnDelayedExceptionSpecification(), clang::Sema::AddMethodCandidate(), clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckFunctionDeclaration(), CreateNewFunctionDecl(), diagnoseInstanceReference(), isAtLeastAsSpecializedAs(), isCopyAssignmentOperator(), isInstance(), isMoveAssignmentOperator(), clang::Sema::IsOverload(), IsStandardConversion(), clang::Sema::MergeFunctionDecl(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
static bool clang::CXXMethodDecl::isStaticOverloadedOperator | ( | OverloadedOperatorKind | OOK | ) | [inline, static] |
Returns true if the given operator is implicitly static in a record context.
Definition at line 1741 of file DeclCXX.h.
Referenced by isStatic(), and clang::Declarator::isStaticMember().
bool clang::CXXMethodDecl::isUserProvided | ( | ) | const [inline] |
True if this method is user-declared and was not deleted or defaulted on its first declaration.
Definition at line 1795 of file DeclCXX.h.
References getCanonicalDecl(), clang::FunctionDecl::isDefaulted(), and clang::FunctionDecl::isDeleted().
Referenced by checkTrivialSubobjectCall(), findTrivialSpecialMember(), clang::CXXRecordDecl::finishedDefaultedOrDeletedMember(), clang::Sema::MarkFunctionReferenced(), clang::Sema::RequireLiteralType(), and clang::Sema::SpecialMemberIsTrivial().
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.
Definition at line 1463 of file DeclCXX.cpp.
References clang::Decl::getASTContext(), clang::Decl::getDeclContext(), clang::NamedDecl::getDeclName(), clang::FunctionDecl::getNumParams(), clang::FunctionDecl::getOverloadedOperator(), clang::FunctionDecl::getParamDecl(), clang::FunctionDecl::getPrimaryTemplate(), clang::ASTContext::getSizeType(), clang::ValueDecl::getType(), clang::ASTContext::hasSameUnqualifiedType(), and clang::DeclContext::lookup().
bool clang::CXXMethodDecl::isVirtual | ( | ) | const [inline] |
Definition at line 1754 of file DeclCXX.h.
References begin_overridden_methods(), end_overridden_methods(), getCanonicalDecl(), clang::FunctionDecl::isPure(), and clang::FunctionDecl::isVirtualAsWritten().
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::actOnDelayedExceptionSpecification(), addOverriddenMethod(), clang::CodeGen::CodeGenTypes::arrangeMSMemberPointerThunk(), clang::Sema::CheckCompletedCXXClass(), clang::Sema::CheckConstexprFunctionDecl(), clang::Sema::CheckDestructor(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::CheckOverrideControl(), clang::Sema::CheckPureMethod(), clang::CodeGen::CodeGenModule::ConstructAttributeList(), emitCXXDestructor(), clang::CodeGen::CodeGenFunction::EmitCXXOperatorMemberCallee(), clang::CodeGen::CodeGenFunction::EmitFunctionProlog(), EmitObjectDelete(), FindHiddenVirtualMethod(), clang::CXXInstanceCall::getRuntimeDefinition(), GroupNewVirtualOverloads(), MarkExprReferenced(), MaybeAddOverrideCalls(), clang::Sema::ShouldDeleteSpecialMember(), and clang::Sema::SpecialMemberIsTrivial().
bool clang::CXXMethodDecl::isVolatile | ( | ) | const [inline] |
Definition at line 1752 of file DeclCXX.h.
References clang::Type::castAs(), clang::ValueDecl::getType(), and isVolatile().
Referenced by isVolatile().
Definition at line 1566 of file DeclCXX.cpp.
References clang::Decl::getASTContext(), and clang::ASTContext::overridden_methods_size().
Referenced by AddMostOverridenMethods(), CheckMostOverridenMethods(), clang::Sema::DiagnoseAbsenceOfOverrideControl(), InitialOverriddenDefinitionCollector::visit(), and clang::ASTDeclWriter::VisitCXXMethodDecl().