class DependentScopeDeclRefExpr
Declaration
class DependentScopeDeclRefExpr : public Expr, private TrailingObjects { /* full declaration omitted */ };
Description
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 one 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.
Declared at: clang/include/clang/AST/ExprCXX.h:3208
Inherits from: Expr, TrailingObjects
Member Variables
- private clang::NestedNameSpecifierLoc QualifierLoc
- The nested-name-specifier that qualifies this unresolved declaration name.
- private clang::DeclarationNameInfo NameInfo
- The name of the entity we will be referencing.
Inherited from Stmt:
Method Overview
- public static clang::DependentScopeDeclRefExpr * Create(const clang::ASTContext & Context, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation TemplateKWLoc, const clang::DeclarationNameInfo & NameInfo, const clang::TemplateArgumentListInfo * TemplateArgs)
- public static clang::DependentScopeDeclRefExpr * CreateEmpty(const clang::ASTContext & Context, bool HasTemplateKWAndArgsInfo, unsigned int NumTemplateArgs)
- private DependentScopeDeclRefExpr(clang::QualType Ty, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation TemplateKWLoc, const clang::DeclarationNameInfo & NameInfo, const clang::TemplateArgumentListInfo * Args)
- public clang::Stmt::const_child_range children() const
- public clang::Stmt::child_range children()
- public static bool classof(const clang::Stmt * T)
- public void copyTemplateArgumentsInto(clang::TemplateArgumentListInfo & List) const
- public clang::SourceLocation getBeginLoc() const
- public clang::DeclarationName getDeclName() const
- public clang::SourceLocation getEndLoc() const
- public clang::SourceLocation getLAngleLoc() const
- public clang::SourceLocation getLocation() const
- public const clang::DeclarationNameInfo & getNameInfo() const
- public unsigned int getNumTemplateArgs() const
- public clang::NestedNameSpecifier * getQualifier() const
- public clang::NestedNameSpecifierLoc getQualifierLoc() const
- public clang::SourceLocation getRAngleLoc() const
- public const clang::TemplateArgumentLoc * getTemplateArgs() const
- public clang::SourceLocation getTemplateKeywordLoc() const
- public bool hasExplicitTemplateArgs() const
- private bool hasTemplateKWAndArgsInfo() const
- public bool hasTemplateKeyword() const
- private size_t numTrailingObjects(OverloadToken<clang::ASTTemplateKWAndArgsInfo>) const
- public ArrayRef<clang::TemplateArgumentLoc> template_arguments() const
Inherited from Expr:
- public Classify
- public ClassifyLValue
- public ClassifyModifiable
- public EvaluateAsBooleanCondition
- public EvaluateAsConstantExpr
- public EvaluateAsFixedPoint
- public EvaluateAsFloat
- public EvaluateAsInitializer
- public EvaluateAsInt
- public EvaluateAsLValue
- public EvaluateAsRValue
- public EvaluateForOverflow
- public EvaluateKnownConstInt
- public EvaluateKnownConstIntCheckOverflow
- public EvaluateWithSubstitution
- public HasSideEffects
- public IgnoreCasts
- public IgnoreCasts
- public IgnoreConversionOperatorSingleStep
- public IgnoreConversionOperatorSingleStep
- public IgnoreImpCasts
- public IgnoreImpCasts
- public IgnoreImplicit
- public IgnoreImplicit
- public IgnoreImplicitAsWritten
- public IgnoreImplicitAsWritten
- public IgnoreParenBaseCasts
- public IgnoreParenBaseCasts
- public IgnoreParenCasts
- public IgnoreParenCasts
- public IgnoreParenImpCasts
- public IgnoreParenImpCasts
- public IgnoreParenLValueCasts
- public IgnoreParenLValueCasts
- public IgnoreParenNoopCasts
- public IgnoreParenNoopCasts
- public IgnoreParens
- public IgnoreParens
- public IgnoreUnlessSpelledInSource
- public IgnoreUnlessSpelledInSource
- public classof
- public containsErrors
- public containsUnexpandedParameterPack
- public findBoundMemberType
- public getAsBuiltinConstantDeclRef
- public getBestDynamicClassType
- public getBestDynamicClassTypeExpr
- public getDependence
- public getExprLoc
- public getFPFeaturesInEffect
- public getIntegerConstantExpr
- public getObjCProperty
- public getObjectKind
- public getReferencedDeclOfCallee
- public getReferencedDeclOfCallee
- public getSourceBitField
- public getSourceBitField
- public getType
- public getValueKind
- public getValueKindForType
- public hasAnyTypeDependentArguments
- public hasNonTrivialCall
- public hasPlaceholderType
- public hasPlaceholderType
- public isBoundMemberFunction
- public isCXX11ConstantExpr
- public isCXX98IntegralConstantExpr
- public isConstantInitializer
- public isDefaultArgument
- public isEvaluatable
- public isGLValue
- public isImplicitCXXThis
- public isInstantiationDependent
- public isIntegerConstantExpr
- public isKnownToHaveBooleanValue
- public isLValue
- public isModifiableLvalue
- public isNullPointerConstant
- public isOBJCGCCandidate
- public isObjCSelfExpr
- public isOrdinaryOrBitFieldObject
- public isPRValue
- public isPotentialConstantExpr
- public isPotentialConstantExprUnevaluated
- public isReadIfDiscardedInCPlusPlus11
- public isSameComparisonOperand
- public isTemporaryObject
- public isTypeDependent
- public isUnusedResultAWarning
- public isValueDependent
- public isXValue
- public refersToBitField
- public refersToGlobalRegisterVar
- public refersToMatrixElement
- public refersToVectorElement
- protected setDependence
- public setObjectKind
- public setType
- public setValueKind
- public skipRValueSubobjectAdjustments
- public skipRValueSubobjectAdjustments
- public tryEvaluateObjectSize
- public tryEvaluateStrLen
Inherited from ValueStmt:
Inherited from Stmt:
- public EnableStatistics
- public IgnoreContainers
- public IgnoreContainers
- public PrintStats
- public ProcessODRHash
- public Profile
- public addStmtClass
- public child_begin
- public child_begin
- public child_end
- public child_end
- public children
- public children
- public determineLikelihoodConflict
- public dump
- public dump
- public dumpColor
- public dumpPretty
- public getBeginLoc
- public getEndLoc
- public getID
- public getLikelihood
- public getLikelihood
- public getLikelihood
- public getLikelihoodAttr
- public getSourceRange
- public getStmtClass
- public getStmtClassName
- public printJson
- public printPretty
- public printPrettyControlled
- public stripLabelLikeStatements
- public stripLabelLikeStatements
- public viewAST
Methods
¶static clang::DependentScopeDeclRefExpr* Create(
const clang::ASTContext& Context,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation TemplateKWLoc,
const clang::DeclarationNameInfo& NameInfo,
const clang::TemplateArgumentListInfo*
TemplateArgs)
static clang::DependentScopeDeclRefExpr* Create(
const clang::ASTContext& Context,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation TemplateKWLoc,
const clang::DeclarationNameInfo& NameInfo,
const clang::TemplateArgumentListInfo*
TemplateArgs)
Declared at: clang/include/clang/AST/ExprCXX.h:3239
Parameters
- const clang::ASTContext& Context
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation TemplateKWLoc
- const clang::DeclarationNameInfo& NameInfo
- const clang::TemplateArgumentListInfo* TemplateArgs
¶static clang::DependentScopeDeclRefExpr*
CreateEmpty(const clang::ASTContext& Context,
bool HasTemplateKWAndArgsInfo,
unsigned int NumTemplateArgs)
static clang::DependentScopeDeclRefExpr*
CreateEmpty(const clang::ASTContext& Context,
bool HasTemplateKWAndArgsInfo,
unsigned int NumTemplateArgs)
Declared at: clang/include/clang/AST/ExprCXX.h:3243
Parameters
- const clang::ASTContext& Context
- bool HasTemplateKWAndArgsInfo
- unsigned int NumTemplateArgs
¶DependentScopeDeclRefExpr(
clang::QualType Ty,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation TemplateKWLoc,
const clang::DeclarationNameInfo& NameInfo,
const clang::TemplateArgumentListInfo* Args)
DependentScopeDeclRefExpr(
clang::QualType Ty,
clang::NestedNameSpecifierLoc QualifierLoc,
clang::SourceLocation TemplateKWLoc,
const clang::DeclarationNameInfo& NameInfo,
const clang::TemplateArgumentListInfo* Args)
Declared at: clang/include/clang/AST/ExprCXX.h:3224
Parameters
- clang::QualType Ty
- clang::NestedNameSpecifierLoc QualifierLoc
- clang::SourceLocation TemplateKWLoc
- const clang::DeclarationNameInfo& NameInfo
- const clang::TemplateArgumentListInfo* Args
¶clang::Stmt::const_child_range children() const
clang::Stmt::const_child_range children() const
Declared at: clang/include/clang/AST/ExprCXX.h:3344
¶clang::Stmt::child_range children()
clang::Stmt::child_range children()
Declared at: clang/include/clang/AST/ExprCXX.h:3340
¶static bool classof(const clang::Stmt* T)
static bool classof(const clang::Stmt* T)
Declared at: clang/include/clang/AST/ExprCXX.h:3336
Parameters
- const clang::Stmt* T
¶void copyTemplateArgumentsInto(
clang::TemplateArgumentListInfo& List) const
void copyTemplateArgumentsInto(
clang::TemplateArgumentListInfo& List) const
Description
Copies the template arguments (if present) into the given structure.
Declared at: clang/include/clang/AST/ExprCXX.h:3300
Parameters
¶clang::SourceLocation getBeginLoc() const
clang::SourceLocation getBeginLoc() const
Description
Note: getBeginLoc() is the start of the whole DependentScopeDeclRefExpr, and differs from getLocation().getStart().
Declared at: clang/include/clang/AST/ExprCXX.h:3326
¶clang::DeclarationName getDeclName() const
clang::DeclarationName getDeclName() const
Description
Retrieve the name that this expression refers to.
Declared at: clang/include/clang/AST/ExprCXX.h:3251
¶clang::SourceLocation getEndLoc() const
clang::SourceLocation getEndLoc() const
Declared at: clang/include/clang/AST/ExprCXX.h:3330
¶clang::SourceLocation getLAngleLoc() const
clang::SourceLocation getLAngleLoc() const
Description
Retrieve the location of the left angle bracket starting the explicit template argument list following the name, if any.
Declared at: clang/include/clang/AST/ExprCXX.h:3278
¶clang::SourceLocation getLocation() const
clang::SourceLocation getLocation() const
Description
Retrieve the location of the name within the expression. For example, in "X<T>::value" this is the location of "value".
Declared at: clang/include/clang/AST/ExprCXX.h:3256
¶const clang::DeclarationNameInfo& getNameInfo()
const
const clang::DeclarationNameInfo& getNameInfo()
const
Description
Retrieve the name that this expression refers to.
Declared at: clang/include/clang/AST/ExprCXX.h:3248
¶unsigned int getNumTemplateArgs() const
unsigned int getNumTemplateArgs() const
Declared at: clang/include/clang/AST/ExprCXX.h:3313
¶clang::NestedNameSpecifier* getQualifier() const
clang::NestedNameSpecifier* getQualifier() const
Description
Retrieve the nested-name-specifier that qualifies this declaration.
Declared at: clang/include/clang/AST/ExprCXX.h:3264
¶clang::NestedNameSpecifierLoc getQualifierLoc()
const
clang::NestedNameSpecifierLoc getQualifierLoc()
const
Description
Retrieve the nested-name-specifier that qualifies the name, with source location information.
Declared at: clang/include/clang/AST/ExprCXX.h:3260
¶clang::SourceLocation getRAngleLoc() const
clang::SourceLocation getRAngleLoc() const
Description
Retrieve the location of the right angle bracket ending the explicit template argument list following the name, if any.
Declared at: clang/include/clang/AST/ExprCXX.h:3286
¶const clang::TemplateArgumentLoc*
getTemplateArgs() const
const clang::TemplateArgumentLoc*
getTemplateArgs() const
Declared at: clang/include/clang/AST/ExprCXX.h:3306
¶clang::SourceLocation getTemplateKeywordLoc()
const
clang::SourceLocation getTemplateKeywordLoc()
const
Description
Retrieve the location of the template keyword preceding this name, if any.
Declared at: clang/include/clang/AST/ExprCXX.h:3270
¶bool hasExplicitTemplateArgs() const
bool hasExplicitTemplateArgs() const
Description
Determines whether this lookup had explicit template arguments.
Declared at: clang/include/clang/AST/ExprCXX.h:3296
¶bool hasTemplateKWAndArgsInfo() const
bool hasTemplateKWAndArgsInfo() const
Declared at: clang/include/clang/AST/ExprCXX.h:3233
¶bool hasTemplateKeyword() const
bool hasTemplateKeyword() const
Description
Determines whether the name was preceded by the template keyword.
Declared at: clang/include/clang/AST/ExprCXX.h:3293
¶size_t numTrailingObjects(
OverloadToken<
clang::ASTTemplateKWAndArgsInfo>) const
size_t numTrailingObjects(
OverloadToken<
clang::ASTTemplateKWAndArgsInfo>) const
Declared at: clang/include/clang/AST/ExprCXX.h:3229
Parameters
- OverloadToken<clang::ASTTemplateKWAndArgsInfo>
¶ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const
ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const
Declared at: clang/include/clang/AST/ExprCXX.h:3320