Module Stmt
Provides a hierarchy of classes for modeling C/C++ statements.
Import path
import semmle.code.cpp.stmts.Stmt
Imports
Element |
Provides the |
Classes
AsmStmt |
A C/C++ ‘asm’ statement. |
BreakStmt |
A C/C++ ‘break’ statement. |
CatchAnyBlock |
A C++ ‘catch-any block’, for example the third block in the following code: |
CatchBlock |
A ‘catch block’, for example the second and third blocks in the following code: |
CoReturnStmt |
A C/C++ |
ComputedGotoStmt |
A ‘goto’ statement whose target is computed by a non-constant expression (a non-standard extension to C/C++). |
ConditionalStmt |
A C/C++ conditional statement, that is, either an ‘if’ statement or a ‘switch’ statement. |
ConstexprIfStmt |
A C/C++ ‘constexpr if’ statement. For example, the |
ContinueStmt |
A C/C++ ‘continue’ statement. |
ControlStructure |
A C/C++ control structure, that is, either a conditional statement or a loop. |
DeclStmt |
A C/C++ ‘declaration’ statement. |
DefaultCase |
A C/C++ ‘default case’ statement. |
DoStmt |
A C/C++ ‘do’ statement. |
EmptyStmt |
A C/C++ ‘empty’ statement. |
EnumSwitch |
A C/C++ ‘switch’ statement where the controlling expression has an enum type. |
ExprStmt |
A C/C++ ‘expression’ statement. |
ForStmt |
A C/C++ ‘for’ statement. |
FunctionTryStmt |
A C++ ‘function try’ statement. |
GotoStmt |
A C/C++ ‘goto’ statement which jumps to a label. |
Handler |
A handler for a ‘try’ statement. |
IfStmt |
A C/C++ ‘if’ statement. For example, the |
JumpStmt |
A C/C++ jump statement. |
LabelStmt |
A C/C++ ‘label’ statement. |
Loop |
A C/C++ loop, that is, either a ‘while’ loop, a ‘for’ loop, or a ‘do’ loop. |
MicrosoftTryExceptStmt |
A structured exception handling ‘try except’ statement, for example the |
MicrosoftTryFinallyStmt |
A structured exception handling ‘try finally’ statement, for example the |
MicrosoftTryStmt |
A structured exception handling ‘try’ statement, that is, a |
RangeBasedForStmt |
A C++11 range-based ‘for’ statement. |
ReturnStmt |
A C/C++ ‘return’ statement. |
Stmt |
A C/C++ statement. |
StmtParent |
An element that is the parent of a statement in the C/C++ AST. |
SwitchCase |
A C/C++ ‘switch case’ statement. |
SwitchStmt |
A C/C++ ‘switch’ statement. |
TryStmt |
A C/C++ ‘try’ statement. |
VlaDeclStmt |
A C99 statement which declares a variable length array. For example the variable length array declaration in the following code: |
VlaDimensionStmt |
A C99 statement which computes the size of a single dimension of a variable length array. For example the variable length array dimension ( |
WhileStmt |
A C/C++ ‘while’ statement. |