class DeclarationNameTable
Declaration
class DeclarationNameTable { /* full declaration omitted */ };
Description
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).
Declared at: clang/include/clang/AST/DeclarationName.h:576
Member Variables
- private const clang::ASTContext& Ctx
- Used to allocate elements in the FoldingSets below.
- private llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXConstructorNames
- Manage the uniqued CXXSpecialNameExtra representing C++ constructors. getCXXConstructorName and getCXXSpecialName can be used to obtain a DeclarationName from the corresponding type of the constructor.
- private llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXDestructorNames
- Manage the uniqued CXXSpecialNameExtra representing C++ destructors. getCXXDestructorName and getCXXSpecialName can be used to obtain a DeclarationName from the corresponding type of the destructor.
- private llvm::FoldingSet<detail::CXXSpecialNameExtra> CXXConversionFunctionNames
- Manage the uniqued CXXSpecialNameExtra representing C++ conversion functions. getCXXConversionFunctionName and getCXXSpecialName can be used to obtain a DeclarationName from the corresponding type of the conversion function.
- private detail::CXXOperatorIdName[46] CXXOperatorNames
- Manage the uniqued CXXOperatorIdName, which contain extra information for the name of overloaded C++ operators. getCXXOperatorName can be used to obtain a DeclarationName from the operator kind.
- private llvm::FoldingSet<detail::CXXLiteralOperatorIdName> CXXLiteralOperatorNames
- Manage the uniqued CXXLiteralOperatorIdName, which contain extra information for the name of C++ literal operators. getCXXLiteralOperatorName can be used to obtain a DeclarationName from the corresponding IdentifierInfo.
- private llvm::FoldingSet< detail::CXXDeductionGuideNameExtra> CXXDeductionGuideNames
- Manage the uniqued CXXDeductionGuideNameExtra, which contain extra information for the name of a C++ deduction guide. getCXXDeductionGuideName can be used to obtain a DeclarationName from the corresponding template declaration.
Method Overview
- public DeclarationNameTable(const clang::ASTContext & C)
- public DeclarationNameTable(const clang::DeclarationNameTable &)
- public DeclarationNameTable(clang::DeclarationNameTable &&)
- public clang::DeclarationName getCXXConstructorName(clang::CanQualType Ty)
- public clang::DeclarationName getCXXConversionFunctionName(clang::CanQualType Ty)
- public clang::DeclarationName getCXXDeductionGuideName(clang::TemplateDecl * TD)
- public clang::DeclarationName getCXXDestructorName(clang::CanQualType Ty)
- public clang::DeclarationName getCXXLiteralOperatorName(clang::IdentifierInfo * II)
- public clang::DeclarationName getCXXOperatorName(clang::OverloadedOperatorKind Op)
- public clang::DeclarationName getCXXSpecialName(DeclarationName::NameKind Kind, clang::CanQualType Ty)
- public clang::DeclarationName getIdentifier(const clang::IdentifierInfo * ID)
- public ~DeclarationNameTable()
Methods
¶DeclarationNameTable(const clang::ASTContext& C)
DeclarationNameTable(const clang::ASTContext& C)
Declared at: clang/include/clang/AST/DeclarationName.h:614
Parameters
- const clang::ASTContext& C
¶DeclarationNameTable(
const clang::DeclarationNameTable&)
DeclarationNameTable(
const clang::DeclarationNameTable&)
Declared at: clang/include/clang/AST/DeclarationName.h:615
Parameters
- const clang::DeclarationNameTable&
¶DeclarationNameTable(
clang::DeclarationNameTable&&)
DeclarationNameTable(
clang::DeclarationNameTable&&)
Declared at: clang/include/clang/AST/DeclarationName.h:617
Parameters
¶clang::DeclarationName getCXXConstructorName(
clang::CanQualType Ty)
clang::DeclarationName getCXXConstructorName(
clang::CanQualType Ty)
Description
Returns the name of a C++ constructor for the given Type.
Declared at: clang/include/clang/AST/DeclarationName.h:627
Parameters
¶clang::DeclarationName
getCXXConversionFunctionName(
clang::CanQualType Ty)
clang::DeclarationName
getCXXConversionFunctionName(
clang::CanQualType Ty)
Description
Returns the name of a C++ conversion function for the given Type.
Declared at: clang/include/clang/AST/DeclarationName.h:636
Parameters
¶clang::DeclarationName getCXXDeductionGuideName(
clang::TemplateDecl* TD)
clang::DeclarationName getCXXDeductionGuideName(
clang::TemplateDecl* TD)
Description
Returns the name of a C++ deduction guide for the given template.
Declared at: clang/include/clang/AST/DeclarationName.h:633
Parameters
¶clang::DeclarationName getCXXDestructorName(
clang::CanQualType Ty)
clang::DeclarationName getCXXDestructorName(
clang::CanQualType Ty)
Description
Returns the name of a C++ destructor for the given Type.
Declared at: clang/include/clang/AST/DeclarationName.h:630
Parameters
¶clang::DeclarationName getCXXLiteralOperatorName(
clang::IdentifierInfo* II)
clang::DeclarationName getCXXLiteralOperatorName(
clang::IdentifierInfo* II)
Description
Get the name of the literal operator function with II as the identifier.
Declared at: clang/include/clang/AST/DeclarationName.h:653
Parameters
¶clang::DeclarationName getCXXOperatorName(
clang::OverloadedOperatorKind Op)
clang::DeclarationName getCXXOperatorName(
clang::OverloadedOperatorKind Op)
Description
Get the name of the overloadable C++ operator corresponding to Op.
Declared at: clang/include/clang/AST/DeclarationName.h:648
Parameters
- clang::OverloadedOperatorKind Op
¶clang::DeclarationName getCXXSpecialName(
DeclarationName::NameKind Kind,
clang::CanQualType Ty)
clang::DeclarationName getCXXSpecialName(
DeclarationName::NameKind Kind,
clang::CanQualType Ty)
Description
Returns a declaration name for special kind of C++ name, e.g., for a constructor, destructor, or conversion function. Kind must be one of: * DeclarationName::CXXConstructorName, * DeclarationName::CXXDestructorName or * DeclarationName::CXXConversionFunctionName
Declared at: clang/include/clang/AST/DeclarationName.h:644
Parameters
- DeclarationName::NameKind Kind
- clang::CanQualType Ty
¶clang::DeclarationName getIdentifier(
const clang::IdentifierInfo* ID)
clang::DeclarationName getIdentifier(
const clang::IdentifierInfo* ID)
Description
Create a declaration name that is a simple identifier.
Declared at: clang/include/clang/AST/DeclarationName.h:622
Parameters
- const clang::IdentifierInfo* ID
¶~DeclarationNameTable()
~DeclarationNameTable()
Declared at: clang/include/clang/AST/DeclarationName.h:619