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

A reference to a concept and its template args, as it appears in the code. More...

#include "clang/AST/ASTConcept.h"

Public Member Functions

const NestedNameSpecifierLocgetNestedNameSpecifierLoc () const
 
const DeclarationNameInfogetConceptNameInfo () const
 
SourceLocation getConceptNameLoc () const
 
SourceLocation getTemplateKWLoc () const
 
SourceLocation getLocation () const
 
SourceLocation getBeginLoc () const LLVM_READONLY
 
SourceLocation getEndLoc () const LLVM_READONLY
 
SourceRange getSourceRange () const LLVM_READONLY
 
NamedDeclgetFoundDecl () const
 
ConceptDeclgetNamedConcept () const
 
const ASTTemplateArgumentListInfogetTemplateArgsAsWritten () const
 
bool hasExplicitTemplateArgs () const
 Whether or not template arguments were explicitly specified in the concept reference (they might not be in type constraints, for example)
 
void print (llvm::raw_ostream &OS, const PrintingPolicy &Policy) const
 
void dump () const
 
void dump (llvm::raw_ostream &) const
 

Static Public Member Functions

static ConceptReferenceCreate (const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, ConceptDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten)
 

Detailed Description

A reference to a concept and its template args, as it appears in the code.

Examples: template <int X> requires is_even<X> int half = X/2; ~~~~~~~~~~ (in ConceptSpecializationExpr)

std::input_iterator auto I = Container.begin(); ~~~~~~~~~~~~~~~~~~~ (in AutoTypeLoc)

template <std::derives_from<Expr> T> void dump(); ~~~~~~~~~~~~~~~~~~~~~~~ (in TemplateTypeParmDecl)

Definition at line 124 of file ASTConcept.h.

Member Function Documentation

◆ Create()

ConceptReference * ConceptReference::Create ( const ASTContext C,
NestedNameSpecifierLoc  NNS,
SourceLocation  TemplateKWLoc,
DeclarationNameInfo  ConceptNameInfo,
NamedDecl FoundDecl,
ConceptDecl NamedConcept,
const ASTTemplateArgumentListInfo ArgsAsWritten 
)
static

◆ dump() [1/2]

LLVM_DUMP_METHOD void ConceptReference::dump ( ) const

Definition at line 353 of file ASTDumper.cpp.

References dump().

Referenced by dump().

◆ dump() [2/2]

void clang::ConceptReference::dump ( llvm::raw_ostream &  ) const

◆ getBeginLoc()

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

◆ getConceptNameInfo()

const DeclarationNameInfo & clang::ConceptReference::getConceptNameInfo ( ) const
inline

◆ getConceptNameLoc()

SourceLocation clang::ConceptReference::getConceptNameLoc ( ) const
inline

◆ getEndLoc()

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

◆ getFoundDecl()

NamedDecl * clang::ConceptReference::getFoundDecl ( ) const
inline

◆ getLocation()

SourceLocation clang::ConceptReference::getLocation ( ) const
inline

◆ getNamedConcept()

ConceptDecl * clang::ConceptReference::getNamedConcept ( ) const
inline

◆ getNestedNameSpecifierLoc()

const NestedNameSpecifierLoc & clang::ConceptReference::getNestedNameSpecifierLoc ( ) const
inline

◆ getSourceRange()

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

Definition at line 191 of file ASTConcept.h.

References getBeginLoc(), and getEndLoc().

Referenced by clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().

◆ getTemplateArgsAsWritten()

const ASTTemplateArgumentListInfo * clang::ConceptReference::getTemplateArgsAsWritten ( ) const
inline

◆ getTemplateKWLoc()

SourceLocation clang::ConceptReference::getTemplateKWLoc ( ) const
inline

◆ hasExplicitTemplateArgs()

bool clang::ConceptReference::hasExplicitTemplateArgs ( ) const
inline

Whether or not template arguments were explicitly specified in the concept reference (they might not be in type constraints, for example)

Definition at line 209 of file ASTConcept.h.

Referenced by clang::TypeConstraint::hasExplicitTemplateArgs(), clang::ConceptSpecializationExpr::hasExplicitTemplateArgs(), clang::ASTContext::isSameTypeConstraint(), and print().

◆ print()

void ConceptReference::print ( llvm::raw_ostream &  OS,
const PrintingPolicy Policy 
) const

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