mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
fix some table formatting and update some links
This commit is contained in:
@@ -12,171 +12,171 @@ Statement classes
|
||||
|
||||
This table lists all subclasses of Stmt_.
|
||||
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Statement syntax | CodeQL class | Superclasses | Remarks |
|
||||
+=======================================================================================================================+=======================+==================================+======================================================================================+
|
||||
| ``;`` | EmptyStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ | ExprStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``{`` Stmt_ ``...`` ``}`` | BlockStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``if`` Expr_ BlockStmt_ | IfStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``if`` Expr_ BlockStmt_ ``else`` Stmt_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``if`` Stmt_\ ``;`` Expr_ BlockStmt_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``for`` Expr_ BlockStmt_ | ForStmt_ | LoopStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``for`` Stmt_\ ``;`` Expr_\ ``;`` Stmt_ BlockStmt_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``for`` Expr_ ``...`` ``=`` ``range`` Expr_ BlockStmt_ | RangeStmt_ | LoopStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``switch`` Expr_ ``{`` CaseClause_ ``...`` ``}`` | ExpressionSwitchStmt_ | SwitchStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` Stmt_\ ``;`` Expr_ ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``switch`` Expr_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | TypeSwitchStmt_ | SwitchStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` SimpleAssignStmt_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` Stmt_\ ``;`` Expr_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``select`` ``{`` CommClause_ ``...`` ``}`` | SelectStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``return`` | ReturnStmt_ | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``break`` | BreakStmt_ | BranchStmt_ | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``continue`` | ContinueStmt_ | BranchStmt_ | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``goto`` LabelName_ | GotoStmt_ | BranchStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``fallthrough`` | FallthroughStmt_ | BranchStmt_ | can only occur as final non-empty child of a CaseClause_ in an ExpressionSwitchStmt_ |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| LabelName_\ ``:`` Stmt_ | LabeledStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``var`` VariableName_ TypeName_ | DeclStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``const`` VariableName_ ``=`` Expr_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``type`` TypeName_ TypeExpr_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``type`` TypeName_ ``=`` TypeExpr_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``...`` ``=`` Expr_ ``...`` | AssignStmt_ | SimpleAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| VariableName_ ``...`` ``:=`` Expr_ ``...`` | DefineStmt_ | SimpleAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``+=`` Expr_ | AddAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``-=`` Expr_ | SubAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``*=`` Expr_ | MulAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``/=`` Expr_ | QuoAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``%=`` Expr_ | RemAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``*=`` Expr_ | MulAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``&=`` Expr_ | AndAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ `` | =`` Expr_ | OrAssignStmt_ | CompoundAssignStmt_, Assignment_ |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``^=`` Expr_ | XorAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``<<=`` Expr_ | ShlAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``>>=`` Expr_ | ShrAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``&^=`` Expr_ | AndNotAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``++`` | IncStmt_ | IncDecStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``--`` | DecStmt_ | IncDecStmt_ | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``go`` CallExpr_ | GoStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``defer`` CallExpr_ | DeferStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``<-`` Expr_ | SendStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``case`` Expr_ ``...``\ ``:`` Stmt_ ``...`` | CaseClause_ | | can only occur as child of a SwitchStmt_ |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``case`` TypeExpr_ ``...``\ ``:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``default:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| ``case`` SendStmt_\ ``:`` Stmt_ ``...`` | CommClause_ | | can only occur as child of a SelectStmt_ |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``case`` RecvStmt_\ ``:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| ``default:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| Expr_ ``...`` ``=`` RecvExpr_ | RecvStmt_ | | can only occur as child of a CommClause_ |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+ | | |
|
||||
| VariableName_ ``...`` ``:=`` RecvExpr_ | | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
| (anything unparseable) | BadStmt_ | | |
|
||||
| | | | |
|
||||
+-----------------------------------------------------------------------------------------------------------------------+-----------------------+----------------------------------+--------------------------------------------------------------------------------------+
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Statement syntax | CodeQL class | Superclasses | Remarks |
|
||||
+===============================================================================+=======================+==================================+===================================================+
|
||||
| ``;`` | EmptyStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ | ExprStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``{`` Stmt_ ``...`` ``}`` | BlockStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``if`` Expr_ BlockStmt_ | IfStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``if`` Expr_ BlockStmt_ ``else`` Stmt_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``if`` Stmt_\ ``;`` Expr_ BlockStmt_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``for`` Expr_ BlockStmt_ | ForStmt_ | LoopStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``for`` Stmt_\ ``;`` Expr_\ ``;`` Stmt_ BlockStmt_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``for`` Expr_ ``...`` ``=`` ``range`` Expr_ BlockStmt_ | RangeStmt_ | LoopStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``switch`` Expr_ ``{`` CaseClause_ ``...`` ``}`` | ExpressionSwitchStmt_ | SwitchStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` Stmt_\ ``;`` Expr_ ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``switch`` Expr_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | TypeSwitchStmt_ | SwitchStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` SimpleAssignStmt_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``switch`` Stmt_\ ``;`` Expr_\ ``.(type)`` ``{`` CaseClause_ ``...`` ``}`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``select`` ``{`` CommClause_ ``...`` ``}`` | SelectStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``return`` | ReturnStmt_ | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``break`` | BreakStmt_ | BranchStmt_ | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``continue`` | ContinueStmt_ | BranchStmt_ | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``goto`` LabelName_ | GotoStmt_ | BranchStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``fallthrough`` | FallthroughStmt_ | BranchStmt_ | can only occur as final non-empty child of |
|
||||
| | | | a CaseClause_ in an ExpressionSwitchStmt_ | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| LabelName_\ ``:`` Stmt_ | LabeledStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``var`` VariableName_ TypeName_ | DeclStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``const`` VariableName_ ``=`` Expr_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``type`` TypeName_ TypeExpr_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``type`` TypeName_ ``=`` TypeExpr_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``...`` ``=`` Expr_ ``...`` | AssignStmt_ | SimpleAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| VariableName_ ``...`` ``:=`` Expr_ ``...`` | DefineStmt_ | SimpleAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``+=`` Expr_ | AddAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``-=`` Expr_ | SubAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``*=`` Expr_ | MulAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``/=`` Expr_ | QuoAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``%=`` Expr_ | RemAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``*=`` Expr_ | MulAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``&=`` Expr_ | AndAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``|=`` Expr_ | OrAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``^=`` Expr_ | XorAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``<<=`` Expr_ | ShlAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``>>=`` Expr_ | ShrAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``&^=`` Expr_ | AndNotAssignStmt_ | CompoundAssignStmt_, Assignment_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``++`` | IncStmt_ | IncDecStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``--`` | DecStmt_ | IncDecStmt_ | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``go`` CallExpr_ | GoStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``defer`` CallExpr_ | DeferStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``<-`` Expr_ | SendStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``case`` Expr_ ``...``\ ``:`` Stmt_ ``...`` | CaseClause_ | | can only occur as child of a SwitchStmt_ |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``case`` TypeExpr_ ``...``\ ``:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``default:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| ``case`` SendStmt_\ ``:`` Stmt_ ``...`` | CommClause_ | | can only occur as child of a SelectStmt_ |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``case`` RecvStmt_\ ``:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| ``default:`` Stmt_ ``...`` | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``...`` ``=`` RecvExpr_ | RecvStmt_ | | can only occur as child of a CommClause_ |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+ | | |
|
||||
| VariableName_ ``...`` ``:=`` RecvExpr_ | | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
| (anything unparseable) | BadStmt_ | | |
|
||||
| | | | |
|
||||
+-------------------------------------------------------------------------------+-----------------------+----------------------------------+---------------------------------------------------+
|
||||
|
||||
Expression classes
|
||||
------------------
|
||||
@@ -236,47 +236,47 @@ Binary expressions
|
||||
All classes in this subsection are subclasses of
|
||||
BinaryExpr_.
|
||||
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expression syntax | CodeQL class | Superclasses | | |
|
||||
+====================+==============+===========================+====================+====================+
|
||||
| Expr_ ``*`` Expr_ | MulExpr_ | ArithmeticBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``/`` Expr_ | QuoExpr_ | ArithmeticBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``%`` Expr_ | RemExpr_ | ArithmeticBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``+`` Expr_ | AddExpr_ | ArithmeticBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``-`` Expr_ | SubExpr_ | ArithmeticBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``<<`` Expr_ | ShlExpr_ | ShiftExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``>>`` Expr_ | ShrExpr_ | ShiftExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``&&`` Expr_ | LandExpr_ | LogicalBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ `` | | `` Expr_ | LorExpr_ | LogicalBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``<`` Expr_ | LssExpr_ | RelationalComparisonExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``>`` Expr_ | GtrExpr_ | RelationalComparisonExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``<=`` Expr_ | LeqExpr_ | RelationalComparisonExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``>=`` Expr_ | GeqExpr_ | RelationalComparisonExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``==`` Expr_ | EqlExpr_ | EqualityTestExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``!=`` Expr_ | NeqExpr_ | EqualityTestExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``&`` Expr_ | AndExpr_ | BitwiseBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ `` | `` Expr_ | OrExpr_ | BitwiseBinaryExpr_ | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``^`` Expr_ | XorExpr_ | BitwiseBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
| Expr_ ``&^`` Expr_ | AndNotExpr_ | BitwiseBinaryExpr_ | | |
|
||||
+--------------------+--------------+---------------------------+--------------------+--------------------+
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expression syntax | CodeQL class | Superclasses |
|
||||
+====================+==============+===========================+
|
||||
| Expr_ ``*`` Expr_ | MulExpr_ | ArithmeticBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``/`` Expr_ | QuoExpr_ | ArithmeticBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``%`` Expr_ | RemExpr_ | ArithmeticBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``+`` Expr_ | AddExpr_ | ArithmeticBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``-`` Expr_ | SubExpr_ | ArithmeticBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``<<`` Expr_ | ShlExpr_ | ShiftExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``>>`` Expr_ | ShrExpr_ | ShiftExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``&&`` Expr_ | LandExpr_ | LogicalBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``||`` Expr_ | LorExpr_ | LogicalBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``<`` Expr_ | LssExpr_ | RelationalComparisonExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``>`` Expr_ | GtrExpr_ | RelationalComparisonExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``<=`` Expr_ | LeqExpr_ | RelationalComparisonExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``>=`` Expr_ | GeqExpr_ | RelationalComparisonExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``==`` Expr_ | EqlExpr_ | EqualityTestExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``!=`` Expr_ | NeqExpr_ | EqualityTestExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``&`` Expr_ | AndExpr_ | BitwiseBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``|`` Expr_ | OrExpr_ | BitwiseBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``^`` Expr_ | XorExpr_ | BitwiseBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
| Expr_ ``&^`` Expr_ | AndNotExpr_ | BitwiseBinaryExpr_ |
|
||||
+--------------------+--------------+---------------------------+
|
||||
|
||||
Type expressions
|
||||
~~~~~~~~~~~~~~~~
|
||||
@@ -384,6 +384,9 @@ Further reading
|
||||
.. include:: ../reusables/go-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
|
||||
.. Links used in tables. For information about using these links, see
|
||||
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks.
|
||||
|
||||
.. _Stmt: https://codeql.github.com/codeql-standard-libraries/go/semmle/go/Stmt.qll/type.Stmt$Stmt.html
|
||||
.. _Expr: https://codeql.github.com/codeql-standard-libraries/go/semmle/go/Expr.qll/type.Expr$Expr.html
|
||||
.. _IntLit: https://codeql.github.com/codeql-standard-libraries/go/semmle/go/Expr.qll/type.Expr$IntLit.html
|
||||
|
||||
@@ -277,6 +277,9 @@ Further reading
|
||||
.. include:: ../reusables/java-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
|
||||
.. Links used in tables. For information about using these links, see
|
||||
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks.
|
||||
|
||||
.. _Expr: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$Expr.html
|
||||
.. _Stmt: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Statement.qll/type.Statement$Stmt.html
|
||||
.. _VarAccess: https://codeql.github.com/codeql-standard-libraries/java/semmle/code/java/Expr.qll/type.Expr$VarAccess.html
|
||||
|
||||
@@ -361,6 +361,16 @@ All classes in this table are subclasses of Expr_.
|
||||
| ``yield`` Expr_ | YieldExpr_ |
|
||||
+-------------------------------+------------------+
|
||||
|
||||
Further reading
|
||||
---------------
|
||||
|
||||
.. include:: ../reusables/javascript-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
|
||||
|
||||
.. Links used in tables. For information about using these links, see
|
||||
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks.
|
||||
|
||||
.. _Stmt: https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/Stmt.qll/type.Stmt$Stmt.html
|
||||
.. _Expr: https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/Expr.qll/type.Expr$Expr.html
|
||||
.. _ExprStmt: https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/Stmt.qll/type.Stmt$ExprStmt.html
|
||||
@@ -514,9 +524,3 @@ All classes in this table are subclasses of Expr_.
|
||||
.. _AwaitExpr: https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/Expr.qll/type.Expr$AwaitExpr.html
|
||||
.. _YieldExpr: https://codeql.github.com/codeql-standard-libraries/javascript/semmle/javascript/Expr.qll/type.Expr$YieldExpr.html
|
||||
|
||||
|
||||
Further reading
|
||||
---------------
|
||||
|
||||
.. include:: ../reusables/javascript-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
@@ -27,188 +27,188 @@ Declaration classes
|
||||
|
||||
This table lists Declaration_ classes representing C/C++ declarations.
|
||||
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+===============================================================================+==============================================================+=====================================+
|
||||
| ``int`` *var* ``;`` | GlobalVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``namespace`` *N* ``{`` ... ``float`` *var* ``;`` ... ``}`` | NamespaceVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``( void ) {`` ... ``float`` *var* ``;`` ... ``}`` | LocalVariable_ | See also Initializer_ |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``int`` *var* ``;`` ... ``}`` | MemberVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``(const char`` *param* ``);`` | Function_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | TemplateFunction_ | |
|
||||
| | ``void`` *func* ``(`` *T* ``param);`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``(const char*`` *format* ``, ...)`` | FormattingFunction_ | |
|
||||
| | ``{`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *func* ``< int, float > (`` ... ``);`` | FunctionTemplateInstantiation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | FunctionTemplateSpecialization_ | |
|
||||
| | *func* ``< int,`` *T* ``> (`` ... ``) {`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | MemberFunction_ | |
|
||||
| | ``int`` *func* ``( float`` *param* ``);`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | ConstMemberFunction_ | |
|
||||
| | ``int`` *func* ``( float`` *param* ``) const;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``virtual int`` *func* ``(`` ... ``) {`` ... ``} };`` | VirtualFunction_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... *C* ``(`` ... ``) {`` ... ``}`` ... ``};`` | Constructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``C::operator float () const;`` | ConversionOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``~`` *C* ``( void ) {`` ... ``}`` ... ``};`` | Destructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | ConversionConstructor_ | |
|
||||
| | *C* ``( const`` *D* ``&`` *d* ``) {`` ... ``}`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *C* ``&`` *C* ``:: operator= (const`` *C* ``& );`` | CopyAssignmentOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *C* ``&`` *C* ``:: operator= (`` *C* ``&& );`` | MoveAssignmentOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(const`` *C* ``& );`` | CopyConstructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(`` *C* ``&& );`` | MoveConstructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(void);`` | NoArgConstructor_ | Default constructor |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``}`` | EnumConstant_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``friend void`` *func* ``( int );`` | FriendDecl_ | |
|
||||
| | ``friend class`` *B* ``;`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalEnum_ | |
|
||||
| | ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``};`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedEnum_ | |
|
||||
| | ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``}`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``enum class`` *en* ``: short {`` *val1* ``,`` *val2* ... ``}`` | ScopedEnum_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | AbstractClass_ | |
|
||||
| | ``virtual void`` *func* ``( int ) = 0;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``template < int , float > class`` *C* ``{`` ... ``};`` | ClassTemplateInstantiation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``template < > class`` *C* ``<`` Type_ ``> {`` ... ``};`` | FullClassTemplateSpecialization_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | PartialClassTemplateSpecialization_ | |
|
||||
| | ``class`` *C* ``<`` *T* ``,`` *5* ``> {`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``( void ) {`` ... ``class`` *C* ``{`` ... ``};`` ... ``}`` | LocalClass_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``class`` *D* ``{`` ... ``};`` ... ``};`` | NestedClass_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` | Class_ | |
|
||||
| | Type_ *var* ``;`` | | |
|
||||
| | Type_ *func* ``(`` Parameter_... ``) {`` ... ``}``... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``struct`` *S* ``{`` ... | | Struct_ | |
|
||||
| | Type_ *var* ``;`` | | Class_ | |
|
||||
| | Type_ *func* ``(`` Parameter_... ``) {`` ... ``}``... ``};`` | | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``union`` *U* ``{`` | | Union_ | |
|
||||
| | Type_ *var1* ``;`` | | Struct_ | |
|
||||
| | Type_ *var2* ``;`` ... ``};`` | | Class_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | ProxyClass_ | Appears only in *uninstantiated* |
|
||||
| | ``struct`` *C* ``:`` *T* ``{`` ... ``};`` | | templates |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalStruct_ | |
|
||||
| | ``struct`` *S* ``{`` ... ``};`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedStruct_ | |
|
||||
| | ``struct`` *S* ``{`` ... ``};`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``int *`` *func* ``( void ) {`` ... ``union`` *U* ``{`` ... ``};`` ... ``}`` | LocalUnion_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``union`` *U* ``{`` ... ``};`` ... ``};`` | NestedUnion_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``typedef int`` *T* ``;`` | TypedefType_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalTypedefType_ | |
|
||||
| | ``typedef int`` *T* ``;`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedTypedefType_ | |
|
||||
| | ``typedef int`` *T* ``;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *V* ``:`` ... ``public`` *B* ... ``{`` ... ``};`` | ClassDerivation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``class`` *V* ``:`` ... ``virtual`` *B* ... ``{`` ... ``};`` | VirtualClassDerivation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | TemplateClass_ | |
|
||||
| | ``class`` *C* ``{`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``int`` *foo* ``(`` Type_ *param1* ``,`` Type_ *param2* ... ``);`` | Parameter_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
| ``template <typename`` *T* ``>`` *T* *t* ``;`` | TemplateVariable_ | Since C++14 |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------------------------------+-------------------------------------+
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+===============================================================================+======================================+=====================================+
|
||||
| ``int`` *var* ``;`` | GlobalVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``namespace`` *N* ``{`` ... ``float`` *var* ``;`` ... ``}`` | NamespaceVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``( void ) {`` ... ``float`` *var* ``;`` ... ``}`` | LocalVariable_ | See also Initializer_ |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``int`` *var* ``;`` ... ``}`` | MemberVariable_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``(const char`` *param* ``);`` | Function_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | TemplateFunction_ | |
|
||||
| | ``void`` *func* ``(`` *T* ``param);`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``(const char*`` *format* ``, ...)`` | FormattingFunction_ | |
|
||||
| | ``{`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *func* ``< int, float > (`` ... ``);`` | FunctionTemplateInstantiation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | FunctionTemplateSpecialization_ | |
|
||||
| | *func* ``< int,`` *T* ``> (`` ... ``) {`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | MemberFunction_ | |
|
||||
| | ``int`` *func* ``( float`` *param* ``);`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | ConstMemberFunction_ | |
|
||||
| | ``int`` *func* ``( float`` *param* ``) const;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``virtual int`` *func* ``(`` ... ``) {`` ... ``} };`` | VirtualFunction_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... *C* ``(`` ... ``) {`` ... ``}`` ... ``};`` | Constructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``C::operator float () const;`` | ConversionOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``~`` *C* ``( void ) {`` ... ``}`` ... ``};`` | Destructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | ConversionConstructor_ | |
|
||||
| | *C* ``( const`` *D* ``&`` *d* ``) {`` ... ``}`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *C* ``&`` *C* ``:: operator= (const`` *C* ``& );`` | CopyAssignmentOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *C* ``&`` *C* ``:: operator= (`` *C* ``&& );`` | MoveAssignmentOperator_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(const`` *C* ``& );`` | CopyConstructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(`` *C* ``&& );`` | MoveConstructor_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| *C* ``::`` *C* ``(void);`` | NoArgConstructor_ | Default constructor |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``}`` | EnumConstant_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``friend void`` *func* ``( int );`` | FriendDecl_ | |
|
||||
| | ``friend class`` *B* ``;`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalEnum_ | |
|
||||
| | ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``};`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedEnum_ | |
|
||||
| | ``enum`` *en* ``{`` *val1* ``,`` *val2* ... ``}`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``enum class`` *en* ``: short {`` *val1* ``,`` *val2* ... ``}`` | ScopedEnum_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | AbstractClass_ | |
|
||||
| | ``virtual void`` *func* ``( int ) = 0;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``template < int , float > class`` *C* ``{`` ... ``};`` | ClassTemplateInstantiation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``template < > class`` *C* ``<`` Type_ ``> {`` ... ``};`` | FullClassTemplateSpecialization_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | PartialClassTemplateSpecialization_ | |
|
||||
| | ``class`` *C* ``<`` *T* ``,`` *5* ``> {`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``int`` *func* ``( void ) {`` ... ``class`` *C* ``{`` ... ``};`` ... ``}`` | LocalClass_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``class`` *D* ``{`` ... ``};`` ... ``};`` | NestedClass_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` | Class_ | |
|
||||
| | Type_ *var* ``;`` | | |
|
||||
| | Type_ *func* ``(`` Parameter_... ``) {`` ... ``}``... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``struct`` *S* ``{`` ... | | Struct_ | |
|
||||
| | Type_ *var* ``;`` | | Class_ | |
|
||||
| | Type_ *func* ``(`` Parameter_... ``) {`` ... ``}``... ``};`` | | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``union`` *U* ``{`` | | Union_ | |
|
||||
| | Type_ *var1* ``;`` | | Struct_ | |
|
||||
| | Type_ *var2* ``;`` ... ``};`` | | Class_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | ProxyClass_ | Appears only in *uninstantiated* |
|
||||
| | ``struct`` *C* ``:`` *T* ``{`` ... ``};`` | | templates |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalStruct_ | |
|
||||
| | ``struct`` *S* ``{`` ... ``};`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedStruct_ | |
|
||||
| | ``struct`` *S* ``{`` ... ``};`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``int *`` *func* ``( void ) {`` ... ``union`` *U* ``{`` ... ``};`` ... ``}`` | LocalUnion_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *C* ``{`` ... ``union`` *U* ``{`` ... ``};`` ... ``};`` | NestedUnion_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``typedef int`` *T* ``;`` | TypedefType_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``int`` *func* ``( void ) {`` ... | LocalTypedefType_ | |
|
||||
| | ``typedef int`` *T* ``;`` ... ``}`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``class`` *C* ``{`` ... | NestedTypedefType_ | |
|
||||
| | ``typedef int`` *T* ``;`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *V* ``:`` ... ``public`` *B* ... ``{`` ... ``};`` | ClassDerivation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``class`` *V* ``:`` ... ``virtual`` *B* ... ``{`` ... ``};`` | VirtualClassDerivation_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| | ``template < typename`` *T* ``>`` | TemplateClass_ | |
|
||||
| | ``class`` *C* ``{`` ... ``};`` | | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``int`` *foo* ``(`` Type_ *param1* ``,`` Type_ *param2* ... ``);`` | Parameter_ | |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
| ``template <typename`` *T* ``>`` *T* *t* ``;`` | TemplateVariable_ | Since C++14 |
|
||||
+-------------------------------------------------------------------------------+--------------------------------------+-------------------------------------+
|
||||
|
||||
Statement classes
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
This table lists subclasses of Stmt_ representing C/C++ statements.
|
||||
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+==========================================================+=================================================+===================================================+
|
||||
| ``__asm__ ("`` *movb %bh, (%eax)* ``");`` | AsmStmt_ | Specific to a given CPU instruction set |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``{`` Stmt_... ``}`` | Block_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``catch (`` Parameter_ ``)`` Block_ | CatchBlock_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``catch ( ... )`` Block_ | CatchAnyBlock_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``goto *`` *labelptr* ``;`` | ComputedGotoStmt_ | GNU extension; use with LabelLiteral_ |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| Type_ *i* ``,`` *j* ``;`` | DeclStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``if (`` Expr_ ``)`` Stmt_ ``else`` Stmt_ | IfStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``switch (`` Expr_ ``) {`` SwitchCase_... ``}`` | SwitchStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``do`` Stmt_ ``while (`` Expr_ ``)`` | DoStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``for (`` DeclStmt_ ``;`` Expr_ ``;`` Expr_ ``)`` Stmt_ | ForStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``for (`` DeclStmt_ ``:`` Expr_ ``)`` Stmt_ | RangeBasedForStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``while (`` Expr_ ``)`` Stmt_ | WhileStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``;`` | ExprStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``__try {`` ... ``} __except (`` Expr_ ``) {`` ... ``}`` | MicrosoftTryExceptStmt_ | Structured exception handling (SEH) under Windows |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``__try {`` ... ``} __finally {`` ... ``}`` | MicrosoftTryFinallyStmt_ | Structured exception handling (SEH) under Windows |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``return`` Expr_ ``;`` | ReturnStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``case`` Expr_ ``:`` | SwitchCase_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``try {`` Stmt_... ``}`` CatchBlock_... CatchAnyBlock_ | TryStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| | ``void`` *func* ``(void) try {`` Stmt_... ``}`` | FunctionTryStmt_ | |
|
||||
| | CatchBlock_... CatchAnyBlock_ | | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``;`` | EmptyStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``break;`` | BreakStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``continue;`` | ContinueStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``goto`` LabelStmt_ ``;`` | GotoStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| *slabel* ``:`` | LabelStmt_ | |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
| ``float`` *arr* ``[`` Expr_ ``] [`` Expr_ ``];`` | VlaDeclStmt_ | C99 variable-length array |
|
||||
+----------------------------------------------------------+-------------------------------------------------+---------------------------------------------------+
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+==========================================================+================================+===================================================+
|
||||
| ``__asm__ ("`` *movb %bh, (%eax)* ``");`` | AsmStmt_ | Specific to a given CPU instruction set |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``{`` Stmt_... ``}`` | Block_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``catch (`` Parameter_ ``)`` Block_ | CatchBlock_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``catch ( ... )`` Block_ | CatchAnyBlock_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``goto *`` *labelptr* ``;`` | ComputedGotoStmt_ | GNU extension; use with LabelLiteral_ |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| Type_ *i* ``,`` *j* ``;`` | DeclStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``if (`` Expr_ ``)`` Stmt_ ``else`` Stmt_ | IfStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``switch (`` Expr_ ``) {`` SwitchCase_... ``}`` | SwitchStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``do`` Stmt_ ``while (`` Expr_ ``)`` | DoStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``for (`` DeclStmt_ ``;`` Expr_ ``;`` Expr_ ``)`` Stmt_ | ForStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``for (`` DeclStmt_ ``:`` Expr_ ``)`` Stmt_ | RangeBasedForStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``while (`` Expr_ ``)`` Stmt_ | WhileStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| Expr_ ``;`` | ExprStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``__try {`` ... ``} __except (`` Expr_ ``) {`` ... ``}`` | MicrosoftTryExceptStmt_ | Structured exception handling (SEH) under Windows |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``__try {`` ... ``} __finally {`` ... ``}`` | MicrosoftTryFinallyStmt_ | Structured exception handling (SEH) under Windows |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``return`` Expr_ ``;`` | ReturnStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``case`` Expr_ ``:`` | SwitchCase_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``try {`` Stmt_... ``}`` CatchBlock_... CatchAnyBlock_ | TryStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| | ``void`` *func* ``(void) try {`` Stmt_... ``}`` | FunctionTryStmt_ | |
|
||||
| | CatchBlock_... CatchAnyBlock_ | | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``;`` | EmptyStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``break;`` | BreakStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``continue;`` | ContinueStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``goto`` LabelStmt_ ``;`` | GotoStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| *slabel* ``:`` | LabelStmt_ | |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
| ``float`` *arr* ``[`` Expr_ ``] [`` Expr_ ``];`` | VlaDeclStmt_ | C99 variable-length array |
|
||||
+----------------------------------------------------------+--------------------------------+---------------------------------------------------+
|
||||
|
||||
|
||||
Expression classes
|
||||
@@ -419,67 +419,67 @@ Type classes
|
||||
|
||||
This table lists subclasses of Type_ representing C/C++ types.
|
||||
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+===================================================================+=============================================================================================================================+=================+
|
||||
| ``void`` | VoidType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``_Bool`` or ``bool`` | BoolType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``char16_t`` | `Char16Type <https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Type.qll/type.Type$Char16Type.html>`__ | C11, C++11 |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``char32_t`` | `Char32Type <https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Type.qll/type.Type$Char32Type.html>`__ | C11, C++11 |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``char`` | PlainCharType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``signed char`` | SignedCharType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``unsigned char`` | UnsignedCharType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``int`` | IntType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``long long`` | LongLongType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``long`` | LongType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``short`` | ShortType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``wchar_t`` | WideCharType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``nullptr_t`` | NullPointerType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``double`` | DoubleType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``long double`` | LongDoubleType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``float`` | FloatType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``auto`` | AutoType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``decltype (`` Expr_ ``)`` | Decltype_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``[`` *n* ``]`` | ArrayType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``( ^`` *blockptr* ``) (`` Parameter_... ``)`` | BlockType_ | Apple extension |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``( *`` *funcptr* ``) (`` Parameter_... ``)`` | FunctionPointerType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``( &`` *funcref* ``) (`` Parameter_... ``)`` | FunctionReferenceType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``__attribute__ ( ( vector_size (`` *n* ``) ) )`` | GNUVectorType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``*`` | PointerType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``&`` | LValueReferenceType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``&&`` | RValueReferenceType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| Type_ ``(`` Class_ ``*::`` *membptr* ``) (`` Parameter_... ``)`` | PointerToMemberType_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``template < template < typename > class`` *C* ``>`` | TemplateTemplateParameter_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
| ``template < typename`` *T* ``>`` | TemplateParameter_ | |
|
||||
+-------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------+-----------------+
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Example syntax | CodeQL class | Remarks |
|
||||
+===================================================================+=================================+=================+
|
||||
| ``void`` | VoidType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``_Bool`` or ``bool`` | BoolType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``char16_t`` | Char16Type_ | C11, C++11 |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``char32_t`` | Char32Type_ | C11, C++11 |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``char`` | PlainCharType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``signed char`` | SignedCharType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``unsigned char`` | UnsignedCharType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``int`` | IntType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``long long`` | LongLongType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``long`` | LongType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``short`` | ShortType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``wchar_t`` | WideCharType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``nullptr_t`` | NullPointerType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``double`` | DoubleType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``long double`` | LongDoubleType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``float`` | FloatType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``auto`` | AutoType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``decltype (`` Expr_ ``)`` | Decltype_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``[`` *n* ``]`` | ArrayType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``( ^`` *blockptr* ``) (`` Parameter_... ``)`` | BlockType_ | Apple extension |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``( *`` *funcptr* ``) (`` Parameter_... ``)`` | FunctionPointerType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``( &`` *funcref* ``) (`` Parameter_... ``)`` | FunctionReferenceType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``__attribute__ ( ( vector_size (`` *n* ``) ) )`` | GNUVectorType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``*`` | PointerType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``&`` | LValueReferenceType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``&&`` | RValueReferenceType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| Type_ ``(`` Class_ ``*::`` *membptr* ``) (`` Parameter_... ``)`` | PointerToMemberType_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``template < template < typename > class`` *C* ``>`` | TemplateTemplateParameter_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
| ``template < typename`` *T* ``>`` | TemplateParameter_ | |
|
||||
+-------------------------------------------------------------------+---------------------------------+-----------------+
|
||||
|
||||
|
||||
Preprocessor classes
|
||||
@@ -521,6 +521,14 @@ This table lists Preprocessor_ classes representing C/C++ preprocessing directiv
|
||||
| ``#define`` *macro* ... | Macro_ | |
|
||||
+-------------------------------------+----------------------+----------------------+
|
||||
|
||||
Further reading
|
||||
---------------
|
||||
|
||||
.. include:: ../reusables/cpp-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
|
||||
.. Links used in tables. For information about using these links, see
|
||||
https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#hyperlinks.
|
||||
|
||||
.. _Declaration: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Declaration.qll/type.Declaration$Declaration.html
|
||||
.. _GlobalVariable: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Variable.qll/type.Variable$GlobalVariable.html
|
||||
@@ -741,10 +749,7 @@ This table lists Preprocessor_ classes representing C/C++ preprocessing directiv
|
||||
.. _Import: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Include.qll/type.Include$Import.html
|
||||
.. _IncludeNext: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Include.qll/type.Include$IncludeNext.html
|
||||
.. _Macro: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Macro.qll/type.Macro$Macro.html
|
||||
.. _Char16Type: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Type.qll/type.Type$Char16Type.html
|
||||
.. _Char32Type: https://codeql.github.com/codeql-standard-libraries/cpp/semmle/code/cpp/Type.qll/type.Type$Char32Type.html>
|
||||
|
||||
|
||||
Further reading
|
||||
---------------
|
||||
|
||||
.. include:: ../reusables/cpp-further-reading.rst
|
||||
.. include:: ../reusables/codeql-ref-tools-further-reading.rst
|
||||
|
||||
@@ -67,7 +67,7 @@ To overcome these potential problems, two kinds of data flow are modeled in the
|
||||
|
||||
- Global data flow, effectively considers the data flow within an entire program, by calculating data flow between functions and through object properties. Computing global data flow is typically more time and energy intensive than local data flow, therefore queries should be refined to look for more specific sources and sinks.
|
||||
|
||||
Many CodeQL queries contain examples of both local and global data flow analysis. See `the built-in queries <https://help.semmle.com/wiki/display/QL/Built-in+queries>`__ for details.
|
||||
Many CodeQL queries contain examples of both local and global data flow analysis. For more information, see `CodeQL query help <https://codeql.github.com/codeql-query-help>`__.
|
||||
|
||||
Normal data flow vs taint tracking
|
||||
**********************************
|
||||
|
||||
Reference in New Issue
Block a user