clang API Documentation

Public Member Functions | Static Public Member Functions
clang::CXXTypeidExpr Class Reference

#include <ExprCXX.h>

Inheritance diagram for clang::CXXTypeidExpr:
Inheritance graph
[legend]
Collaboration diagram for clang::CXXTypeidExpr:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CXXTypeidExpr (QualType Ty, TypeSourceInfo *Operand, SourceRange R)
 CXXTypeidExpr (QualType Ty, Expr *Operand, SourceRange R)
 CXXTypeidExpr (EmptyShell Empty, bool isExpr)
bool isPotentiallyEvaluated () const
bool isTypeOperand () const
QualType getTypeOperand (ASTContext &Context) const
 Retrieves the type operand of this typeid() expression after various required adjustments (removing reference types, cv-qualifiers).
TypeSourceInfogetTypeOperandSourceInfo () const
 Retrieve source information for the type operand.
void setTypeOperandSourceInfo (TypeSourceInfo *TSI)
ExprgetExprOperand () const
void setExprOperand (Expr *E)
SourceLocation getLocStart () const LLVM_READONLY
SourceLocation getLocEnd () const LLVM_READONLY
SourceRange getSourceRange () const LLVM_READONLY
void setSourceRange (SourceRange R)
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)

Detailed Description

A C++ typeid expression (C++ [expr.typeid]), which gets the type_info that corresponds to the supplied type, or the (possibly dynamic) type of the supplied expression.

This represents code like typeid(int) or typeid(*objPtr)

Definition at line 527 of file ExprCXX.h.


Constructor & Destructor Documentation

Definition at line 533 of file ExprCXX.h.

clang::CXXTypeidExpr::CXXTypeidExpr ( QualType  Ty,
Expr Operand,
SourceRange  R 
) [inline]

Definition at line 543 of file ExprCXX.h.

clang::CXXTypeidExpr::CXXTypeidExpr ( EmptyShell  Empty,
bool  isExpr 
) [inline]

Definition at line 553 of file ExprCXX.h.


Member Function Documentation

Reimplemented from clang::Stmt.

Definition at line 602 of file ExprCXX.h.

References isTypeOperand().

static bool clang::CXXTypeidExpr::classof ( const Stmt T) [inline, static]

Reimplemented from clang::Expr.

Definition at line 597 of file ExprCXX.h.

References clang::Stmt::getStmtClass().

Reimplemented from clang::Stmt.

Definition at line 593 of file ExprCXX.h.

References clang::SourceRange::getEnd().

Reimplemented from clang::Stmt.

Definition at line 592 of file ExprCXX.h.

References clang::SourceRange::getBegin().

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 594 of file ExprCXX.h.

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

Definition at line 43 of file ExprCXX.cpp.

References clang::QualType::getNonReferenceType(), clang::TypeSourceInfo::getType(), clang::ASTContext::getUnqualifiedArrayType(), and isTypeOperand().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr().

Retrieve source information for the type operand.

Definition at line 572 of file ExprCXX.h.

References isTypeOperand().

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

Definition at line 28 of file ExprCXX.cpp.

References clang::Type::getAsCXXRecordDecl(), getExprOperand(), clang::Expr::getType(), clang::Expr::isGLValue(), and isTypeOperand().

Referenced by clang::CodeGen::CodeGenFunction::EmitCXXTypeidExpr(), and clang::EvaluatedExprVisitor< ImplClass >::VisitCXXTypeidExpr().

Definition at line 587 of file ExprCXX.h.

References isTypeOperand().

Definition at line 595 of file ExprCXX.h.

Definition at line 577 of file ExprCXX.h.

References isTypeOperand().


The documentation for this class was generated from the following files: