clang
3.7.0
|
#include <Stmt.h>
Public Member Functions | |
IfStmt (const ASTContext &C, SourceLocation IL, VarDecl *var, Expr *cond, Stmt *then, SourceLocation EL=SourceLocation(), Stmt *elsev=nullptr) | |
IfStmt (EmptyShell Empty) | |
Build an empty if/then/else statement. More... | |
VarDecl * | getConditionVariable () const |
Retrieve the variable declared in this "if" statement, if any. More... | |
void | setConditionVariable (const ASTContext &C, VarDecl *V) |
const DeclStmt * | getConditionVariableDeclStmt () const |
const Expr * | getCond () const |
void | setCond (Expr *E) |
const Stmt * | getThen () const |
void | setThen (Stmt *S) |
const Stmt * | getElse () const |
void | setElse (Stmt *S) |
Expr * | getCond () |
Stmt * | getThen () |
Stmt * | getElse () |
SourceLocation | getIfLoc () const |
void | setIfLoc (SourceLocation L) |
SourceLocation | getElseLoc () const |
void | setElseLoc (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) |
IfStmt::IfStmt | ( | const ASTContext & | C, |
SourceLocation | IL, | ||
VarDecl * | var, | ||
Expr * | cond, | ||
Stmt * | then, | ||
SourceLocation | EL = SourceLocation() , |
||
Stmt * | elsev = nullptr |
||
) |
Definition at line 884 of file Stmt.cpp.
References setConditionVariable().
|
inlineexplicit |
|
inline |
Definition at line 914 of file Stmt.h.
Referenced by DiagUninitUse(), clang::CodeGen::CodeGenFunction::EmitIfStmt(), EvaluateStmt(), isIdenticalStmt(), and clang::ASTNodeImporter::VisitIfStmt().
VarDecl * IfStmt::getConditionVariable | ( | ) | const |
Retrieve the variable declared in this "if" statement, if any.
In the following example, "x" is the condition variable.
Definition at line 894 of file Stmt.cpp.
References clang::DeclStmt::getSingleDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitIfStmt(), EvaluateStmt(), and clang::ASTNodeImporter::VisitIfStmt().
|
inline |
|
inline |
Definition at line 918 of file Stmt.h.
Referenced by CheckConstexprFunctionStmt(), DiagUninitUse(), clang::CodeGen::CodeGenFunction::EmitIfStmt(), EvaluateStmt(), isIdenticalStmt(), and clang::ASTNodeImporter::VisitIfStmt().
|
inline |
Definition at line 927 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitIfStmt().
|
inline |
Definition at line 925 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitIfStmt().
|
inline |
|
inline |
|
inline |
Definition at line 916 of file Stmt.h.
Referenced by CheckConstexprFunctionStmt(), DiagUninitUse(), clang::CodeGen::CodeGenFunction::EmitIfStmt(), EvaluateStmt(), isIdenticalStmt(), and clang::ASTNodeImporter::VisitIfStmt().
void IfStmt::setConditionVariable | ( | const ASTContext & | C, |
VarDecl * | V | ||
) |
Definition at line 902 of file Stmt.cpp.
References AttributeLangSupport::C, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::VarDecl::getSourceRange().
Referenced by IfStmt().
|
inline |
|
inline |