clang API Documentation
A qualified reference to a name whose declaration cannot yet be resolved. More...
#include <ExprCXX.h>


Public Member Functions | |
| const DeclarationNameInfo & | getNameInfo () const |
| Retrieve the name that this expression refers to. | |
| DeclarationName | getDeclName () const |
| Retrieve the name that this expression refers to. | |
| SourceLocation | getLocation () const |
| Retrieve the location of the name within the expression. | |
| NestedNameSpecifierLoc | getQualifierLoc () const |
| Retrieve the nested-name-specifier that qualifies the name, with source location information. | |
| NestedNameSpecifier * | getQualifier () const |
| Retrieve the nested-name-specifier that qualifies this declaration. | |
| SourceLocation | getTemplateKeywordLoc () const |
| Retrieve the location of the template keyword preceding this name, if any. | |
| SourceLocation | getLAngleLoc () const |
| Retrieve the location of the left angle bracket starting the explicit template argument list following the name, if any. | |
| SourceLocation | getRAngleLoc () const |
| Retrieve the location of the right angle bracket ending the explicit template argument list following the name, if any. | |
| bool | hasTemplateKeyword () const |
| Determines whether the name was preceded by the template keyword. | |
| bool | hasExplicitTemplateArgs () const |
| Determines whether this lookup had explicit template arguments. | |
| ASTTemplateArgumentListInfo & | getExplicitTemplateArgs () |
| const ASTTemplateArgumentListInfo & | getExplicitTemplateArgs () const |
| Gets a reference to the explicit template argument list. | |
| const ASTTemplateArgumentListInfo * | getOptionalExplicitTemplateArgs () |
| Retrieves the optional explicit template arguments. This points to the same data as getExplicitTemplateArgs(), but returns null if there are no explicit template arguments. | |
| void | copyTemplateArgumentsInto (TemplateArgumentListInfo &List) const |
| Copies the template arguments (if present) into the given structure. | |
| TemplateArgumentLoc const * | getTemplateArgs () const |
| unsigned | getNumTemplateArgs () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
| child_range | children () |
Static Public Member Functions | |
| static DependentScopeDeclRefExpr * | Create (ASTContext &C, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &NameInfo, const TemplateArgumentListInfo *TemplateArgs) |
| static DependentScopeDeclRefExpr * | CreateEmpty (ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs) |
| static bool | classof (const Stmt *T) |
| static bool | classof (const DependentScopeDeclRefExpr *) |
Friends | |
| class | ASTStmtReader |
| class | ASTStmtWriter |
A qualified reference to a name whose declaration cannot yet be resolved.
DependentScopeDeclRefExpr is similar to DeclRefExpr in that it expresses a reference to a declaration such as X<T>::value. The difference, however, is that an DependentScopeDeclRefExpr node is used only within C++ templates when the qualification (e.g., X<T>::) refers to a dependent type. In this case, X<T>::value cannot resolve to a declaration because the declaration will differ from on instantiation of X<T> to the next. Therefore, DependentScopeDeclRefExpr keeps track of the qualifier (X<T>::) and the name of the entity being referenced ("value"). Such expressions will instantiate to a DeclRefExpr once the declaration can be found.
| child_range clang::DependentScopeDeclRefExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
| static bool clang::DependentScopeDeclRefExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::Expr.
Definition at line 2677 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
| static bool clang::DependentScopeDeclRefExpr::classof | ( | const DependentScopeDeclRefExpr * | ) | [inline, static] |
| void clang::DependentScopeDeclRefExpr::copyTemplateArgumentsInto | ( | TemplateArgumentListInfo & | List | ) | const [inline] |
Copies the template arguments (if present) into the given structure.
Definition at line 2658 of file ExprCXX.h.
References clang::ASTTemplateArgumentListInfo::copyInto(), and getExplicitTemplateArgs().
| DependentScopeDeclRefExpr * DependentScopeDeclRefExpr::Create | ( | ASTContext & | C, |
| NestedNameSpecifierLoc | QualifierLoc, | ||
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | NameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs | ||
| ) | [static] |
Definition at line 365 of file ExprCXX.cpp.
References clang::ASTContext::Allocate(), clang::ASTContext::DependentTy, clang::SourceLocation::isValid(), clang::TemplateArgumentListInfo::size(), and clang::ASTTemplateKWAndArgsInfo::sizeFor().
Referenced by clang::Sema::BuildDependentDeclRefExpr(), and clang::Sema::CheckTemplateArgument().
| DependentScopeDeclRefExpr * DependentScopeDeclRefExpr::CreateEmpty | ( | ASTContext & | C, |
| bool | HasTemplateKWAndArgsInfo, | ||
| unsigned | NumTemplateArgs | ||
| ) | [static] |
Definition at line 381 of file ExprCXX.cpp.
References clang::ASTContext::Allocate(), and clang::ASTTemplateKWAndArgsInfo::sizeFor().
| DeclarationName clang::DependentScopeDeclRefExpr::getDeclName | ( | ) | const [inline] |
Retrieve the name that this expression refers to.
Definition at line 2590 of file ExprCXX.h.
References clang::DeclarationNameInfo::getName().
| ASTTemplateArgumentListInfo& clang::DependentScopeDeclRefExpr::getExplicitTemplateArgs | ( | ) | [inline] |
Definition at line 2637 of file ExprCXX.h.
References hasExplicitTemplateArgs().
Referenced by copyTemplateArgumentsInto(), getNumTemplateArgs(), getOptionalExplicitTemplateArgs(), and getTemplateArgs().
| const ASTTemplateArgumentListInfo& clang::DependentScopeDeclRefExpr::getExplicitTemplateArgs | ( | ) | const [inline] |
Gets a reference to the explicit template argument list.
Definition at line 2643 of file ExprCXX.h.
References hasExplicitTemplateArgs().
| SourceLocation clang::DependentScopeDeclRefExpr::getLAngleLoc | ( | ) | const [inline] |
Retrieve the location of the left angle bracket starting the explicit template argument list following the name, if any.
Definition at line 2615 of file ExprCXX.h.
References clang::ASTTemplateArgumentListInfo::LAngleLoc.
Referenced by hasExplicitTemplateArgs().
| SourceLocation clang::DependentScopeDeclRefExpr::getLocation | ( | ) | const [inline] |
Retrieve the location of the name within the expression.
Definition at line 2593 of file ExprCXX.h.
References clang::DeclarationNameInfo::getLoc().
Referenced by getSourceRange().
| const DeclarationNameInfo& clang::DependentScopeDeclRefExpr::getNameInfo | ( | ) | const [inline] |
Retrieve the name that this expression refers to.
| unsigned clang::DependentScopeDeclRefExpr::getNumTemplateArgs | ( | ) | const [inline] |
Definition at line 2666 of file ExprCXX.h.
References getExplicitTemplateArgs(), and clang::ASTTemplateArgumentListInfo::NumTemplateArgs.
| const ASTTemplateArgumentListInfo* clang::DependentScopeDeclRefExpr::getOptionalExplicitTemplateArgs | ( | ) | [inline] |
Retrieves the optional explicit template arguments. This points to the same data as getExplicitTemplateArgs(), but returns null if there are no explicit template arguments.
Definition at line 2651 of file ExprCXX.h.
References getExplicitTemplateArgs(), and hasExplicitTemplateArgs().
| NestedNameSpecifier* clang::DependentScopeDeclRefExpr::getQualifier | ( | ) | const [inline] |
Retrieve the nested-name-specifier that qualifies this declaration.
Definition at line 2602 of file ExprCXX.h.
References clang::NestedNameSpecifierLoc::getNestedNameSpecifier().
| NestedNameSpecifierLoc clang::DependentScopeDeclRefExpr::getQualifierLoc | ( | ) | const [inline] |
| SourceLocation clang::DependentScopeDeclRefExpr::getRAngleLoc | ( | ) | const [inline] |
Retrieve the location of the right angle bracket ending the explicit template argument list following the name, if any.
Definition at line 2622 of file ExprCXX.h.
References clang::ASTTemplateArgumentListInfo::RAngleLoc.
Referenced by getSourceRange().
| SourceRange clang::DependentScopeDeclRefExpr::getSourceRange | ( | ) | const [inline] |
SourceLocation tokens are not useful in isolation - they are low level value objects created/interpreted by SourceManager. We assume AST clients will have a pointer to the respective SourceManager.
Reimplemented from clang::Stmt.
Definition at line 2670 of file ExprCXX.h.
References clang::NestedNameSpecifierLoc::getBeginLoc(), getLocation(), getRAngleLoc(), hasExplicitTemplateArgs(), and clang::SourceRange::setEnd().
| TemplateArgumentLoc const* clang::DependentScopeDeclRefExpr::getTemplateArgs | ( | ) | const [inline] |
Definition at line 2662 of file ExprCXX.h.
References getExplicitTemplateArgs(), and clang::ASTTemplateArgumentListInfo::getTemplateArgs().
| SourceLocation clang::DependentScopeDeclRefExpr::getTemplateKeywordLoc | ( | ) | const [inline] |
Retrieve the location of the template keyword preceding this name, if any.
Definition at line 2608 of file ExprCXX.h.
References clang::ASTTemplateKWAndArgsInfo::getTemplateKeywordLoc().
Referenced by hasTemplateKeyword().
| bool clang::DependentScopeDeclRefExpr::hasExplicitTemplateArgs | ( | ) | const [inline] |
Determines whether this lookup had explicit template arguments.
Definition at line 2631 of file ExprCXX.h.
References getLAngleLoc(), and clang::SourceLocation::isValid().
Referenced by getExplicitTemplateArgs(), getOptionalExplicitTemplateArgs(), and getSourceRange().
| bool clang::DependentScopeDeclRefExpr::hasTemplateKeyword | ( | ) | const [inline] |
Determines whether the name was preceded by the template keyword.
Definition at line 2628 of file ExprCXX.h.
References getTemplateKeywordLoc(), and clang::SourceLocation::isValid().
friend class ASTStmtReader [friend] |
Reimplemented from clang::Stmt.
friend class ASTStmtWriter [friend] |
Reimplemented from clang::Stmt.