clang API Documentation

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

#include <Expr.h>

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

List of all members.

Public Member Functions

 StmtExpr (CompoundStmt *substmt, QualType T, SourceLocation lp, SourceLocation rp)
 StmtExpr (EmptyShell Empty)
 Build an empty statement expression.
CompoundStmtgetSubStmt ()
const CompoundStmtgetSubStmt () const
void setSubStmt (CompoundStmt *S)
SourceRange getSourceRange () const LLVM_READONLY
SourceLocation getLParenLoc () const
void setLParenLoc (SourceLocation L)
SourceLocation getRParenLoc () const
void setRParenLoc (SourceLocation L)
child_range children ()

Static Public Member Functions

static bool classof (const Stmt *T)
static bool classof (const StmtExpr *)

Detailed Description

StmtExpr - This is the GNU Statement Expression extension: ({int X=4; X;}). The StmtExpr contains a single CompoundStmt node, which it evaluates and takes the value of the last subexpression.

A StmtExpr is always an r-value; values "returned" out of a StmtExpr will be copied.

Definition at line 3199 of file Expr.h.


Constructor & Destructor Documentation

clang::StmtExpr::StmtExpr ( CompoundStmt substmt,
QualType  T,
SourceLocation  lp,
SourceLocation  rp 
) [inline]

Definition at line 3206 of file Expr.h.

clang::StmtExpr::StmtExpr ( EmptyShell  Empty) [inline, explicit]

Build an empty statement expression.

Definition at line 3213 of file Expr.h.


Member Function Documentation

child_range clang::StmtExpr::children ( ) [inline]

Reimplemented from clang::Stmt.

Definition at line 3234 of file Expr.h.

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

Reimplemented from clang::Expr.

Definition at line 3228 of file Expr.h.

References clang::Stmt::getStmtClass().

static bool clang::StmtExpr::classof ( const StmtExpr ) [inline, static]

Definition at line 3231 of file Expr.h.

SourceLocation clang::StmtExpr::getLParenLoc ( ) const [inline]

Definition at line 3223 of file Expr.h.

SourceLocation clang::StmtExpr::getRParenLoc ( ) const [inline]

Definition at line 3225 of file Expr.h.

SourceRange clang::StmtExpr::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 3219 of file Expr.h.

CompoundStmt* clang::StmtExpr::getSubStmt ( ) [inline]

Definition at line 3215 of file Expr.h.

Referenced by PopulateBlkExprMap(), and print_elem().

const CompoundStmt* clang::StmtExpr::getSubStmt ( ) const [inline]

Definition at line 3216 of file Expr.h.

void clang::StmtExpr::setLParenLoc ( SourceLocation  L) [inline]

Definition at line 3224 of file Expr.h.

void clang::StmtExpr::setRParenLoc ( SourceLocation  L) [inline]

Definition at line 3226 of file Expr.h.

void clang::StmtExpr::setSubStmt ( CompoundStmt S) [inline]

Definition at line 3217 of file Expr.h.

References S.


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