clang 23.0.0git
clang::DeclarationNameLoc Class Reference

DeclarationNameLoc - Additional source/type location info for a declaration name. More...

#include "clang/AST/DeclarationName.h"

Public Member Functions

 DeclarationNameLoc (DeclarationName Name)
 DeclarationNameLoc ()
TypeSourceInfogetNamedTypeInfo () const
 Returns the source type info.
SourceLocation getCXXOperatorNameBeginLoc () const
 Return the beginning location of the getCXXOperatorNameRange() range.
SourceLocation getCXXOperatorNameEndLoc () const
 Return the end location of the getCXXOperatorNameRange() range.
SourceRange getCXXOperatorNameRange () const
 Return the range of the operator name (without the operator keyword).
SourceLocation getCXXLiteralOperatorNameLoc () const
 Return the location of the literal operator name (without the operator keyword).

Static Public Member Functions

static DeclarationNameLoc makeNamedTypeLoc (TypeSourceInfo *TInfo)
 Construct location information for a constructor, destructor or conversion operator.
static DeclarationNameLoc makeCXXOperatorNameLoc (SourceLocation BeginLoc, SourceLocation EndLoc)
 Construct location information for a non-literal C++ operator.
static DeclarationNameLoc makeCXXOperatorNameLoc (SourceRange Range)
 Construct location information for a non-literal C++ operator.
static DeclarationNameLoc makeCXXLiteralOperatorNameLoc (SourceLocation Loc)
 Construct location information for a literal C++ operator.

Detailed Description

DeclarationNameLoc - Additional source/type location info for a declaration name.

Needs a DeclarationName in order to be interpreted correctly.

Definition at line 676 of file DeclarationName.h.

Constructor & Destructor Documentation

◆ DeclarationNameLoc() [1/2]

◆ DeclarationNameLoc() [2/2]

clang::DeclarationNameLoc::DeclarationNameLoc ( )
inline

Definition at line 722 of file DeclarationName.h.

References memset().

Member Function Documentation

◆ getCXXLiteralOperatorNameLoc()

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

Return the location of the literal operator name (without the operator keyword).

Assumes that the object stores location information of a literal operator.

Definition at line 749 of file DeclarationName.h.

References CXXLiteralOperatorName.

Referenced by clang::ASTRecordWriter::AddDeclarationNameLoc().

◆ getCXXOperatorNameBeginLoc()

SourceLocation clang::DeclarationNameLoc::getCXXOperatorNameBeginLoc ( ) const
inline

Return the beginning location of the getCXXOperatorNameRange() range.

Definition at line 729 of file DeclarationName.h.

References CXXOperatorName.

Referenced by getCXXOperatorNameRange().

◆ getCXXOperatorNameEndLoc()

SourceLocation clang::DeclarationNameLoc::getCXXOperatorNameEndLoc ( ) const
inline

Return the end location of the getCXXOperatorNameRange() range.

Definition at line 734 of file DeclarationName.h.

References CXXOperatorName.

Referenced by getCXXOperatorNameRange().

◆ getCXXOperatorNameRange()

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

Return the range of the operator name (without the operator keyword).

Assumes that the object stores location information of a (non-literal) operator.

Definition at line 741 of file DeclarationName.h.

References getCXXOperatorNameBeginLoc(), and getCXXOperatorNameEndLoc().

Referenced by clang::ASTRecordWriter::AddDeclarationNameLoc().

◆ getNamedTypeInfo()

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

Returns the source type info.

Assumes that the object stores location information of a constructor, destructor or conversion operator.

Definition at line 726 of file DeclarationName.h.

References NamedType.

Referenced by clang::ASTRecordWriter::AddDeclarationNameLoc().

◆ makeCXXLiteralOperatorNameLoc()

DeclarationNameLoc clang::DeclarationNameLoc::makeCXXLiteralOperatorNameLoc ( SourceLocation Loc)
inlinestatic

Construct location information for a literal C++ operator.

Definition at line 775 of file DeclarationName.h.

References DeclarationNameLoc().

Referenced by clang::ASTRecordReader::readDeclarationNameLoc(), and clang::DeclarationNameInfo::setCXXLiteralOperatorNameLoc().

◆ makeCXXOperatorNameLoc() [1/2]

DeclarationNameLoc clang::DeclarationNameLoc::makeCXXOperatorNameLoc ( SourceLocation BeginLoc,
SourceLocation EndLoc )
inlinestatic

◆ makeCXXOperatorNameLoc() [2/2]

DeclarationNameLoc clang::DeclarationNameLoc::makeCXXOperatorNameLoc ( SourceRange Range)
inlinestatic

Construct location information for a non-literal C++ operator.

Definition at line 768 of file DeclarationName.h.

References DeclarationNameLoc().

◆ makeNamedTypeLoc()

DeclarationNameLoc clang::DeclarationNameLoc::makeNamedTypeLoc ( TypeSourceInfo * TInfo)
inlinestatic

Construct location information for a constructor, destructor or conversion operator.

Definition at line 755 of file DeclarationName.h.

References DeclarationNameLoc().

Referenced by addBlockPointerConversion(), addFunctionPointerConversion(), clang::Sema::InstantiateFunctionDefinition(), clang::ASTRecordReader::readDeclarationNameLoc(), and clang::DeclarationNameInfo::setNamedTypeInfo().

Member Data Documentation

◆ CXXLiteralOperatorName

struct CXXLitOpName clang::DeclarationNameLoc::CXXLiteralOperatorName

Definition at line 705 of file DeclarationName.h.

Referenced by getCXXLiteralOperatorNameLoc().

◆ CXXOperatorName

struct CXXOpName clang::DeclarationNameLoc::CXXOperatorName

Definition at line 704 of file DeclarationName.h.

Referenced by getCXXOperatorNameBeginLoc(), and getCXXOperatorNameEndLoc().

◆ NamedType

struct NT clang::DeclarationNameLoc::NamedType

Definition at line 703 of file DeclarationName.h.

Referenced by getNamedTypeInfo().


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