clang
3.9.0
|
DeclarationNameTable - Used to store and retrieve DeclarationName instances for the various kinds of declaration names, e.g., normal identifiers, C++ constructor names, etc. More...
#include <DeclarationName.h>
Public Member Functions | |
DeclarationNameTable (const ASTContext &C) | |
~DeclarationNameTable () | |
DeclarationName | getIdentifier (const IdentifierInfo *ID) |
getIdentifier - Create a declaration name that is a simple identifier. More... | |
DeclarationName | getCXXConstructorName (CanQualType Ty) |
getCXXConstructorName - Returns the name of a C++ constructor for the given Type. More... | |
DeclarationName | getCXXDestructorName (CanQualType Ty) |
getCXXDestructorName - Returns the name of a C++ destructor for the given Type. More... | |
DeclarationName | getCXXConversionFunctionName (CanQualType Ty) |
getCXXConversionFunctionName - Returns the name of a C++ conversion function for the given Type. More... | |
DeclarationName | getCXXSpecialName (DeclarationName::NameKind Kind, CanQualType Ty) |
getCXXSpecialName - Returns a declaration name for special kind of C++ name, e.g., for a constructor, destructor, or conversion function. More... | |
DeclarationName | getCXXOperatorName (OverloadedOperatorKind Op) |
getCXXOperatorName - Get the name of the overloadable C++ operator corresponding to Op. More... | |
DeclarationName | getCXXLiteralOperatorName (IdentifierInfo *II) |
getCXXLiteralOperatorName - Get the name of the literal operator function with II as the identifier. More... | |
DeclarationNameTable - 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 344 of file DeclarationName.h.
DeclarationNameTable::DeclarationNameTable | ( | const ASTContext & | C | ) |
Definition at line 361 of file DeclarationName.cpp.
References clang::DeclarationNameExtra::CXXConversionFunction, clang::DeclarationNameExtra::ExtraKindOrNumArgs, clang::CXXOperatorIdName::FETokenInfo, and clang::NUM_OVERLOADED_OPERATORS.
DeclarationNameTable::~DeclarationNameTable | ( | ) |
Definition at line 374 of file DeclarationName.cpp.
DeclarationName DeclarationNameTable::getCXXConstructorName | ( | CanQualType | Ty | ) |
getCXXConstructorName - Returns the name of a C++ constructor for the given Type.
Definition at line 385 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConstructorName, getCXXSpecialName(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by clang::Sema::BuildUsingDeclaration(), clang::Sema::DeclareImplicitCopyConstructor(), clang::Sema::DeclareImplicitDefaultConstructor(), clang::Sema::DeclareImplicitMoveConstructor(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::Sema::LookupConstructors(), clang::Sema::LookupSpecialMember(), and clang::ASTReader::ReadDeclarationName().
DeclarationName DeclarationNameTable::getCXXConversionFunctionName | ( | CanQualType | Ty | ) |
getCXXConversionFunctionName - Returns the name of a C++ conversion function for the given Type.
Definition at line 396 of file DeclarationName.cpp.
References clang::DeclarationName::CXXConversionFunctionName, and getCXXSpecialName().
Referenced by addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), and clang::ASTReader::ReadDeclarationName().
DeclarationName DeclarationNameTable::getCXXDestructorName | ( | CanQualType | Ty | ) |
getCXXDestructorName - Returns the name of a C++ destructor for the given Type.
Definition at line 390 of file DeclarationName.cpp.
References clang::DeclarationName::CXXDestructorName, getCXXSpecialName(), and clang::CanQual< T >::getUnqualifiedType().
Referenced by clang::Sema::CheckFunctionDeclaration(), clang::Sema::DeclareImplicitDestructor(), clang::CXXRecordDecl::getDestructor(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), and clang::ASTReader::ReadDeclarationName().
DeclarationName DeclarationNameTable::getCXXLiteralOperatorName | ( | IdentifierInfo * | II | ) |
getCXXLiteralOperatorName - Get the name of the literal operator function with II as the identifier.
Definition at line 450 of file DeclarationName.cpp.
References clang::DeclarationNameExtra::CXXLiteralOperator, clang::DeclarationNameExtra::ExtraKindOrNumArgs, clang::CXXLiteralOperatorIdName::FETokenInfo, clang::CXXLiteralOperatorIdName::ID, ID, and clang::Name.
Referenced by clang::Sema::ActOnNumericConstant(), clang::Sema::ActOnStringLiteral(), BuildCookedLiteralOperatorCall(), clang::Sema::GetNameFromUnqualifiedId(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), and clang::ASTReader::ReadDeclarationName().
DeclarationName DeclarationNameTable::getCXXOperatorName | ( | OverloadedOperatorKind | Op | ) |
getCXXOperatorName - Get the name of the overloadable C++ operator corresponding to Op.
Definition at line 445 of file DeclarationName.cpp.
Referenced by clang::Sema::ActOnCXXDelete(), clang::Sema::AddMemberOperatorCandidates(), clang::Sema::BuildBlockForLambdaConversion(), clang::Sema::BuildCallToObjectOfClassType(), clang::Sema::BuildOverloadedArrowExpr(), buildSingleCopyAssignRecursively(), clang::Sema::CheckDestructor(), clang::Sema::CodeCompleteCall(), clang::Sema::CreateOverloadedArraySubscriptExpr(), clang::Sema::CreateOverloadedBinOp(), clang::Sema::CreateOverloadedUnaryOp(), clang::Sema::DeclareGlobalNewDelete(), clang::Sema::DeclareImplicitCopyAssignment(), clang::Sema::DeclareImplicitMoveAssignment(), DiagnoseTwoPhaseOperatorLookup(), doesUsualArrayDeleteWantSize(), clang::Sema::FindAllocationFunctions(), clang::ASTContext::getNameForTemplate(), clang::Sema::GetNameFromUnqualifiedId(), HasNoThrowOperator(), clang::ASTImporter::Import(), clang::Sema::isTemplateName(), clang::Sema::LookupOverloadedOperatorName(), clang::Sema::LookupSpecialMember(), clang::ASTReader::ReadDeclarationName(), clang::Sema::ShouldDeleteSpecialMember(), clang::Sema::startLambdaDefinition(), and threadSafetyCheckIsSmartPointer().
DeclarationName DeclarationNameTable::getCXXSpecialName | ( | DeclarationName::NameKind | Kind, |
CanQualType | Ty | ||
) |
getCXXSpecialName - Returns a declaration name for special kind of C++ name, e.g., for a constructor, destructor, or conversion function.
Definition at line 401 of file DeclarationName.cpp.
References clang::DeclarationNameExtra::CXXConstructor, clang::DeclarationName::CXXConstructorName, clang::DeclarationNameExtra::CXXConversionFunction, clang::DeclarationName::CXXConversionFunctionName, clang::DeclarationNameExtra::CXXDestructor, clang::DeclarationName::CXXDestructorName, clang::DeclarationNameExtra::ExtraKindOrNumArgs, clang::CXXSpecialName::FETokenInfo, clang::CanQual< T >::getAsOpaquePtr(), clang::CanQual< T >::hasQualifiers(), ID, clang::Name, and clang::CXXSpecialName::Type.
Referenced by getCXXConstructorName(), getCXXConversionFunctionName(), and getCXXDestructorName().
|
inline |
getIdentifier - Create a declaration name that is a simple identifier.
Definition at line 359 of file DeclarationName.h.
Referenced by clang::ASTContext::getNameForTemplate(), and hasMember().