class CXXPseudoDestructorExpr

Declaration

class CXXPseudoDestructorExpr : public Expr { /* full declaration omitted */ };

Description

Represents a C++ pseudo-destructor (C++ [expr.pseudo]). A pseudo-destructor is an expression that looks like a member access to a destructor of a scalar type, except that scalar types don't have destructors. For example: Pseudo-destructors typically occur when instantiating templates such as: for scalar types. A pseudo-destructor expression has no run-time semantics beyond evaluating the base expression.

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

Inherits from: Expr

Member Variables

private clang::Stmt* Base = nullptr
The base expression (that is being destroyed).
private bool IsArrow
Whether the operator was an arrow ('->'); otherwise, it was a period ('.').
private clang::SourceLocation OperatorLoc
The location of the '.' or '->' operator.
private clang::NestedNameSpecifierLoc QualifierLoc
The nested-name-specifier that follows the operator, if present.
private clang::TypeSourceInfo* ScopeType = nullptr
The type that precedes the '::' in a qualified pseudo-destructor expression.
private clang::SourceLocation ColonColonLoc
The location of the '::' in a qualified pseudo-destructor expression.
private clang::SourceLocation TildeLoc
The location of the '~'.
private clang::PseudoDestructorTypeStorage DestroyedType
The type being destroyed, or its name if we were unable to resolve the name.

Inherited from Stmt:

protected

Method Overview

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXPseudoDestructorExpr(
    clang::Stmt::EmptyShell Shell)

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

Parameters

clang::Stmt::EmptyShell Shell

CXXPseudoDestructorExpr(
    const clang::ASTContext& Context,
    clang::Expr* Base,
    bool isArrow,
    clang::SourceLocation OperatorLoc,
    clang::NestedNameSpecifierLoc QualifierLoc,
    clang::TypeSourceInfo* ScopeType,
    clang::SourceLocation ColonColonLoc,
    clang::SourceLocation TildeLoc,
    clang::PseudoDestructorTypeStorage
        DestroyedType)

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

Parameters

const clang::ASTContext& Context
clang::Expr* Base
bool isArrow
clang::SourceLocation OperatorLoc
clang::NestedNameSpecifierLoc QualifierLoc
clang::TypeSourceInfo* ScopeType
clang::SourceLocation ColonColonLoc
clang::SourceLocation TildeLoc
clang::PseudoDestructorTypeStorage DestroyedType

clang::Stmt::const_child_range children() const

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

clang::Stmt::child_range children()

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

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

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

Parameters

const clang::Stmt* T

clang::Expr* getBase() const

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

clang::SourceLocation getBeginLoc() const

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

clang::SourceLocation getColonColonLoc() const

Description

Retrieve the location of the '::' in a qualified pseudo-destructor expression.

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

clang::QualType getDestroyedType() const

Description

Retrieve the type being destroyed.

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

clang::IdentifierInfo*
getDestroyedTypeIdentifier() const

Description

In a dependent pseudo-destructor expression for which we do not have full type information on the destroyed type, provides the name of the destroyed type.

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

clang::TypeSourceInfo* getDestroyedTypeInfo()
    const

Description

Retrieve the source location information for the type being destroyed. This type-source information is available for non-dependent pseudo-destructor expressions and some dependent pseudo-destructor expressions. Returns null if we only have the identifier for a dependent pseudo-destructor expression.

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

clang::SourceLocation getDestroyedTypeLoc() const

Description

Retrieve the starting location of the type being destroyed.

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

clang::SourceLocation getEndLoc() const

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

clang::SourceLocation getOperatorLoc() const

Description

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

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

clang::NestedNameSpecifier* getQualifier() const

Description

If the member name was qualified, retrieves the nested-name-specifier that precedes the member name. Otherwise, returns null.

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

clang::NestedNameSpecifierLoc getQualifierLoc()
    const

Description

Retrieves the nested-name-specifier that qualifies the type name, with source-location information.

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

clang::TypeSourceInfo* getScopeTypeInfo() const

Description

Retrieve the scope type in a qualified pseudo-destructor expression. Pseudo-destructor expressions can have extra qualification within them that is not part of the nested-name-specifier, e.g., \c p->T::~T(). Here, if the object type of the expression is (or may be) a scalar type,\p T may also be a scalar type and, therefore, cannot be part of a nested-name-specifier. It is stored as the "scope type" of the pseudo- destructor expression.

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

clang::SourceLocation getTildeLoc() const

Description

Retrieve the location of the '~'.

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

bool hasQualifier() const

Description

Determines whether this member expression actually had a C++ nested-name-specifier prior to the name of the member, e.g., x->Base::foo.

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

bool isArrow() const

Description

Determine whether this pseudo-destructor expression was written using an '->' (otherwise, it used a '.').

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

void setDestroyedType(clang::IdentifierInfo* II,
                      clang::SourceLocation Loc)

Description

Set the name of destroyed type for a dependent pseudo-destructor expression.

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

Parameters

clang::IdentifierInfo* II
clang::SourceLocation Loc

void setDestroyedType(clang::TypeSourceInfo* Info)

Description

Set the destroyed type.

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

Parameters

clang::TypeSourceInfo* Info