clang
3.7.0
|
#include <Stmt.h>
Public Member Functions | |
SwitchStmt (const ASTContext &C, VarDecl *Var, Expr *cond) | |
SwitchStmt (EmptyShell Empty) | |
Build a empty switch statement. More... | |
VarDecl * | getConditionVariable () const |
Retrieve the variable declared in this "switch" statement, if any. More... | |
void | setConditionVariable (const ASTContext &C, VarDecl *V) |
const DeclStmt * | getConditionVariableDeclStmt () const |
const Expr * | getCond () const |
const Stmt * | getBody () const |
const SwitchCase * | getSwitchCaseList () const |
Expr * | getCond () |
void | setCond (Expr *E) |
Stmt * | getBody () |
void | setBody (Stmt *S) |
SwitchCase * | getSwitchCaseList () |
void | setSwitchCaseList (SwitchCase *SC) |
Set the case list for this switch statement. More... | |
SourceLocation | getSwitchLoc () const |
void | setSwitchLoc (SourceLocation L) |
void | setBody (Stmt *S, SourceLocation SL) |
void | addSwitchCase (SwitchCase *SC) |
void | setAllEnumCasesCovered () |
bool | isAllEnumCasesCovered () const |
SourceLocation | getLocStart () const LLVM_READONLY |
SourceLocation | getLocEnd () const LLVM_READONLY |
child_range | children () |
Static Public Member Functions | |
static bool | classof (const Stmt *T) |
SwitchStmt - This represents a 'switch' stmt.
SwitchStmt::SwitchStmt | ( | const ASTContext & | C, |
VarDecl * | Var, | ||
Expr * | cond | ||
) |
Definition at line 944 of file Stmt.cpp.
References setConditionVariable().
|
inlineexplicit |
|
inline |
Definition at line 1005 of file Stmt.h.
References clang::SwitchCase::getNextSwitchCase(), and clang::SwitchCase::setNextSwitchCase().
|
inline |
Definition at line 986 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EvaluateSwitch(), FindCaseStatementsForValue(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
Definition at line 985 of file Stmt.h.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::CodeCompleteCase(), clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EvaluateSwitch(), clang::ento::ExprEngine::processSwitch(), and clang::ASTNodeImporter::VisitSwitchStmt().
VarDecl * SwitchStmt::getConditionVariable | ( | ) | const |
Retrieve the variable declared in this "switch" statement, if any.
In the following example, "x" is the condition variable.
Definition at line 951 of file Stmt.cpp.
References clang::DeclStmt::getSingleDecl().
Referenced by clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EvaluateSwitch(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of that condition variable.
|
inline |
|
inline |
|
inline |
Definition at line 987 of file Stmt.h.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), clang::Sema::CodeCompleteCase(), clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EvaluateSwitch(), FindCaseStatementsForValue(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
|
inline |
Definition at line 998 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covered.
Definition at line 1018 of file Stmt.h.
Referenced by clang::ento::ExprEngine::processSwitch().
|
inline |
Set a flag in the SwitchStmt indicating that if the 'switch (X)' is a switch over an enum value then all cases have been explicitly covered.
Definition at line 1014 of file Stmt.h.
Referenced by clang::Sema::ActOnFinishSwitchStmt().
|
inline |
Definition at line 992 of file Stmt.h.
References S.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
void SwitchStmt::setConditionVariable | ( | const ASTContext & | C, |
VarDecl * | V | ||
) |
Definition at line 959 of file Stmt.cpp.
References AttributeLangSupport::C, clang::SourceRange::getBegin(), clang::SourceRange::getEnd(), and clang::VarDecl::getSourceRange().
Referenced by SwitchStmt().
|
inline |
Set the case list for this switch statement.
Definition at line 996 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
Definition at line 999 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitSwitchStmt().