clang API Documentation
Represents a C++ member access expression for which lookup produced a set of overloaded functions. More...
#include <ExprCXX.h>


Public Member Functions | |
| bool | isImplicitAccess () const |
| 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. | |
| Expr * | getBase () |
Retrieve the base object of this member expressions, e.g., the x in x.m. | |
| const Expr * | getBase () const |
| QualType | getBaseType () const |
| bool | hasUnresolvedUsing () const |
| Determine whether the lookup results contain an unresolved using declaration. | |
| bool | isArrow () const |
| Determine whether this member expression used the '->' operator; otherwise, it used the '.' operator. | |
| SourceLocation | getOperatorLoc () const |
| Retrieve the location of the '->' or '.' operator. | |
| CXXRecordDecl * | getNamingClass () const |
| Retrieves the naming class of this lookup. | |
| const DeclarationNameInfo & | getMemberNameInfo () const |
| Retrieve the full name info for the member that this expression refers to. | |
| DeclarationName | getMemberName () const |
| Retrieve the name of the member that this expression refers to. | |
| SourceLocation | getMemberLoc () const |
| SourceRange | getSourceRange () const LLVM_READONLY |
| child_range | children () |
Static Public Member Functions | |
| static UnresolvedMemberExpr * | Create (ASTContext &C, bool HasUnresolvedUsing, Expr *Base, QualType BaseType, bool IsArrow, SourceLocation OperatorLoc, NestedNameSpecifierLoc QualifierLoc, SourceLocation TemplateKWLoc, const DeclarationNameInfo &MemberNameInfo, const TemplateArgumentListInfo *TemplateArgs, UnresolvedSetIterator Begin, UnresolvedSetIterator End) |
| static UnresolvedMemberExpr * | CreateEmpty (ASTContext &C, bool HasTemplateKWAndArgsInfo, unsigned NumTemplateArgs) |
| static bool | classof (const Stmt *T) |
| static bool | classof (const UnresolvedMemberExpr *) |
Friends | |
| class | ASTStmtReader |
Represents a C++ member access expression for which lookup produced a set of overloaded functions.
The member access may be explicit or implicit: struct A { int a, b; int explicitAccess() { return this->a + this->A::b; } int implicitAccess() { return a + A::b; } };
In the final AST, an explicit access always becomes a MemberExpr. An implicit access may become either a MemberExpr or a DeclRefExpr, depending on whether the member is static.
| child_range clang::UnresolvedMemberExpr::children | ( | ) | [inline] |
Reimplemented from clang::Stmt.
Definition at line 3254 of file ExprCXX.h.
References isImplicitAccess().
| static bool clang::UnresolvedMemberExpr::classof | ( | const Stmt * | T | ) | [inline, static] |
Reimplemented from clang::OverloadExpr.
Definition at line 3248 of file ExprCXX.h.
References clang::Stmt::getStmtClass().
| static bool clang::UnresolvedMemberExpr::classof | ( | const UnresolvedMemberExpr * | ) | [inline, static] |
| UnresolvedMemberExpr * UnresolvedMemberExpr::Create | ( | ASTContext & | C, |
| bool | HasUnresolvedUsing, | ||
| Expr * | Base, | ||
| QualType | BaseType, | ||
| bool | IsArrow, | ||
| SourceLocation | OperatorLoc, | ||
| NestedNameSpecifierLoc | QualifierLoc, | ||
| SourceLocation | TemplateKWLoc, | ||
| const DeclarationNameInfo & | MemberNameInfo, | ||
| const TemplateArgumentListInfo * | TemplateArgs, | ||
| UnresolvedSetIterator | Begin, | ||
| UnresolvedSetIterator | End | ||
| ) | [static] |
Definition at line 1206 of file ExprCXX.cpp.
References clang::ASTContext::Allocate(), clang::SourceLocation::isValid(), clang::TemplateArgumentListInfo::size(), and clang::ASTTemplateKWAndArgsInfo::sizeFor().
Referenced by clang::Sema::BuildMemberReferenceExpr().
| UnresolvedMemberExpr * UnresolvedMemberExpr::CreateEmpty | ( | ASTContext & | C, |
| bool | HasTemplateKWAndArgsInfo, | ||
| unsigned | NumTemplateArgs | ||
| ) | [static] |
Definition at line 1230 of file ExprCXX.cpp.
References clang::ASTContext::Allocate(), clang::OverloadExpr::HasTemplateKWAndArgsInfo, and clang::ASTTemplateKWAndArgsInfo::sizeFor().
| Expr* clang::UnresolvedMemberExpr::getBase | ( | ) | [inline] |
Retrieve the base object of this member expressions, e.g., the x in x.m.
Definition at line 3199 of file ExprCXX.h.
References isImplicitAccess().
Referenced by clang::Sema::BuildCallToMemberFunction().
| const Expr* clang::UnresolvedMemberExpr::getBase | ( | ) | const [inline] |
Definition at line 3203 of file ExprCXX.h.
References isImplicitAccess().
| QualType clang::UnresolvedMemberExpr::getBaseType | ( | ) | const [inline] |
Definition at line 3208 of file ExprCXX.h.
Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckUnresolvedMemberAccess(), and getNamingClass().
| SourceLocation clang::UnresolvedMemberExpr::getMemberLoc | ( | ) | const [inline] |
Definition at line 3234 of file ExprCXX.h.
References clang::OverloadExpr::getNameLoc().
Referenced by clang::Sema::BuildCallToMemberFunction(), and clang::Sema::CheckUnresolvedMemberAccess().
| DeclarationName clang::UnresolvedMemberExpr::getMemberName | ( | ) | const [inline] |
Retrieve the name of the member that this expression refers to.
Definition at line 3230 of file ExprCXX.h.
References clang::OverloadExpr::getName().
Referenced by clang::Sema::BuildCallToMemberFunction().
| const DeclarationNameInfo& clang::UnresolvedMemberExpr::getMemberNameInfo | ( | ) | const [inline] |
Retrieve the full name info for the member that this expression refers to.
Definition at line 3226 of file ExprCXX.h.
References clang::OverloadExpr::getNameInfo().
Referenced by getSourceRange().
| CXXRecordDecl * UnresolvedMemberExpr::getNamingClass | ( | ) | const |
Retrieves the naming class of this lookup.
Reimplemented from clang::OverloadExpr.
Definition at line 1242 of file ExprCXX.cpp.
References clang::Type::getAsCXXRecordDecl(), clang::NestedNameSpecifier::getAsType(), getBaseType(), clang::QualType::getNonReferenceType(), clang::PointerType::getPointeeType(), clang::OverloadExpr::getQualifier(), and isArrow().
Referenced by clang::Sema::CheckUnresolvedMemberAccess().
| SourceLocation clang::UnresolvedMemberExpr::getOperatorLoc | ( | ) | const [inline] |
| SourceRange clang::UnresolvedMemberExpr::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 3236 of file ExprCXX.h.
References clang::SourceRange::getBegin(), getMemberNameInfo(), clang::OverloadExpr::getQualifierLoc(), clang::OverloadExpr::getRAngleLoc(), clang::Stmt::getSourceRange(), clang::DeclarationNameInfo::getSourceRange(), clang::OverloadExpr::hasExplicitTemplateArgs(), isImplicitAccess(), clang::SourceRange::setBegin(), and clang::SourceRange::setEnd().
Referenced by clang::Sema::CheckUnresolvedMemberAccess().
| bool clang::UnresolvedMemberExpr::hasUnresolvedUsing | ( | ) | const [inline] |
Determine whether the lookup results contain an unresolved using declaration.
| bool clang::UnresolvedMemberExpr::isArrow | ( | ) | const [inline] |
Determine whether this member expression used the '->' operator; otherwise, it used the '.' operator.
Definition at line 3216 of file ExprCXX.h.
Referenced by clang::Sema::BuildCallToMemberFunction(), clang::Sema::CheckUnresolvedMemberAccess(), and getNamingClass().
| bool UnresolvedMemberExpr::isImplicitAccess | ( | ) | const |
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.
Definition at line 1198 of file ExprCXX.cpp.
References clang::Expr::isImplicitCXXThis().
Referenced by children(), getBase(), and getSourceRange().
friend class ASTStmtReader [friend] |
Reimplemented from clang::OverloadExpr.