clang 8.0.0

Public Member Functions | List of all members
clang::DeclarationNameTable Class Reference

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. More...
DeclarationName | getCXXConstructorName (CanQualType Ty)
| Returns the name of a C++ constructor for the given Type. More...
DeclarationName | getCXXDestructorName (CanQualType Ty)
| Returns the name of a C++ destructor for the given Type. More...
DeclarationName | getCXXDeductionGuideName (TemplateDecl *TD)
| Returns the name of a C++ deduction guide for the given template. More...
DeclarationName | getCXXConversionFunctionName (CanQualType Ty)
| Returns the name of a C++ conversion function for the given Type. More...
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. More...
DeclarationName | getCXXOperatorName (OverloadedOperatorKind Op)
| Get the name of the overloadable C++ operator corresponding to Op. More...
DeclarationName | getCXXLiteralOperatorName (IdentifierInfo *II)
| Get the name of the literal operator function with II as the identifier. More...

## Detailed 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).

Definition at line 568 of file DeclarationName.h.

## Constructor & Destructor Documentation

## ◆ DeclarationNameTable() [1/3]

DeclarationNameTable::DeclarationNameTable | ( | const ASTContext & | C | ) |

Definition at line 282 of file DeclarationName.cpp.

References clang::NUM_OVERLOADED_OPERATORS.

## ◆ DeclarationNameTable() [2/3]

clang::DeclarationNameTable::DeclarationNameTable | ( | const DeclarationNameTable & |  | ) |
| delete

## ◆ DeclarationNameTable() [3/3]

clang::DeclarationNameTable::DeclarationNameTable | ( | DeclarationNameTable && |  | ) |
| delete

## ◆ ~DeclarationNameTable()

clang::DeclarationNameTable::~DeclarationNameTable | ( |  | ) |
| default

## Member Function Documentation

## ◆ getCXXConstructorName()

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 getCXXSpecialName(), and clang::ASTImporter::Import().

## ◆ getCXXConversionFunctionName()

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 getCXXSpecialName(), and clang::ASTImporter::Import().

## ◆ getCXXDeductionGuideName()

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(), and clang::ASTImporter::Import().

## ◆ getCXXDestructorName()

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 getCXXSpecialName(), and clang::ASTImporter::Import().

## ◆ getCXXLiteralOperatorName()

DeclarationName DeclarationNameTable::getCXXLiteralOperatorName | ( | 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 BuildCookedLiteralOperatorCall(), and clang::ASTImporter::Import().

## ◆ getCXXOperatorName()

DeclarationName clang::DeclarationNameTable::getCXXOperatorName | ( | OverloadedOperatorKind | Op | ) |
| inline

Get the name of the overloadable C++ operator corresponding to Op.

Definition at line 640 of file DeclarationName.h.

Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::DeclareGlobalNewDelete(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::ASTImporter::Import(), resolveAllocationOverload(), and resolveBuiltinNewDeleteOverload().

## ◆ getCXXSpecialName()

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:

- DeclarationName::CXXConstructorName,
- DeclarationName::CXXDestructorName or
- DeclarationName::CXXConversionFunctionName

Definition at line 353 of file DeclarationName.cpp.

References clang::DeclarationName::CXXConstructorName, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationName::CXXDestructorName, getCXXConstructorName(), getCXXConversionFunctionName(), and getCXXDestructorName().

## ◆ getIdentifier()

DeclarationName clang::DeclarationNameTable::getIdentifier | ( | const IdentifierInfo * | ID | ) |
| inline

Create a declaration name that is a simple identifier.

Definition at line 614 of file DeclarationName.h.

## ◆ operator=() [1/2]

DeclarationNameTable& clang::DeclarationNameTable::operator= | ( | const DeclarationNameTable & |  | ) |
| delete

## ◆ operator=() [2/2]

DeclarationNameTable& clang::DeclarationNameTable::operator= | ( | DeclarationNameTable && |  | ) |
| delete

The documentation for this class was generated from the following files:

- include/clang/AST/DeclarationName.h
- lib/AST/DeclarationName.cpp