clang  19.0.0git
Public Member Functions | List of all members
clang::DeclarationNameInfo Struct Reference

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the corresponding source/type location info. More...

#include "clang/AST/DeclarationName.h"

Public Member Functions

 DeclarationNameInfo ()=default
 
 DeclarationNameInfo (DeclarationName Name, SourceLocation NameLoc)
 
 DeclarationNameInfo (DeclarationName Name, SourceLocation NameLoc, DeclarationNameLoc LocInfo)
 
DeclarationName getName () const
 getName - Returns the embedded declaration name. More...
 
void setName (DeclarationName N)
 setName - Sets the embedded declaration name. More...
 
SourceLocation getLoc () const
 getLoc - Returns the main location of the declaration name. More...
 
void setLoc (SourceLocation L)
 setLoc - Sets the main location of the declaration name. More...
 
const DeclarationNameLocgetInfo () const
 
void setInfo (const DeclarationNameLoc &Info)
 
TypeSourceInfogetNamedTypeInfo () const
 getNamedTypeInfo - Returns the source type info associated to the name. More...
 
void setNamedTypeInfo (TypeSourceInfo *TInfo)
 setNamedTypeInfo - Sets the source type info associated to the name. More...
 
SourceRange getCXXOperatorNameRange () const
 getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword). More...
 
void setCXXOperatorNameRange (SourceRange R)
 setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword). More...
 
SourceLocation getCXXLiteralOperatorNameLoc () const
 getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword). More...
 
void setCXXLiteralOperatorNameLoc (SourceLocation Loc)
 setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword). More...
 
bool isInstantiationDependent () const
 Determine whether this name involves a template parameter. More...
 
bool containsUnexpandedParameterPack () const
 Determine whether this name contains an unexpanded parameter pack. More...
 
std::string getAsString () const
 getAsString - Retrieve the human-readable string for this name. More...
 
void printName (raw_ostream &OS, PrintingPolicy Policy) const
 printName - Print the human-readable name to a stream. More...
 
SourceLocation getBeginLoc () const
 getBeginLoc - Retrieve the location of the first token. More...
 
SourceRange getSourceRange () const LLVM_READONLY
 getSourceRange - The range of the declaration name. More...
 
SourceLocation getEndLoc () const LLVM_READONLY
 

Detailed Description

DeclarationNameInfo - A collector data type for bundling together a DeclarationName and the corresponding source/type location info.

Definition at line 768 of file DeclarationName.h.

Constructor & Destructor Documentation

◆ DeclarationNameInfo() [1/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( )
default

◆ DeclarationNameInfo() [2/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( DeclarationName  Name,
SourceLocation  NameLoc 
)
inline

Definition at line 783 of file DeclarationName.h.

◆ DeclarationNameInfo() [3/3]

clang::DeclarationNameInfo::DeclarationNameInfo ( DeclarationName  Name,
SourceLocation  NameLoc,
DeclarationNameLoc  LocInfo 
)
inline

Definition at line 786 of file DeclarationName.h.

Member Function Documentation

◆ containsUnexpandedParameterPack()

bool DeclarationNameInfo::containsUnexpandedParameterPack ( ) const

◆ getAsString()

std::string DeclarationNameInfo::getAsString ( ) const

getAsString - Retrieve the human-readable string for this name.

Definition at line 453 of file DeclarationName.cpp.

◆ getBeginLoc()

SourceLocation clang::DeclarationNameInfo::getBeginLoc ( ) const
inline

◆ getCXXLiteralOperatorNameLoc()

SourceLocation clang::DeclarationNameInfo::getCXXLiteralOperatorNameLoc ( ) const
inline

getCXXLiteralOperatorNameLoc - Returns the location of the literal operator name (not the operator keyword).

Assumes it is a literal operator.

Definition at line 842 of file DeclarationName.h.

Referenced by clang::Sema::BuildLiteralOperatorCall(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ getCXXOperatorNameRange()

SourceRange clang::DeclarationNameInfo::getCXXOperatorNameRange ( ) const
inline

getCXXOperatorNameRange - Gets the range of the operator name (without the operator keyword).

Assumes it is a (non-literal) operator.

Definition at line 826 of file DeclarationName.h.

Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc(), and clang::Sema::RebuildLambdaScopeInfo().

◆ getEndLoc()

SourceLocation clang::DeclarationNameInfo::getEndLoc ( ) const
inline

◆ getInfo()

const DeclarationNameLoc& clang::DeclarationNameInfo::getInfo ( ) const
inline

◆ getLoc()

SourceLocation clang::DeclarationNameInfo::getLoc ( ) const
inline

◆ getName()

DeclarationName clang::DeclarationNameInfo::getName ( ) const
inline

◆ getNamedTypeInfo()

TypeSourceInfo* clang::DeclarationNameInfo::getNamedTypeInfo ( ) const
inline

getNamedTypeInfo - Returns the source type info associated to the name.

Assumes it is a constructor, destructor or conversion.

Definition at line 807 of file DeclarationName.h.

Referenced by clang::Sema::DiagnoseUnexpandedParameterPack(), clang::ASTNodeImporter::ImportDeclarationNameLoc(), and clang::RecursiveASTVisitor< Derived >::TraverseDeclarationNameInfo().

◆ getSourceRange()

SourceRange clang::DeclarationNameInfo::getSourceRange ( ) const
inline

◆ isInstantiationDependent()

bool DeclarationNameInfo::isInstantiationDependent ( ) const

◆ printName()

void DeclarationNameInfo::printName ( raw_ostream &  OS,
PrintingPolicy  Policy 
) const

◆ setCXXLiteralOperatorNameLoc()

void clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc ( SourceLocation  Loc)
inline

setCXXLiteralOperatorNameLoc - Sets the location of the literal operator name (not the operator keyword).

Assumes it is a literal operator.

Definition at line 851 of file DeclarationName.h.

Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ setCXXOperatorNameRange()

void clang::DeclarationNameInfo::setCXXOperatorNameRange ( SourceRange  R)
inline

setCXXOperatorNameRange - Sets the range of the operator name (without the operator keyword).

Assumes it is a C++ operator.

Definition at line 834 of file DeclarationName.h.

Referenced by clang::Sema::CreateOverloadedArraySubscriptExpr(), and clang::ASTNodeImporter::ImportDeclarationNameLoc().

◆ setInfo()

void clang::DeclarationNameInfo::setInfo ( const DeclarationNameLoc Info)
inline

Definition at line 803 of file DeclarationName.h.

Referenced by clang::ASTRecordReader::readDeclarationNameInfo().

◆ setLoc()

void clang::DeclarationNameInfo::setLoc ( SourceLocation  L)
inline

setLoc - Sets the main location of the declaration name.

Definition at line 800 of file DeclarationName.h.

Referenced by checkMappableExpressionList(), clang::Sema::LookupInlineAsmVarDeclField(), and clang::ASTRecordReader::readDeclarationNameInfo().

◆ setName()

void clang::DeclarationNameInfo::setName ( DeclarationName  N)
inline

◆ setNamedTypeInfo()

void clang::DeclarationNameInfo::setNamedTypeInfo ( TypeSourceInfo TInfo)
inline

setNamedTypeInfo - Sets the source type info associated to the name.

Assumes it is a constructor, destructor or conversion.

Definition at line 817 of file DeclarationName.h.

Referenced by clang::ASTNodeImporter::ImportDeclarationNameLoc().


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