clang 20.0.0git
|
DeclarationNameTable is used to store and retrieve DeclarationName instances for the various kinds of declaration names, e.g., normal identifiers, C++ constructor names, etc. More...
#include "clang/AST/DeclarationName.h"
Public Member Functions | |
DeclarationNameTable (const ASTContext &C) | |
DeclarationNameTable (const DeclarationNameTable &)=delete | |
DeclarationNameTable & | operator= (const DeclarationNameTable &)=delete |
DeclarationNameTable (DeclarationNameTable &&)=delete | |
DeclarationNameTable & | operator= (DeclarationNameTable &&)=delete |
~DeclarationNameTable ()=default | |
DeclarationName | getIdentifier (const IdentifierInfo *ID) |
Create a declaration name that is a simple identifier. | |
DeclarationName | getCXXConstructorName (CanQualType Ty) |
Returns the name of a C++ constructor for the given Type. | |
DeclarationName | getCXXDestructorName (CanQualType Ty) |
Returns the name of a C++ destructor for the given Type. | |
DeclarationName | getCXXDeductionGuideName (TemplateDecl *TD) |
Returns the name of a C++ deduction guide for the given template. | |
DeclarationName | getCXXConversionFunctionName (CanQualType Ty) |
Returns the name of a C++ conversion function for the given Type. | |
DeclarationName | getCXXSpecialName (DeclarationName::NameKind Kind, CanQualType Ty) |
Returns a declaration name for special kind of C++ name, e.g., for a constructor, destructor, or conversion function. | |
DeclarationName | getCXXOperatorName (OverloadedOperatorKind Op) |
Get the name of the overloadable C++ operator corresponding to Op. | |
DeclarationName | getCXXLiteralOperatorName (const IdentifierInfo *II) |
Get the name of the literal operator function with II as the identifier. | |
DeclarationNameTable is used to store and retrieve DeclarationName instances for the various kinds of declaration names, e.g., normal identifiers, C++ constructor names, etc.
This class contains uniqued versions of each of the C++ special names, which can be retrieved using its member functions (e.g., getCXXConstructorName).
Definition at line 577 of file DeclarationName.h.
DeclarationNameTable::DeclarationNameTable | ( | const ASTContext & | C | ) |
Definition at line 282 of file DeclarationName.cpp.
References clang::NUM_OVERLOADED_OPERATORS.
|
delete |
|
delete |
|
default |
DeclarationName DeclarationNameTable::getCXXConstructorName | ( | CanQualType | Ty | ) |
Returns the name of a C++ constructor for the given Type.
Definition at line 304 of file DeclarationName.cpp.
References clang::CanQual< T >::getAsOpaquePtr(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitMoveConstructor(), getConstructors(), getCXXSpecialName(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::Sema::LookupConstructors(), and clang::Sema::LookupSpecialMember().
DeclarationName DeclarationNameTable::getCXXConversionFunctionName | ( | CanQualType | Ty | ) |
Returns the name of a C++ conversion function for the given Type.
Definition at line 337 of file DeclarationName.cpp.
References clang::CanQual< T >::getAsOpaquePtr().
Referenced by addBlockPointerConversion(), addFunctionPointerConversion(), getCXXSpecialName(), clang::Sema::GetNameFromUnqualifiedId(), and clang::ASTImporter::Import().
DeclarationName DeclarationNameTable::getCXXDeductionGuideName | ( | TemplateDecl * | TD | ) |
Returns the name of a C++ deduction guide for the given template.
Definition at line 289 of file DeclarationName.cpp.
References clang::Decl::getCanonicalDecl().
Referenced by clang::Sema::DeduceTemplateSpecializationFromInitializer(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::TreeTransform< Derived >::TransformDeclarationNameInfo(), and clang::ASTDeclWriter::VisitClassTemplateDecl().
DeclarationName DeclarationNameTable::getCXXDestructorName | ( | CanQualType | Ty | ) |
Returns the name of a C++ destructor for the given Type.
Definition at line 320 of file DeclarationName.cpp.
References clang::CanQual< T >::getAsOpaquePtr(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by clang::Sema::AddOverriddenMethods(), clang::Sema::CheckFunctionDeclaration(), clang::Sema::DeclareImplicitDestructor(), getCXXSpecialName(), clang::CXXRecordDecl::getDestructor(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::TreeTransform< Derived >::RebuildCXXPseudoDestructorExpr(), and clang::TemplateDeclInstantiator::VisitCXXMethodDecl().
DeclarationName DeclarationNameTable::getCXXLiteralOperatorName | ( | const IdentifierInfo * | II | ) |
Get the name of the literal operator function with II as the identifier.
Definition at line 368 of file DeclarationName.cpp.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), BuildCookedLiteralOperatorCall(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), and clang::Sema::isTemplateName().
|
inline |
Get the name of the overloadable C++ operator corresponding to Op.
Definition at line 649 of file DeclarationName.h.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::ActOnCXXFoldExpr(), clang::Sema::AddMemberOperatorCandidates(), clang::TemplateDeclInstantiator::adjustForRewrite(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildOperatorCoawaitLookupExpr(), clang::Sema::BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), clang::Sema::CreateLambdaCallOperator(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitMoveAssignment(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::Sema::FindDeallocationFunctionForDestructor(), findDeleteForPromise(), findImplicitlyDeclaredEqualityComparisons(), getLambdaCallOperatorHelper(), clang::ASTContext::getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), clang::Sema::LookupOverloadedBinOp(), clang::Sema::LookupOverloadedOperatorName(), clang::Sema::LookupSpecialMember(), resolveAllocationOverload(), resolveBuiltinNewDeleteOverload(), shouldAddReversedEqEq(), clang::Sema::ShouldDeleteSpecialMember(), and threadSafetyCheckIsSmartPointer().
DeclarationName DeclarationNameTable::getCXXSpecialName | ( | DeclarationName::NameKind | Kind, |
CanQualType | Ty | ||
) |
Returns a declaration name for special kind of C++ name, e.g., for a constructor, destructor, or conversion function.
Kind must be one of:
Definition at line 353 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, getCXXConstructorName(), getCXXConversionFunctionName(), and getCXXDestructorName().
Referenced by clang::TreeTransform< Derived >::TransformDeclarationNameInfo().
|
inline |
Create a declaration name that is a simple identifier.
Definition at line 623 of file DeclarationName.h.
References ID.
Referenced by clang::ASTContext::getNameForTemplate(), hasMember(), isImplicitMapperNeeded(), and processImplicitMapsWithDefaultMappers().
|
delete |
|
delete |