Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit dc258f1

Browse files
author
Felicity Chapman
committed
Minor text changes
1 parent 9b5437c commit dc258f1

1 file changed

Lines changed: 18 additions & 23 deletions

File tree

change-notes/1.23/analysis-cpp.md

Lines changed: 18 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,44 +2,39 @@
22

33
The following changes in version 1.23 affect C/C++ analysis in all applications.
44

5-
## General improvements
6-
75
## New queries
86

97
| **Query** | **Tags** | **Purpose** |
108
|-----------------------------|-----------|--------------------------------------------------------------------|
11-
| Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) | reliability, japanese-era | This query is a combination of two old queries that were identical in purpose but separate as an implementation detail. This new query replaces Hard-coded Japanese era start date in call (`cpp/japanese-era/constructor-or-method-with-exact-era-date`) and Hard-coded Japanese era start date in struct (`cpp/japanese-era/struct-with-exact-era-date`). |
12-
| Signed overflow check (`cpp/signed-overflow-check`) | correctness, security | Finds overflow checks that rely on signed integer addition to overflow, which has undefined behavior. Example: `a + b < a`. |
13-
| Pointer overflow check (`cpp/pointer-overflow-check`) | correctness, security | Finds overflow checks that rely on pointer addition to overflow, which has undefined behavior. Example: `ptr + a < ptr`. |
9+
| Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) | reliability, japanese-era | This query is a combination of two old queries that were identical in purpose but separate as an implementation detail. This new query replaces Hard-coded Japanese era start date in call (`cpp/japanese-era/constructor-or-method-with-exact-era-date`) and Hard-coded Japanese era start date in `struct` (`cpp/japanese-era/struct-with-exact-era-date`). Results are not shown on LGTM by default. |
10+
| Signed overflow check (`cpp/signed-overflow-check`) | correctness, security | Finds overflow checks that rely on signed integer addition to overflow, which has undefined behavior. Example: `a + b < a`. Results are shown on LGTM by default. |
11+
| Pointer overflow check (`cpp/pointer-overflow-check`) | correctness, security | Finds overflow checks that rely on pointer addition to overflow, which has undefined behavior. Example: `ptr + a < ptr`. Results are shown on LGTM by default. |
1412

1513
## Changes to existing queries
1614

1715
| **Query** | **Expected impact** | **Change** |
1816
|----------------------------|------------------------|------------------------------------------------------------------|
19-
| Query name (`query id`) | Expected impact | Message. |
2017
| Hard-coded Japanese era start date in call (`cpp/japanese-era/constructor-or-method-with-exact-era-date`) | Deprecated | This query has been deprecated. Use the new combined query Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) instead. |
2118
| Hard-coded Japanese era start date in struct (`cpp/japanese-era/struct-with-exact-era-date`) | Deprecated | This query has been deprecated. Use the new combined query Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) instead. |
2219
| Hard-coded Japanese era start date (`cpp/japanese-era/exact-era-date`) | More correct results | This query now checks for the beginning date of the Reiwa era (1st May 2019). |
2320
| Sign check of bitwise operation (`cpp/bitwise-sign-check`) | Fewer false positive results | Results involving `>=` or `<=` are no longer reported. |
24-
| Too few arguments to formatting function (`cpp/wrong-number-format-arguments`) | Fewer false positive results | Fixed false positives resulting from mistmatching declarations of a formatting function. |
25-
| Too many arguments to formatting function (`cpp/too-many-format-arguments`) | Fewer false positive results | Fixed false positives resulting from mistmatching declarations of a formatting function. |
26-
| Unclear comparison precedence (`cpp/comparison-precedence`) | Fewer false positive results | False positives involving template classes and functions have been fixed. |
21+
| Too few arguments to formatting function (`cpp/wrong-number-format-arguments`) | Fewer false positive results | Fixed false positive results triggered by mismatching declarations of a formatting function. |
22+
| Too many arguments to formatting function (`cpp/too-many-format-arguments`) | Fewer false positive results | Fixed false positive results triggered by mismatching declarations of a formatting function. |
23+
| Unclear comparison precedence (`cpp/comparison-precedence`) | Fewer false positive results | False positive results involving template classes and functions have been fixed. |
2724
| Comparison of narrow type with wide type in loop condition (`cpp/comparison-with-wider-type`) | Higher precision | The precision of this query has been increased to "high" as the alerts from this query have proved to be valuable on real-world projects. With this precision, results are now displayed by default in LGTM. |
28-
| Non-constant format string (`cpp/non-constant-format`) | Fewer false positive results | Fixed false positives resulting from mistmatching declarations of a formatting function. |
29-
| Wrong type of arguments to formatting function (`cpp/wrong-type-format-argument`) | More correct results and fewer false positive results | This query now understands explicitly specified argument numbers in format strings, such as the `1$` in `%1$s`. |
25+
| Non-constant format string (`cpp/non-constant-format`) | Fewer false positive results | Fixed false positive results triggrered by mismatching declarations of a formatting function. |
26+
| Wrong type of arguments to formatting function (`cpp/wrong-type-format-argument`) | More correct results and fewer false positive results | This query now understands explicitly-specified argument numbers in format strings, such as the `1$` in `%1$s`. |
3027

3128
## Changes to libraries
3229

3330
* The data-flow library in `semmle.code.cpp.dataflow.DataFlow` and
3431
`semmle.code.cpp.dataflow.TaintTracking` have had extensive changes:
3532
* Data flow through fields is now more complete and reliable.
36-
* To debug a lack of flow, instead of specifying `isSink(Node n) { any() }`
37-
on a configuration to
38-
explore the possible flow from a source, it is recommended to use the new
39-
`Configuration::hasPartialFlow` predicate as this gives a more complete
40-
picture of the partial flow paths from a given source. The feature is
41-
disabled by default and can be enabled for individual configurations by
42-
overriding `int explorationLimit()`.
33+
* The data-flow library has been extended with a new feature to aid debugging.
34+
If you want to explore the possible flow from a source, replace
35+
`isSink(Node n) { any() }` with the new `Configuration::hasPartialFlow` predicate.
36+
This gives a more complete picture of the partial flow paths from a given source.
37+
The feature is disabled by default and can be enabled for individual configurations by overriding `int explorationLimit()`.
4338
* There is now flow out of C++ reference parameters.
4439
* There is now flow through the address-of operator (`&`).
4540
* The `DataFlow::DefinitionByReferenceNode` class now considers `f(x)` to be a
@@ -54,17 +49,17 @@ The following changes in version 1.23 affect C/C++ analysis in all applications.
5449
`TaintTracking::localExprTaint` predicate to make it easy to use the most
5550
common case of local data flow and taint: from one `Expr` to another.
5651
* The member predicates of the `FunctionInput` and `FunctionOutput` classes have been renamed for
57-
clarity (e.g. `isOutReturnPointer()` to `isReturnValueDeref()`). The existing member predicates
52+
clarity (for example, `isOutReturnPointer()` to `isReturnValueDeref()`). The existing member predicates
5853
have been deprecated, and will be removed in a future release. Code that uses the old member
5954
predicates should be updated to use the corresponding new member predicate.
6055
* The predicate `Declaration.hasGlobalOrStdName` has been added, making it
6156
easier to recognize C library functions called from C++.
6257
* The control-flow graph is now computed in QL, not in the extractor. This can
63-
lead to regressions (or improvements) in how queries are optimized because
58+
lead to changes in how queries are optimized because
6459
optimization in QL relies on static size estimates, and the control-flow edge
6560
relations will now have different size estimates than before.
6661
* Support has been added for non-type template arguments. This means that the
6762
return type of `Declaration::getTemplateArgument()` and
68-
`Declaration::getATemplateArgument` have changed to `Locatable`. See the
69-
documentation for `Declaration::getTemplateArgument()` and
70-
`Declaration::getTemplateArgumentKind()` for details.
63+
`Declaration::getATemplateArgument` have changed to `Locatable`. For details, see the
64+
CodeQL library documentation for `Declaration::getTemplateArgument()` and
65+
`Declaration::getTemplateArgumentKind()`.

0 commit comments

Comments
 (0)