You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/language/learn-ql/cpp/ql-for-cpp.rst
+4-34Lines changed: 4 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,11 @@
1
1
CodeQL for C/C++
2
2
================
3
3
4
+
5
+
Learn how to write queries using the standard CodeQL libraries for C and C++.
6
+
4
7
.. toctree::
5
-
:glob:
6
-
:hidden:
8
+
:maxdepth:1
7
9
8
10
introduce-libraries-cpp
9
11
function-classes
@@ -12,42 +14,10 @@ CodeQL for C/C++
12
14
dataflow
13
15
private-field-initialization
14
16
zero-space-terminator
15
-
16
-
These topics provide an overview of the CodeQL libraries for C/C++ and show examples of how to write queries that use them.
17
-
18
-
- `Basic C/C++ query <https://lgtm.com/help/lgtm/console/ql-cpp-basic-example>`__ describes how to write and run queries using LGTM.
19
-
20
-
- :doc:`Introducing the CodeQL libraries for C/C++ <introduce-libraries-cpp>` introduces the standard libraries used to write queries for C and C++ code.
21
-
22
-
- :doc:`Tutorial: Function classes <function-classes>` demonstrates how to write queries using the standard CodeQL library classes for C/C++ functions.
23
-
24
-
- :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.
25
-
26
-
- :doc:`Tutorial: Conversions and classes <conversions-classes>` demonstrates how to write queries using the standard CodeQL library classes for C/C++ conversions and classes.
27
-
28
-
- :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++.
29
-
30
-
- :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.
31
-
32
-
- :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.
33
-
34
-
Advanced libraries
35
-
----------------------------------
36
-
37
-
.. toctree::
38
-
:hidden:
39
-
40
17
guards
41
18
range-analysis
42
19
value-numbering-hash-cons
43
20
44
-
- :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.
45
-
46
-
- :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.
47
-
48
-
- :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.
0 commit comments