clang
3.9.0
|
ForStmt - This represents a 'for (init;cond;inc)' stmt. More...
#include <Stmt.h>
Public Member Functions | |
ForStmt (const ASTContext &C, Stmt *Init, Expr *Cond, VarDecl *condVar, Expr *Inc, Stmt *Body, SourceLocation FL, SourceLocation LP, SourceLocation RP) | |
ForStmt (EmptyShell Empty) | |
Build an empty for statement. More... | |
Stmt * | getInit () |
VarDecl * | getConditionVariable () const |
Retrieve the variable declared in this "for" statement, if any. More... | |
void | setConditionVariable (const ASTContext &C, VarDecl *V) |
const DeclStmt * | getConditionVariableDeclStmt () const |
If this ForStmt has a condition variable, return the faux DeclStmt associated with the creation of that condition variable. More... | |
Expr * | getCond () |
Expr * | getInc () |
Stmt * | getBody () |
const Stmt * | getInit () const |
const Expr * | getCond () const |
const Expr * | getInc () const |
const Stmt * | getBody () const |
void | setInit (Stmt *S) |
void | setCond (Expr *E) |
void | setInc (Expr *E) |
void | setBody (Stmt *S) |
SourceLocation | getForLoc () const |
void | setForLoc (SourceLocation L) |
SourceLocation | getLParenLoc () const |
void | setLParenLoc (SourceLocation L) |
SourceLocation | getRParenLoc () const |
void | setRParenLoc (SourceLocation L) |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
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.
ForStmt::ForStmt | ( | const ASTContext & | C, |
Stmt * | Init, | ||
Expr * | Cond, | ||
VarDecl * | condVar, | ||
Expr * | Inc, | ||
Stmt * | Body, | ||
SourceLocation | FL, | ||
SourceLocation | LP, | ||
SourceLocation | RP | ||
) |
Definition at line 797 of file Stmt.cpp.
References setConditionVariable().
|
inlineexplicit |
|
inline |
Definition at line 1188 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitForStmt(), EvaluateStmt(), isIdenticalStmt(), isInLoopBody(), and clang::ASTNodeImporter::VisitForStmt().
|
inline |
Definition at line 1186 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitForStmt(), EvaluateStmt(), isIdenticalStmt(), and clang::ASTNodeImporter::VisitForStmt().
VarDecl * ForStmt::getConditionVariable | ( | ) | const |
Retrieve the variable declared in this "for" statement, if any.
In the following example, "y" is the condition variable.
Definition at line 809 of file Stmt.cpp.
References clang::DeclStmt::getSingleDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitForStmt(), EvaluateStmt(), and clang::ASTNodeImporter::VisitForStmt().
|
inline |
|
inline |
Definition at line 1200 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitForStmt().
|
inline |
Definition at line 1187 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitForStmt(), EvaluateStmt(), isIdenticalStmt(), isInLoopBody(), and clang::ASTNodeImporter::VisitForStmt().
|
inline |
Definition at line 1167 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitForStmt(), EvaluateStmt(), isIdenticalStmt(), and clang::ASTNodeImporter::VisitForStmt().
|
inline |
|
inline |
|
inline |
Definition at line 1202 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitForStmt().
|
inline |
Definition at line 1204 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitForStmt().
|
inline |
|
inline |
void ForStmt::setConditionVariable | ( | const ASTContext & | C, |
VarDecl * | V | ||
) |
Definition at line 817 of file Stmt.cpp.
References clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::VarDecl::getSourceRange().
Referenced by ForStmt().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |