clang 18.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 128 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 

◆ dump() [1/2]

LLVM_DUMP_METHOD void ConceptReference::dump ( ) const

Definition at line 342 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

◆ getConceptNameInfo()

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

◆ getConceptNameLoc()

SourceLocation clang::ConceptReference::getConceptNameLoc ( ) const

◆ getEndLoc()

SourceLocation clang::ConceptReference::getEndLoc ( ) const

◆ getFoundDecl()

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

◆ getLocation()

SourceLocation clang::ConceptReference::getLocation ( ) const

Definition at line 179 of file ASTConcept.h.

References getConceptNameLoc().

Referenced by clang::ConceptSpecializationExpr::getExprLoc().

◆ getNamedConcept()

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

◆ getNestedNameSpecifierLoc()

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

◆ getSourceRange()

SourceRange clang::ConceptReference::getSourceRange ( ) const

Definition at line 195 of file ASTConcept.h.

References getBeginLoc(), and getEndLoc().

Referenced by clang::TextNodeDumper::Visit().

◆ getTemplateArgsAsWritten()

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

◆ getTemplateKWLoc()

SourceLocation clang::ConceptReference::getTemplateKWLoc ( ) const

◆ hasExplicitTemplateArgs()

bool clang::ConceptReference::hasExplicitTemplateArgs ( ) const

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

Definition at line 213 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: