class CXXTypeidExpr

Declaration

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

Description

A C++ \c typeid expression (C++ [expr.typeid]), which gets the \c type_info that corresponds to the supplied type, or the (possibly dynamic) type of the supplied expression. This represents code like \c typeid(int) or \c typeid(*objPtr)

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

Inherits from: Expr

Member Variables

private llvm::PointerUnion<Stmt*, TypeSourceInfo*> Operand
private clang::SourceRange Range

Inherited from Stmt:

protected

Method Overview

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

CXXTypeidExpr(clang::QualType Ty,
              clang::TypeSourceInfo* Operand,
              clang::SourceRange R)

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

Parameters

clang::QualType Ty
clang::TypeSourceInfo* Operand
clang::SourceRange R

CXXTypeidExpr(clang::QualType Ty,
              clang::Expr* Operand,
              clang::SourceRange R)

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

Parameters

clang::QualType Ty
clang::Expr* Operand
clang::SourceRange R

CXXTypeidExpr(clang::Stmt::EmptyShell Empty,
              bool isExpr)

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

Parameters

clang::Stmt::EmptyShell Empty
bool isExpr

clang::Stmt::child_range children()

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

clang::Stmt::const_child_range children() const

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

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

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

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

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

clang::SourceLocation getEndLoc() const

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

clang::Expr* getExprOperand() const

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

clang::SourceRange getSourceRange() const

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

clang::QualType getTypeOperand(
    clang::ASTContext& Context) const

Description

Retrieves the type operand of this typeid() expression after various required adjustments (removing reference types, cv-qualifiers).

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

Parameters

clang::ASTContext& Context

clang::TypeSourceInfo* getTypeOperandSourceInfo()
    const

Description

Retrieve source information for the type operand.

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

bool isMostDerived(
    clang::ASTContext& Context) const

Description

Best-effort check if the expression operand refers to a most derived object. This is not a strong guarantee.

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

Parameters

clang::ASTContext& Context

bool isPotentiallyEvaluated() const

Description

Determine whether this typeid has a type operand which is potentially evaluated, per C++11 [expr.typeid]p3.

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

bool isTypeOperand() const

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

void setSourceRange(clang::SourceRange R)

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

Parameters

clang::SourceRange R