class ForStmt

Declaration

class ForStmt : public Stmt { /* full declaration omitted */ };

Description

ForStmt - This represents a 'for (init;cond;inc)' stmt. Note that any of the init/cond/inc parts of the ForStmt will be null if they were not specified in the source.

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

Inherits from: Stmt

Member Variables

private clang::Stmt* [5] SubExprs
private clang::SourceLocation LParenLoc
private clang::SourceLocation RParenLoc

Inherited from Stmt:

protected

Method Overview

  • public ForStmt(clang::Stmt::EmptyShell Empty)
  • public ForStmt(const clang::ASTContext & C, clang::Stmt * Init, clang::Expr * Cond, clang::VarDecl * condVar, clang::Expr * Inc, clang::Stmt * Body, clang::SourceLocation FL, clang::SourceLocation LP, clang::SourceLocation RP)
  • public clang::Stmt::const_child_range children() const
  • public clang::Stmt::child_range children()
  • public static bool classof(const clang::Stmt * T)
  • public clang::SourceLocation getBeginLoc() const
  • public clang::Stmt * getBody()
  • public const clang::Stmt * getBody() const
  • public clang::Expr * getCond()
  • public const clang::Expr * getCond() const
  • public clang::VarDecl * getConditionVariable() const
  • public const clang::DeclStmt * getConditionVariableDeclStmt() const
  • public clang::SourceLocation getEndLoc() const
  • public clang::SourceLocation getForLoc() const
  • public clang::Expr * getInc()
  • public const clang::Expr * getInc() const
  • public clang::Stmt * getInit()
  • public const clang::Stmt * getInit() const
  • public clang::SourceLocation getLParenLoc() const
  • public clang::SourceLocation getRParenLoc() const
  • public void setBody(clang::Stmt * S)
  • public void setCond(clang::Expr * E)
  • public void setConditionVariable(const clang::ASTContext & C, clang::VarDecl * V)
  • public void setForLoc(clang::SourceLocation L)
  • public void setInc(clang::Expr * E)
  • public void setInit(clang::Stmt * S)
  • public void setLParenLoc(clang::SourceLocation L)
  • public void setRParenLoc(clang::SourceLocation L)

Inherited from Stmt:

Methods

ForStmt(clang::Stmt::EmptyShell Empty)

Description

Build an empty for statement.

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

Parameters

clang::Stmt::EmptyShell Empty

ForStmt(const clang::ASTContext& C,
        clang::Stmt* Init,
        clang::Expr* Cond,
        clang::VarDecl* condVar,
        clang::Expr* Inc,
        clang::Stmt* Body,
        clang::SourceLocation FL,
        clang::SourceLocation LP,
        clang::SourceLocation RP)

Declared at: clang/include/clang/AST/Stmt.h:2572

Parameters

const clang::ASTContext& C
clang::Stmt* Init
clang::Expr* Cond
clang::VarDecl* condVar
clang::Expr* Inc
clang::Stmt* Body
clang::SourceLocation FL
clang::SourceLocation LP
clang::SourceLocation RP

clang::Stmt::const_child_range children() const

Declared at: clang/include/clang/AST/Stmt.h:2631

clang::Stmt::child_range children()

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

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

Declared at: clang/include/clang/AST/Stmt.h:2622

Parameters

const clang::Stmt* T

clang::SourceLocation getBeginLoc() const

Declared at: clang/include/clang/AST/Stmt.h:2619

clang::Stmt* getBody()

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

const clang::Stmt* getBody() const

Declared at: clang/include/clang/AST/Stmt.h:2605

clang::Expr* getCond()

Declared at: clang/include/clang/AST/Stmt.h:2598

const clang::Expr* getCond() const

Declared at: clang/include/clang/AST/Stmt.h:2603

clang::VarDecl* getConditionVariable() const

Description

Retrieve the variable declared in this "for" statement, if any. In the following example, "y" is the condition variable.

Declared at: clang/include/clang/AST/Stmt.h:2589

const clang::DeclStmt*
getConditionVariableDeclStmt() const

Description

If this ForStmt has a condition variable, return the faux DeclStmt associated with the creation of that condition variable.

Declared at: clang/include/clang/AST/Stmt.h:2594

clang::SourceLocation getEndLoc() const

Declared at: clang/include/clang/AST/Stmt.h:2620

clang::SourceLocation getForLoc() const

Declared at: clang/include/clang/AST/Stmt.h:2612

clang::Expr* getInc()

Declared at: clang/include/clang/AST/Stmt.h:2599

const clang::Expr* getInc() const

Declared at: clang/include/clang/AST/Stmt.h:2604

clang::Stmt* getInit()

Declared at: clang/include/clang/AST/Stmt.h:2579

const clang::Stmt* getInit() const

Declared at: clang/include/clang/AST/Stmt.h:2602

clang::SourceLocation getLParenLoc() const

Declared at: clang/include/clang/AST/Stmt.h:2614

clang::SourceLocation getRParenLoc() const

Declared at: clang/include/clang/AST/Stmt.h:2616

void setBody(clang::Stmt* S)

Declared at: clang/include/clang/AST/Stmt.h:2610

Parameters

clang::Stmt* S

void setCond(clang::Expr* E)

Declared at: clang/include/clang/AST/Stmt.h:2608

Parameters

clang::Expr* E

void setConditionVariable(
    const clang::ASTContext& C,
    clang::VarDecl* V)

Declared at: clang/include/clang/AST/Stmt.h:2590

Parameters

const clang::ASTContext& C
clang::VarDecl* V

void setForLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Stmt.h:2613

Parameters

clang::SourceLocation L

void setInc(clang::Expr* E)

Declared at: clang/include/clang/AST/Stmt.h:2609

Parameters

clang::Expr* E

void setInit(clang::Stmt* S)

Declared at: clang/include/clang/AST/Stmt.h:2607

Parameters

clang::Stmt* S

void setLParenLoc(clang::SourceLocation L)

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

Parameters

clang::SourceLocation L

void setRParenLoc(clang::SourceLocation L)

Declared at: clang/include/clang/AST/Stmt.h:2617

Parameters

clang::SourceLocation L