Skip to content

Commit 61e8ad2

Browse files
committed
C++: Address review comments.
1 parent 83d53ba commit 61e8ad2

File tree

6 files changed

+30
-15
lines changed

6 files changed

+30
-15
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
category: deprecated
3+
---
4+
* The predicate `getAContructorCall` in the class `SslContextClass` has been deprecated. Use `getAConstructorCall` instead.

cpp/ql/lib/semmle/code/cpp/dataflow/internal/DataFlowUtil.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,15 @@ class ContentSet instanceof Content {
829829

830830
/**
831831
* Holds if this element is at the specified location.
832-
* The location spans column `sc` of line `sl` to
833-
* column `ec` of line `el` in file `path`.
832+
* The location spans column `startcolumn` of line `startline` to
833+
* column `endcolumn` of line `endline` in file `filepath`.
834834
* For more information, see
835835
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
836836
*/
837-
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
838-
super.hasLocationInfo(path, sl, sc, el, ec)
837+
predicate hasLocationInfo(
838+
string filepath, int startline, int startcolumn, int endline, int endcolumn
839+
) {
840+
super.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
839841
}
840842
}
841843

cpp/ql/lib/semmle/code/cpp/ir/dataflow/internal/DataFlowUtil.qll

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2268,13 +2268,15 @@ class ContentSet instanceof Content {
22682268

22692269
/**
22702270
* Holds if this element is at the specified location.
2271-
* The location spans column `sc` of line `sl` to
2272-
* column `ec` of line `el` in file `path`.
2271+
* The location spans column `startcolumn` of line `startline` to
2272+
* column `endcolumn` of line `endline` in file `filepath`.
22732273
* For more information, see
22742274
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
22752275
*/
2276-
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
2277-
super.hasLocationInfo(path, sl, sc, el, ec)
2276+
predicate hasLocationInfo(
2277+
string filepath, int startline, int startcolumn, int endline, int endcolumn
2278+
) {
2279+
super.hasLocationInfo(filepath, startline, startcolumn, endline, endcolumn)
22782280
}
22792281
}
22802282

cpp/ql/lib/semmle/code/cpp/valuenumbering/HashCons.qll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ private predicate mk_UuidofOperator(Type t, UuidofOperator e) {
648648
}
649649

650650
private predicate analyzableTypeidType(TypeidOperator e) {
651-
not exists(e.getAChild()) and
651+
count(e.getAChild()) = 0 and
652652
strictcount(e.getResultType()) = 1
653653
}
654654

cpp/ql/src/Metrics/Internal/CallableExtents.ql

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,19 @@ import cpp
1515
class RangeFunction extends Function {
1616
/**
1717
* Holds if this function is at the specified location.
18-
* The location spans column `sc` of line `sl` to
19-
* column `ec` of line `el` in file `path`.
18+
* The location spans column `startcolumn` of line `startline` to
19+
* column `endcolumn` of line `endline` in file `filepath`.
2020
* For more information, see
2121
* [Locations](https://codeql.github.com/docs/writing-codeql-queries/providing-locations-in-codeql-queries/).
2222
*/
23-
predicate hasLocationInfo(string path, int sl, int sc, int el, int ec) {
24-
super.getLocation().hasLocationInfo(path, sl, sc, _, _) and
23+
predicate hasLocationInfo(
24+
string filepath, int startline, int startcolumn, int endline, int endcolumn
25+
) {
26+
super.getLocation().hasLocationInfo(filepath, startline, startcolumn, _, _) and
2527
(
26-
this.getBlock().getLocation().hasLocationInfo(path, _, _, el, ec)
28+
this.getBlock().getLocation().hasLocationInfo(filepath, _, _, endline, endcolumn)
2729
or
28-
not exists(this.getBlock()) and el = sl + 1 and ec = 1
30+
not exists(this.getBlock()) and endline = startline + 1 and endcolumn = 1
2931
)
3032
}
3133
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
category: fix
3+
---
4+
* The predicate `occurenceCount` in the file module `MagicConstants` has been deprecated. Use `occurrenceCount` instead.
5+
* The predicate `additionalAdditionOrSubstractionCheckForLeapYear` in the file module `LeapYear` has been deprecated. Use `additionalAdditionOrSubtractionCheckForLeapYear` instead.

0 commit comments

Comments
 (0)