class CXXDependentScopeMemberExpr

Declaration

class CXXDependentScopeMemberExpr : public Expr,
                                    private TrailingObjects { /* full declaration omitted */ };

Description

Represents a C++ member access expression where the actual member referenced could not be resolved because the base expression or the member name was dependent. Like UnresolvedMemberExprs, these can be either implicit or explicit accesses. It is only possible to get one of these with an implicit access if a qualifier is provided.

Declared at: clang/include/clang/AST/ExprCXX.h:3567

Inherits from: Expr, TrailingObjects

Member Variables

private clang::Stmt* Base
The expression for the base pointer or class reference, e.g., the \c x in x.f. Can be null in implicit accesses.
private clang::QualType BaseType
The type of the base expression. Never null, even for implicit accesses.
private clang::NestedNameSpecifierLoc QualifierLoc
The nested-name-specifier that precedes the member name, if any. FIXME: This could be in principle store as a trailing object. However the performance impact of doing so should be investigated first.
private clang::DeclarationNameInfo MemberNameInfo
FIXME: could also be a template-id

Inherited from Stmt:

protected

Method Overview

  • private CXXDependentScopeMemberExpr(clang::Stmt::EmptyShell Empty, bool HasTemplateKWAndArgsInfo, bool HasFirstQualifierFoundInScope)
  • private CXXDependentScopeMemberExpr(const clang::ASTContext & Ctx, clang::Expr * Base, clang::QualType BaseType, bool IsArrow, clang::SourceLocation OperatorLoc, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation TemplateKWLoc, clang::NamedDecl * FirstQualifierFoundInScope, clang::DeclarationNameInfo MemberNameInfo, const clang::TemplateArgumentListInfo * TemplateArgs)
  • public static clang::CXXDependentScopeMemberExpr * Create(const clang::ASTContext & Ctx, clang::Expr * Base, clang::QualType BaseType, bool IsArrow, clang::SourceLocation OperatorLoc, clang::NestedNameSpecifierLoc QualifierLoc, clang::SourceLocation TemplateKWLoc, clang::NamedDecl * FirstQualifierFoundInScope, clang::DeclarationNameInfo MemberNameInfo, const clang::TemplateArgumentListInfo * TemplateArgs)
  • public static clang::CXXDependentScopeMemberExpr * CreateEmpty(const clang::ASTContext & Ctx, bool HasTemplateKWAndArgsInfo, unsigned int NumTemplateArgs, bool HasFirstQualifierFoundInScope)
  • 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::Expr * getBase() const
  • public clang::QualType getBaseType() const
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::NamedDecl * getFirstQualifierFoundInScope() const
  • public clang::SourceLocation getLAngleLoc() const
  • public clang::DeclarationName getMember() const
  • public clang::SourceLocation getMemberLoc() const
  • public const clang::DeclarationNameInfo & getMemberNameInfo() const
  • public unsigned int getNumTemplateArgs() const
  • public clang::SourceLocation getOperatorLoc() 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 hasFirstQualifierFoundInScope() const
  • private bool hasTemplateKWAndArgsInfo() const
  • public bool hasTemplateKeyword() const
  • public bool isArrow() const
  • public bool isImplicitAccess() const
  • private unsigned int numTrailingObjects(OverloadToken<clang::NamedDecl *>) const
  • private unsigned int numTrailingObjects(OverloadToken<clang::TemplateArgumentLoc>) const
  • private unsigned int numTrailingObjects(OverloadToken<clang::ASTTemplateKWAndArgsInfo>) const
  • public ArrayRef<clang::TemplateArgumentLoc> template_arguments() const

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXDependentScopeMemberExpr(
    clang::Stmt::EmptyShell Empty,
    bool HasTemplateKWAndArgsInfo,
    bool HasFirstQualifierFoundInScope)

Declared at: clang/include/clang/AST/ExprCXX.h:3639

Parameters

clang::Stmt::EmptyShell Empty
bool HasTemplateKWAndArgsInfo
bool HasFirstQualifierFoundInScope

CXXDependentScopeMemberExpr(
    const clang::ASTContext& Ctx,
    clang::Expr* Base,
    clang::QualType BaseType,
    bool IsArrow,
    clang::SourceLocation OperatorLoc,
    clang::NestedNameSpecifierLoc QualifierLoc,
    clang::SourceLocation TemplateKWLoc,
    clang::NamedDecl* FirstQualifierFoundInScope,
    clang::DeclarationNameInfo MemberNameInfo,
    const clang::TemplateArgumentListInfo*
        TemplateArgs)

Declared at: clang/include/clang/AST/ExprCXX.h:3630

Parameters

const clang::ASTContext& Ctx
clang::Expr* Base
clang::QualType BaseType
bool IsArrow
clang::SourceLocation OperatorLoc
clang::NestedNameSpecifierLoc QualifierLoc
clang::SourceLocation TemplateKWLoc
clang::NamedDecl* FirstQualifierFoundInScope
clang::DeclarationNameInfo MemberNameInfo
const clang::TemplateArgumentListInfo* TemplateArgs

static clang::CXXDependentScopeMemberExpr* Create(
    const clang::ASTContext& Ctx,
    clang::Expr* Base,
    clang::QualType BaseType,
    bool IsArrow,
    clang::SourceLocation OperatorLoc,
    clang::NestedNameSpecifierLoc QualifierLoc,
    clang::SourceLocation TemplateKWLoc,
    clang::NamedDecl* FirstQualifierFoundInScope,
    clang::DeclarationNameInfo MemberNameInfo,
    const clang::TemplateArgumentListInfo*
        TemplateArgs)

Declared at: clang/include/clang/AST/ExprCXX.h:3644

Parameters

const clang::ASTContext& Ctx
clang::Expr* Base
clang::QualType BaseType
bool IsArrow
clang::SourceLocation OperatorLoc
clang::NestedNameSpecifierLoc QualifierLoc
clang::SourceLocation TemplateKWLoc
clang::NamedDecl* FirstQualifierFoundInScope
clang::DeclarationNameInfo MemberNameInfo
const clang::TemplateArgumentListInfo* TemplateArgs

static clang::CXXDependentScopeMemberExpr*
CreateEmpty(const clang::ASTContext& Ctx,
            bool HasTemplateKWAndArgsInfo,
            unsigned int NumTemplateArgs,
            bool HasFirstQualifierFoundInScope)

Declared at: clang/include/clang/AST/ExprCXX.h:3651

Parameters

const clang::ASTContext& Ctx
bool HasTemplateKWAndArgsInfo
unsigned int NumTemplateArgs
bool HasFirstQualifierFoundInScope

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/ExprCXX.h:3805

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/ExprCXX.h:3799

static bool classof(const clang::Stmt* T)

Declared at: clang/include/clang/AST/ExprCXX.h:3794

Parameters

const clang::Stmt* T

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:3752

Parameters

clang::TemplateArgumentListInfo& List

clang::Expr* getBase() const

Description

Retrieve the base object of this member expressions, e.g., the \c x in \c x.m.

Declared at: clang/include/clang/AST/ExprCXX.h:3665

clang::QualType getBaseType() const

Declared at: clang/include/clang/AST/ExprCXX.h:3670

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:3780

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:3788

clang::NamedDecl* getFirstQualifierFoundInScope()
    const

Description

Retrieve the first part of the nested-name-specifier that was found in the scope of the member access expression when the member access was initially parsed. This function only returns a useful result when member access expression uses a qualified member name, e.g., "x.Base::f". Here, the declaration returned by this function describes what was found by unqualified name lookup for the identifier "Base" within the scope of the member access expression itself. At template instantiation time, this information is combined with the results of name lookup into the type of the object expression itself (the class type of x).

Declared at: clang/include/clang/AST/ExprCXX.h:3701

clang::SourceLocation getLAngleLoc() const

Description

Retrieve the location of the left angle bracket starting the explicit template argument list following the member name, if any.

Declared at: clang/include/clang/AST/ExprCXX.h:3729

clang::DeclarationName getMember() const

Description

Retrieve the name of the member that this expression refers to.

Declared at: clang/include/clang/AST/ExprCXX.h:3713

clang::SourceLocation getMemberLoc() const

Declared at: clang/include/clang/AST/ExprCXX.h:3717

const clang::DeclarationNameInfo&
getMemberNameInfo() const

Description

Retrieve the name of the member that this expression refers to.

Declared at: clang/include/clang/AST/ExprCXX.h:3708

unsigned int getNumTemplateArgs() const

Description

Retrieve the number of template arguments provided as part of this template-id.

Declared at: clang/include/clang/AST/ExprCXX.h:3769

clang::SourceLocation getOperatorLoc() const

Description

Retrieve the location of the '->' or '.' operator.

Declared at: clang/include/clang/AST/ExprCXX.h:3677

clang::NestedNameSpecifier* getQualifier() const

Description

Retrieve the nested-name-specifier that qualifies the member name.

Declared at: clang/include/clang/AST/ExprCXX.h:3682

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

Retrieve the nested-name-specifier that qualifies the member name, with source location information.

Declared at: clang/include/clang/AST/ExprCXX.h:3688

clang::SourceLocation getRAngleLoc() const

Description

Retrieve the location of the right angle bracket ending the explicit template argument list following the member name, if any.

Declared at: clang/include/clang/AST/ExprCXX.h:3737

const clang::TemplateArgumentLoc*
getTemplateArgs() const

Description

Retrieve the template arguments provided as part of this template-id.

Declared at: clang/include/clang/AST/ExprCXX.h:3760

clang::SourceLocation getTemplateKeywordLoc()
    const

Description

Retrieve the location of the template keyword preceding the member name, if any.

Declared at: clang/include/clang/AST/ExprCXX.h:3721

bool hasExplicitTemplateArgs() const

Description

Determines whether this member expression actually had a C++ template argument list explicitly specified, e.g., x.f <int >.

Declared at: clang/include/clang/AST/ExprCXX.h:3748

bool hasFirstQualifierFoundInScope() const

Declared at: clang/include/clang/AST/ExprCXX.h:3614

bool hasTemplateKWAndArgsInfo() const

Declared at: clang/include/clang/AST/ExprCXX.h:3610

bool hasTemplateKeyword() const

Description

Determines whether the member name was preceded by the template keyword.

Declared at: clang/include/clang/AST/ExprCXX.h:3744

bool isArrow() const

Description

Determine whether this member expression used the '->' operator; otherwise, it used the '.' operator.

Declared at: clang/include/clang/AST/ExprCXX.h:3674

bool isImplicitAccess() const

Description

True if this is an implicit access, i.e. one in which the member being accessed was not written in the source. The source location of the operator is invalid in this case.

Declared at: clang/include/clang/AST/ExprCXX.h:3657

unsigned int numTrailingObjects(
    OverloadToken<clang::NamedDecl*>) const

Declared at: clang/include/clang/AST/ExprCXX.h:3626

Parameters

OverloadToken<clang::NamedDecl*>

unsigned int numTrailingObjects(
    OverloadToken<clang::TemplateArgumentLoc>)
    const

Declared at: clang/include/clang/AST/ExprCXX.h:3622

Parameters

OverloadToken<clang::TemplateArgumentLoc>

unsigned int numTrailingObjects(
    OverloadToken<
        clang::ASTTemplateKWAndArgsInfo>) const

Declared at: clang/include/clang/AST/ExprCXX.h:3618

Parameters

OverloadToken<clang::ASTTemplateKWAndArgsInfo>

ArrayRef<clang::TemplateArgumentLoc>
template_arguments() const

Declared at: clang/include/clang/AST/ExprCXX.h:3776