clang 22.0.0git
|
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 NestedNameSpecifierLoc & | getNestedNameSpecifierLoc () const |
const DeclarationNameInfo & | getConceptNameInfo () 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 |
NamedDecl * | getFoundDecl () const |
TemplateDecl * | getNamedConcept () const |
const ASTTemplateArgumentListInfo * | getTemplateArgsAsWritten () 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 ConceptReference * | Create (const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten) |
Protected Member Functions | |
ConceptReference (NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten) |
Protected Attributes | |
NestedNameSpecifierLoc | NestedNameSpec |
SourceLocation | TemplateKWLoc |
The location of the template keyword, if specified when naming the concept. | |
DeclarationNameInfo | ConceptName |
The concept name used. | |
NamedDecl * | FoundDecl |
The declaration found by name lookup when the expression was created. | |
TemplateDecl * | NamedConcept |
The concept named. | |
const ASTTemplateArgumentListInfo * | ArgsAsWritten |
The template argument list source info used to specialize the concept. |
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 126 of file ASTConcept.h.
|
inlineprotected |
Definition at line 151 of file ASTConcept.h.
References ArgsAsWritten, ConceptName, FoundDecl, NamedConcept, NestedNameSpec, and TemplateKWLoc.
Referenced by Create().
|
static |
Definition at line 87 of file ASTConcept.cpp.
References ArgsAsWritten, clang::C, ConceptReference(), FoundDecl, NamedConcept, and TemplateKWLoc.
Referenced by clang::Sema::AttachTypeConstraint(), clang::Sema::CheckConceptTemplateId(), clang::hlsl::TemplateParameterListBuilder::constructConceptSpecializationExpr(), createTrivialConceptReference(), clang::ASTNodeImporter::import(), and clang::ASTRecordReader::readConceptReference().
LLVM_DUMP_METHOD void ConceptReference::dump | ( | ) | const |
void clang::ConceptReference::dump | ( | llvm::raw_ostream & | ) | const |
SourceLocation ConceptReference::getBeginLoc | ( | ) | const |
Definition at line 96 of file ASTConcept.cpp.
References clang::DeclarationNameInfo::getBeginLoc(), getConceptNameInfo(), and getNestedNameSpecifierLoc().
Referenced by getSourceRange().
|
inline |
Definition at line 170 of file ASTConcept.h.
References ConceptName.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getBeginLoc(), clang::AutoTypeLoc::getConceptNameInfo(), getConceptNameLoc(), getEndLoc(), and clang::ASTNodeImporter::import().
|
inline |
Definition at line 172 of file ASTConcept.h.
References getConceptNameInfo(), and clang::DeclarationNameInfo::getLoc().
Referenced by getLocation().
|
inline |
Definition at line 182 of file ASTConcept.h.
References getConceptNameInfo(), getEndLoc(), clang::DeclarationNameInfo::getEndLoc(), clang::ASTTemplateArgumentListInfo::getRAngleLoc(), getTemplateArgsAsWritten(), and clang::SourceLocation::isValid().
Referenced by getEndLoc(), and getSourceRange().
|
inline |
Definition at line 193 of file ASTConcept.h.
References FoundDecl.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::ASTNodeImporter::import(), and clang::Sema::SubstTypeConstraint().
|
inline |
Definition at line 178 of file ASTConcept.h.
References getConceptNameLoc().
Referenced by clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 197 of file ASTConcept.h.
References NamedConcept.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::ASTNodeImporter::import(), clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
|
inline |
Definition at line 166 of file ASTConcept.h.
References NestedNameSpec.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getBeginLoc(), and clang::ASTNodeImporter::import().
|
inline |
Definition at line 189 of file ASTConcept.h.
References getBeginLoc(), and getEndLoc().
Referenced by clang::JSONNodeDumper::Visit(), and clang::TextNodeDumper::Visit().
|
inline |
Definition at line 199 of file ASTConcept.h.
References ArgsAsWritten.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getEndLoc(), clang::ASTNodeImporter::import(), clang::ASTContext::isSameTypeConstraint(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 176 of file ASTConcept.h.
References TemplateKWLoc.
Referenced by clang::ASTRecordWriter::AddConceptReference(), and clang::ASTNodeImporter::import().
|
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 205 of file ASTConcept.h.
References ArgsAsWritten.
Referenced by clang::ASTContext::isSameTypeConstraint(), and print().
void ConceptReference::print | ( | llvm::raw_ostream & | OS, |
const PrintingPolicy & | Policy ) const |
Definition at line 103 of file ASTConcept.cpp.
References ArgsAsWritten, ConceptName, hasExplicitTemplateArgs(), and NestedNameSpec.
|
protected |
The template argument list source info used to specialize the concept.
Definition at line 149 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), getTemplateArgsAsWritten(), hasExplicitTemplateArgs(), and print().
|
protected |
The concept name used.
Definition at line 136 of file ASTConcept.h.
Referenced by ConceptReference(), getConceptNameInfo(), and print().
|
protected |
The declaration found by name lookup when the expression was created.
Can differ from NamedConcept when, for example, the concept was found through a UsingShadowDecl.
Definition at line 142 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), and getFoundDecl().
|
protected |
The concept named.
Definition at line 145 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), and getNamedConcept().
|
protected |
Definition at line 129 of file ASTConcept.h.
Referenced by ConceptReference(), getNestedNameSpecifierLoc(), and print().
|
protected |
The location of the template keyword, if specified when naming the concept.
Definition at line 133 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), and getTemplateKWLoc().