clang 18.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 |
ConceptDecl * | 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, ConceptDecl *NamedConcept, const ASTTemplateArgumentListInfo *ArgsAsWritten) |
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.
|
static |
Definition at line 93 of file ASTConcept.cpp.
References clang::C.
Referenced by clang::Sema::AttachTypeConstraint(), clang::Sema::CheckConceptTemplateId(), createTrivialConceptReference(), clang::ASTNodeImporter::import(), and clang::ASTRecordReader::readConceptReference().
LLVM_DUMP_METHOD void ConceptReference::dump | ( | ) | const |
void clang::ConceptReference::dump | ( | llvm::raw_ostream & | ) | const |
|
inline |
Definition at line 181 of file ASTConcept.h.
References clang::DeclarationNameInfo::getBeginLoc(), getConceptNameInfo(), and getNestedNameSpecifierLoc().
Referenced by clang::ConceptSpecializationExpr::getBeginLoc(), and getSourceRange().
|
inline |
Definition at line 171 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getBeginLoc(), clang::TypeConstraint::getConceptNameInfo(), clang::ConceptSpecializationExpr::getConceptNameInfo(), 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 clang::TypeConstraint::getConceptNameLoc(), clang::ConceptSpecializationExpr::getConceptNameLoc(), and getLocation().
|
inline |
Definition at line 188 of file ASTConcept.h.
References getConceptNameInfo(), clang::DeclarationNameInfo::getEndLoc(), clang::ASTTemplateArgumentListInfo::getRAngleLoc(), getTemplateArgsAsWritten(), and clang::SourceLocation::isValid().
Referenced by clang::ConceptSpecializationExpr::getEndLoc(), and getSourceRange().
|
inline |
Definition at line 199 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::TypeConstraint::getFoundDecl(), clang::ConceptSpecializationExpr::getFoundDecl(), and clang::ASTNodeImporter::import().
|
inline |
Definition at line 179 of file ASTConcept.h.
References getConceptNameLoc().
Referenced by clang::ConceptSpecializationExpr::getExprLoc().
|
inline |
Definition at line 203 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::TypeConstraint::getNamedConcept(), clang::ConceptSpecializationExpr::getNamedConcept(), clang::ASTNodeImporter::import(), and clang::TextNodeDumper::Visit().
|
inline |
Definition at line 167 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getBeginLoc(), clang::TypeConstraint::getNestedNameSpecifierLoc(), clang::ConceptSpecializationExpr::getNestedNameSpecifierLoc(), and clang::ASTNodeImporter::import().
|
inline |
Definition at line 195 of file ASTConcept.h.
References getBeginLoc(), and getEndLoc().
Referenced by clang::TextNodeDumper::Visit().
|
inline |
Definition at line 207 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), getEndLoc(), clang::TypeConstraint::getTemplateArgsAsWritten(), clang::ConceptSpecializationExpr::getTemplateArgsAsWritten(), clang::ASTNodeImporter::import(), and clang::ASTContext::isSameTypeConstraint().
|
inline |
Definition at line 177 of file ASTConcept.h.
Referenced by clang::ASTRecordWriter::AddConceptReference(), clang::TypeConstraint::getTemplateKWLoc(), clang::ConceptSpecializationExpr::getTemplateKWLoc(), 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 213 of file ASTConcept.h.
Referenced by clang::TypeConstraint::hasExplicitTemplateArgs(), clang::ConceptSpecializationExpr::hasExplicitTemplateArgs(), clang::ASTContext::isSameTypeConstraint(), and print().
void ConceptReference::print | ( | llvm::raw_ostream & | OS, |
const PrintingPolicy & | Policy | ||
) | const |
Definition at line 102 of file ASTConcept.cpp.
References clang::ASTTemplateArgumentListInfo::arguments(), clang::NestedNameSpecifierLoc::getNestedNameSpecifier(), hasExplicitTemplateArgs(), clang::NestedNameSpecifier::print(), and clang::DeclarationNameInfo::printName().
Referenced by clang::TypeConstraint::print().