mirror of
https://github.com/github/codeql.git
synced 2026-04-28 02:05:14 +02:00
docs: tidy up ql-for-cpp
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
CodeQL for C/C++
|
||||
================
|
||||
|
||||
|
||||
Learn how to write queries using the standard CodeQL libraries for C and C++.
|
||||
|
||||
.. toctree::
|
||||
:glob:
|
||||
:hidden:
|
||||
:maxdepth: 1
|
||||
|
||||
introduce-libraries-cpp
|
||||
function-classes
|
||||
@@ -12,42 +14,10 @@ CodeQL for C/C++
|
||||
dataflow
|
||||
private-field-initialization
|
||||
zero-space-terminator
|
||||
|
||||
These topics provide an overview of the CodeQL libraries for C/C++ and show examples of how to write queries that use them.
|
||||
|
||||
- `Basic C/C++ query <https://lgtm.com/help/lgtm/console/ql-cpp-basic-example>`__ describes how to write and run queries using LGTM.
|
||||
|
||||
- :doc:`Introducing the CodeQL libraries for C/C++ <introduce-libraries-cpp>` introduces the standard libraries used to write queries for C and C++ code.
|
||||
|
||||
- :doc:`Tutorial: Function classes <function-classes>` demonstrates how to write queries using the standard CodeQL library classes for C/C++ functions.
|
||||
|
||||
- :doc:`Tutorial: Expressions, types and statements <expressions-types>` demonstrates how to write queries using the standard CodeQL library classes for C/C++ expressions, types and statements.
|
||||
|
||||
- :doc:`Tutorial: Conversions and classes <conversions-classes>` demonstrates how to write queries using the standard CodeQL library classes for C/C++ conversions and classes.
|
||||
|
||||
- :doc:`Tutorial: Analyzing data flow in C/C++ <dataflow>` demonstrates how to write queries using the standard data flow and taint tracking libraries for C/C++.
|
||||
|
||||
- :doc:`Example: Checking that constructors initialize all private fields <private-field-initialization>` works through the development of a query. It introduces recursive predicates and shows the typical workflow used to refine a query.
|
||||
|
||||
- :doc:`Example: Checking for allocations equal to strlen(string) without space for a null terminator <zero-space-terminator>` shows how a query to detect this particular buffer issue was developed.
|
||||
|
||||
Advanced libraries
|
||||
----------------------------------
|
||||
|
||||
.. toctree::
|
||||
:hidden:
|
||||
|
||||
guards
|
||||
range-analysis
|
||||
value-numbering-hash-cons
|
||||
|
||||
- :doc:`Using the guards library in C and C++ <guards>` demonstrates how to identify conditional expressions that control the execution of other code and what guarantees they provide.
|
||||
|
||||
- :doc:`Using range analysis for C and C++ <range-analysis>` demonstrates how to determine constant upper and lower bounds and possible overflow or underflow of expressions.
|
||||
|
||||
- :doc:`Using hash consing and value numbering for C and C++ <value-numbering-hash-cons>` demonstrates how to recognize expressions that are syntactically identical or compute the same value at runtime.
|
||||
|
||||
|
||||
Other resources
|
||||
---------------
|
||||
|
||||
|
||||
Reference in New Issue
Block a user