|
clang 24.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 |
| TemplateName | 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 &OS, const ASTContext &Context) const |
Static Public Member Functions | |
| static ConceptReference * | Create (const ASTContext &C, NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateName NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten) |
Protected Member Functions | |
| ConceptReference (NestedNameSpecifierLoc NNS, SourceLocation TemplateKWLoc, DeclarationNameInfo ConceptNameInfo, NamedDecl *FoundDecl, TemplateName 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. | |
| TemplateName | 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 127 of file ASTConcept.h.
|
inlineprotected |
Definition at line 152 of file ASTConcept.h.
References ArgsAsWritten, ConceptName, FoundDecl, NamedConcept, NestedNameSpec, and TemplateKWLoc.
Referenced by Create().
|
static |
Definition at line 93 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 |
Definition at line 360 of file ASTDumper.cpp.
References clang::ASTNodeTraverser< Derived, NodeDelegateType >::Visit().
| void clang::ConceptReference::dump | ( | llvm::raw_ostream & | OS, |
| const ASTContext & | Context ) const |
| SourceLocation ConceptReference::getBeginLoc | ( | ) | const |
Definition at line 106 of file ASTConcept.cpp.
References clang::DeclarationNameInfo::getBeginLoc(), getConceptNameInfo(), and getNestedNameSpecifierLoc().
Referenced by getSourceRange().
|
inline |
Definition at line 171 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 173 of file ASTConcept.h.
References getConceptNameInfo(), and clang::DeclarationNameInfo::getLoc().
Referenced by getLocation().
|
inline |
Definition at line 183 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 194 of file ASTConcept.h.
References FoundDecl.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::ASTNodeImporter::import(), and clang::Sema::SubstTypeConstraint().
|
inline |
Definition at line 179 of file ASTConcept.h.
References getConceptNameLoc().
Referenced by clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 198 of file ASTConcept.h.
References NamedConcept.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::Sema::CheckConstraintSatisfaction(), clang::ASTNodeImporter::import(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 167 of file ASTConcept.h.
References NestedNameSpec.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getBeginLoc(), and clang::ASTNodeImporter::import().
|
inline |
Definition at line 190 of file ASTConcept.h.
References getBeginLoc(), and getEndLoc().
Referenced by clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 200 of file ASTConcept.h.
References ArgsAsWritten.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getEndLoc(), clang::ASTNodeImporter::import(), clang::ASTContext::isSameTypeConstraint(), clang::SubstituteParameterMappings::substitute(), and clang::JSONNodeDumper::Visit().
|
inline |
Definition at line 177 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 206 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 113 of file ASTConcept.cpp.
References ArgsAsWritten, hasExplicitTemplateArgs(), NamedConcept, NestedNameSpec, and clang::TemplateName::None.
|
protected |
The template argument list source info used to specialize the concept.
Definition at line 150 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), getTemplateArgsAsWritten(), hasExplicitTemplateArgs(), and print().
|
protected |
The concept name used.
Definition at line 137 of file ASTConcept.h.
Referenced by ConceptReference(), and getConceptNameInfo().
|
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 143 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), and getFoundDecl().
|
protected |
The concept named.
Definition at line 146 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), getNamedConcept(), and print().
|
protected |
Definition at line 130 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 134 of file ASTConcept.h.
Referenced by ConceptReference(), Create(), and getTemplateKWLoc().