clang 20.0.0git
Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::QualifiedTemplateName Class Reference

Represents a template name as written in source code. More...

#include "clang/AST/TemplateName.h"

Inheritance diagram for clang::QualifiedTemplateName:
Inheritance graph
[legend]

Public Member Functions

NestedNameSpecifiergetQualifier () const
 Return the nested name specifier that qualifies this name.
 
bool hasTemplateKeyword () const
 Whether the template name was prefixed by the "template" keyword.
 
TemplateName getUnderlyingTemplate () const
 Return the underlying template name.
 
void Profile (llvm::FoldingSetNodeID &ID)
 

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &ID, NestedNameSpecifier *NNS, bool TemplateKeyword, TemplateName TN)
 

Friends

class ASTContext
 

Detailed Description

Represents a template name as written in source code.

This kind of template name may refer to a template name that was preceded by a nested name specifier, e.g., std::vector. Here, the nested name specifier is "std::" and the template name is the declaration for "vector". It may also have been written with the 'template' keyword. The QualifiedTemplateName class is only used to provide "sugar" for template names, so that they can be differentiated from canonical template names. and has no semantic meaning. In this manner, it is to TemplateName what ElaboratedType is to Type, providing extra syntactic sugar for downstream clients.

Definition at line 491 of file TemplateName.h.

Member Function Documentation

◆ getQualifier()

NestedNameSpecifier * clang::QualifiedTemplateName::getQualifier ( ) const
inline

Return the nested name specifier that qualifies this name.

Definition at line 519 of file TemplateName.h.

Referenced by clang::ODRHash::AddTemplateName(), clang::TextNodeDumper::dumpBareTemplateName(), clang::TypeName::getFullyQualifiedTemplateName(), and clang::ASTImporter::Import().

◆ getUnderlyingTemplate()

TemplateName clang::QualifiedTemplateName::getUnderlyingTemplate ( ) const
inline

Return the underlying template name.

Definition at line 526 of file TemplateName.h.

Referenced by clang::ODRHash::AddTemplateName(), clang::TextNodeDumper::dumpBareTemplateName(), and clang::ASTImporter::Import().

◆ hasTemplateKeyword()

bool clang::QualifiedTemplateName::hasTemplateKeyword ( ) const
inline

Whether the template name was prefixed by the "template" keyword.

Definition at line 523 of file TemplateName.h.

Referenced by clang::ODRHash::AddTemplateName(), clang::TextNodeDumper::dumpBareTemplateName(), clang::TypeName::getFullyQualifiedTemplateName(), and clang::ASTImporter::Import().

◆ Profile() [1/2]

void clang::QualifiedTemplateName::Profile ( llvm::FoldingSetNodeID &  ID)
inline

Definition at line 528 of file TemplateName.h.

References ID.

Referenced by clang::ASTContext::getQualifiedTemplateName().

◆ Profile() [2/2]

static void clang::QualifiedTemplateName::Profile ( llvm::FoldingSetNodeID &  ID,
NestedNameSpecifier NNS,
bool  TemplateKeyword,
TemplateName  TN 
)
inlinestatic

Definition at line 532 of file TemplateName.h.

References clang::TemplateName::getAsVoidPointer(), and ID.

Friends And Related Function Documentation

◆ ASTContext

friend class ASTContext
friend

Definition at line 492 of file TemplateName.h.


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