|
clang
3.8.0
|
SwitchStmt - This represents a 'switch' stmt. More...
#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 |
| If this SwitchStmt has a condition variable, return the faux DeclStmt associated with the creation of that condition variable. More... | |
| 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 () |
| 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. More... | |
| bool | isAllEnumCasesCovered () const |
| Returns true if the SwitchStmt is a switch of an enum value and all cases have been explicitly covered. More... | |
| 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 819 of file Stmt.cpp.
References setConditionVariable().
|
inlineexplicit |
|
inline |
Definition at line 992 of file Stmt.h.
References clang::SwitchCase::getNextSwitchCase(), and clang::SwitchCase::setNextSwitchCase().
|
inline |
Definition at line 973 of file Stmt.h.
Referenced by clang::CodeGen::CodeGenFunction::EmitSwitchStmt(), EvaluateSwitch(), FindCaseStatementsForValue(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
Definition at line 972 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 826 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 974 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 985 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 1005 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 1001 of file Stmt.h.
Referenced by clang::Sema::ActOnFinishSwitchStmt().
|
inline |
Definition at line 979 of file Stmt.h.
References S.
Referenced by clang::Sema::ActOnFinishSwitchStmt(), and clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
|
inline |
| void SwitchStmt::setConditionVariable | ( | const ASTContext & | C, |
| VarDecl * | V | ||
| ) |
Definition at line 834 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 983 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitSwitchStmt().
|
inline |
Definition at line 986 of file Stmt.h.
Referenced by clang::ASTNodeImporter::VisitSwitchStmt().
1.8.6