Skip to content

Commit 5c80cd5

Browse files
author
Shati Patel
committed
Merge branch 'rc/1.24' into mergeback
2 parents bc7163a + c104898 commit 5c80cd5

File tree

27 files changed

+68
-92
lines changed

27 files changed

+68
-92
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
2020
* Python: `python/ql/src`
2121

2222
Each language-specific directory contains further subdirectories that group queries based on their `@tags` or purpose.
23-
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/Semmle/ql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.
23+
- Experimental queries and libraries are stored in the `experimental` subdirectory within each language-specific directory in the [CodeQL repository](https://github.com/github/codeql). For example, experimental Java queries and libraries are stored in `java/ql/src/experimental` and any corresponding tests in `java/ql/test/experimental`.
2424
- The structure of an `experimental` subdirectory mirrors the structure of its parent directory.
2525
- Select or create an appropriate directory in `experimental` based on the existing directory structure of `experimental` or its parent directory.
2626

@@ -36,7 +36,7 @@ If you have an idea for a query that you would like to share with other CodeQL u
3636

3737
3. **Formatting**
3838

39-
- The queries and libraries must be [autoformatted](https://help.semmle.com/codeql/codeql-for-vscode/reference/editor.html#autoformatting).
39+
- The queries and libraries must be autoformatted, for example using the "Format Document" command in [CodeQL for Visual Studio Code](https://help.semmle.com/codeql/codeql-for-vscode/procedures/about-codeql-for-vscode.html).
4040

4141
4. **Compilation**
4242

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ You can use the [interactive query console](https://lgtm.com/help/lgtm/using-que
99

1010
## Contributing
1111

12-
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/Semmle/ql/tree/master/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
12+
We welcome contributions to our standard library and standard checks. Do you have an idea for a new check, or how to improve an existing query? Then please go ahead and open a pull request! Before you do, though, please take the time to read our [contributing guidelines](CONTRIBUTING.md). You can also consult our [style guides](https://github.com/github/codeql/tree/master/docs) to learn how to format your code for consistency and clarity, how to write query metadata, and how to write query help documentation for your query.
1313

1414
## License
1515

cpp/ql/src/Likely Bugs/Underspecified Functions/MistypedFunctionArguments.qll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
import cpp
88

9+
pragma[inline]
910
private predicate arithTypesMatch(Type arg, Type parm) {
1011
arg = parm
1112
or

cpp/ql/src/Security/CWE/CWE-468/SuspiciousAddWithSizeof.ql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ where
2828
// is probably a mistake.
2929
addWithSizeof(e, sizeofExpr, _) and not isCharSzPtrExpr(e)
3030
select sizeofExpr,
31-
"Suspicious sizeof offset in a pointer arithmetic expression. " + "The type of the pointer is " +
32-
e.getFullyConverted().getType().toString() + "."
31+
"Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@.",
32+
e.getFullyConverted().getType() as t, t.toString()

cpp/ql/src/semmle/code/cpp/Declaration.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ private import semmle.code.cpp.internal.QualifiedName as Q
2525
* `DeclarationEntry`, because they always have a unique source location.
2626
* `EnumConstant` and `FriendDecl` are both examples of this.
2727
*/
28-
abstract class Declaration extends Locatable, @declaration {
28+
class Declaration extends Locatable, @declaration {
2929
/**
3030
* Gets the innermost namespace which contains this declaration.
3131
*
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
| test.cpp:6:30:6:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
2-
| test.cpp:14:30:14:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
3-
| test.cpp:22:25:22:35 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
4-
| test.cpp:30:25:30:35 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
5-
| test.cpp:38:30:38:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
6-
| test.cpp:61:27:61:37 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is int *. |
7-
| test.cpp:89:43:89:55 | sizeof(MyABC) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is myInt *const. |
1+
| test.cpp:6:30:6:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
2+
| test.cpp:14:30:14:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
3+
| test.cpp:22:25:22:35 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
4+
| test.cpp:30:25:30:35 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
5+
| test.cpp:38:30:38:40 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
6+
| test.cpp:61:27:61:37 | sizeof(int) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | int * | int * |
7+
| test.cpp:89:43:89:55 | sizeof(MyABC) | Suspicious sizeof offset in a pointer arithmetic expression. The type of the pointer is $@. | file://:0:0:0:0 | myInt *const | myInt *const |

docs/language/README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ generates html slide shows in the ``<slides-output>`` directory when run from
104104
the ``ql-training`` source directory.
105105

106106
For more information about creating slides for QL training and variant analysis
107-
examples, see the `template slide deck <https://github.com/Semmle/ql/blob/master/docs/language/ql-training/template.rst>`__.
107+
examples, see the `template slide deck <https://github.com/github/codeql/blob/master/docs/language/ql-training/template.rst>`__.
108108

109109
Viewing the current version of the CodeQL documentation
110110
*******************************************************

docs/language/global-sphinx-files/qllexer.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ class QLLexer(RegexLexer):
4444
'max', 'min', 'module', 'newtype', 'not', 'none', 'or', 'order',
4545
'predicate', 'rank', 'result', 'select', 'strictconcat',
4646
'strictcount', 'strictsum', 'sum', 'super', 'then', 'this',
47-
'true', 'where'), prefix=r'\b', suffix=r'\b'),
47+
'true', 'unique', 'where'), prefix=r'\b', suffix=r'\b'),
4848
Keyword),
4949
# Identifiers
5050
(r'@?\w', Name),
5151
]
52-
}
52+
}

docs/language/learn-ql/cpp/dataflow.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,10 @@ Global data flow
139139

140140
Global data flow tracks data flow throughout the entire program, and is therefore more powerful than local data flow. However, global data flow is less precise than local data flow, and the analysis typically requires significantly more time and memory to perform.
141141

142+
.. pull-quote:: Note
143+
144+
.. include:: ../../reusables/path-problem.rst
145+
142146
Using global data flow
143147
~~~~~~~~~~~~~~~~~~~~~~
144148

docs/language/learn-ql/csharp/dataflow.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,10 @@ Global data flow
137137

138138
Global data flow tracks data flow throughout the entire program, and is therefore more powerful than local data flow. However, global data flow is less precise than local data flow, and the analysis typically requires significantly more time and memory to perform.
139139

140+
.. pull-quote:: Note
141+
142+
.. include:: ../../reusables/path-problem.rst
143+
140144
Using global data flow
141145
~~~~~~~~~~~~~~~~~~~~~~
142146

0 commit comments

Comments
 (0)