class StmtExpr

Declaration

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

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.

Declared at: clang/include/clang/AST/Expr.h:4349

Inherits from: Expr

Member Variables

private clang::Stmt* SubStmt
private clang::SourceLocation LParenLoc
private clang::SourceLocation RParenLoc

Inherited from Stmt:

protected

Method Overview

  • public StmtExpr(clang::CompoundStmt * SubStmt, clang::QualType T, clang::SourceLocation LParenLoc, clang::SourceLocation RParenLoc, unsigned int TemplateDepth)
  • public StmtExpr(clang::Stmt::EmptyShell Empty)
  • public clang::Stmt::child_range children()
  • public clang::Stmt::const_child_range children() const
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getLParenLoc() const
  • public clang::SourceLocation getRParenLoc() const
  • public clang::CompoundStmt * getSubStmt()
  • public const clang::CompoundStmt * getSubStmt() const
  • public unsigned int getTemplateDepth() const
  • public void setLParenLoc(clang::SourceLocation L)
  • public void setRParenLoc(clang::SourceLocation L)
  • public void setSubStmt(clang::CompoundStmt * S)

Inherited from Expr:

Inherited from ValueStmt:

Inherited from Stmt:

Methods

StmtExpr(clang::CompoundStmt* SubStmt,
         clang::QualType T,
         clang::SourceLocation LParenLoc,
         clang::SourceLocation RParenLoc,
         unsigned int TemplateDepth)

Declared at: clang/include/clang/AST/Expr.h:4353

Parameters

clang::CompoundStmt* SubStmt
clang::QualType T
clang::SourceLocation LParenLoc
clang::SourceLocation RParenLoc
unsigned int TemplateDepth

StmtExpr(clang::Stmt::EmptyShell Empty)

Description

Build an empty statement expression.

Declared at: clang/include/clang/AST/Expr.h:4364

Parameters

clang::Stmt::EmptyShell Empty

clang::Stmt::child_range children()

Declared at: clang/include/clang/AST/Expr.h:4385

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Expr.h:4386

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

Declared at: clang/include/clang/AST/Expr.h:4380

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Expr.h:4370

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Expr.h:4371

clang::SourceLocation getLParenLoc() const

Declared at: clang/include/clang/AST/Expr.h:4373

clang::SourceLocation getRParenLoc() const

Declared at: clang/include/clang/AST/Expr.h:4375

clang::CompoundStmt* getSubStmt()

Declared at: clang/include/clang/AST/Expr.h:4366

const clang::CompoundStmt* getSubStmt() const

Declared at: clang/include/clang/AST/Expr.h:4367

unsigned int getTemplateDepth() const

Declared at: clang/include/clang/AST/Expr.h:4378

void setLParenLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Expr.h:4374

Parameters

clang::SourceLocation L

void setRParenLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Expr.h:4376

Parameters

clang::SourceLocation L

void setSubStmt(clang::CompoundStmt* S)

Declared at: clang/include/clang/AST/Expr.h:4368

Parameters

clang::CompoundStmt* S