Skip to content

Commit d25a312

Browse files
committed
Merge branch 'main' into mathiasvp/replace-ast-with-ir-use-usedataflow
2 parents d89b8ba + d627358 commit d25a312

File tree

182 files changed

+1615
-297
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

182 files changed

+1615
-297
lines changed

cpp/ql/lib/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.4
2+
3+
No user-facing changes.
4+
15
## 0.5.3
26

37
No user-facing changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.5.4
2+
3+
No user-facing changes.

cpp/ql/lib/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.5.3
2+
lastReleaseVersion: 0.5.4

cpp/ql/lib/qlpack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: codeql/cpp-all
2-
version: 0.5.4-dev
2+
version: 0.5.5-dev
33
groups: cpp
44
dbscheme: semmlecode.cpp.dbscheme
55
extractor: cpp

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -619,11 +619,10 @@ private class DirectAccessHolder extends Element {
619619
/**
620620
* Like `couldAccessMember` but only contains derivations in which either
621621
* (5.2), (5.3) or (5.4) must be invoked. In other words, the `this`
622-
* parameter is not ignored. This restriction makes it feasible to fully
623-
* enumerate this predicate even on large code bases. We check for 11.4 as
624-
* part of (5.3), since this further limits the number of tuples produced by
625-
* this predicate.
622+
* parameter is not ignored. We check for 11.4 as part of (5.3), since
623+
* this further limits the number of tuples produced by this predicate.
626624
*/
625+
pragma[inline]
627626
predicate thisCouldAccessMember(Class memberClass, AccessSpecifier memberAccess, Class derived) {
628627
// Only (5.4) is recursive, and chains of invocations of (5.4) can always
629628
// be collapsed to one invocation by the transitivity of 11.2/4.
@@ -665,7 +664,9 @@ private class DirectAccessHolder extends Element {
665664
// bypasses `p`. Then that path must be public, or we are in case 2.
666665
exists(AccessSpecifier public | public.hasName("public") |
667666
exists(Class between, Class p |
668-
between.accessOfBaseMember(memberClass, memberAccess).hasName("protected") and
667+
between
668+
.accessOfBaseMember(pragma[only_bind_into](memberClass), memberAccess)
669+
.hasName("protected") and
669670
this.isFriendOfOrEqualTo(p) and
670671
(
671672
// This is case 1 from above. If `p` derives privately from `between`

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ module Impl<FullStateConfigSig Config> {
456456
* The Boolean `cc` records whether the node is reached through an
457457
* argument in a call.
458458
*/
459+
pragma[assume_small_delta]
459460
private predicate fwdFlow(NodeEx node, Cc cc) {
460461
sourceNode(node, _) and
461462
if hasSourceCallCtx() then cc = true else cc = false

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,7 @@ module Impl<FullStateConfigSig Config> {
456456
* The Boolean `cc` records whether the node is reached through an
457457
* argument in a call.
458458
*/
459+
pragma[assume_small_delta]
459460
private predicate fwdFlow(NodeEx node, Cc cc) {
460461
sourceNode(node, _) and
461462
if hasSourceCallCtx() then cc = true else cc = false

cpp/ql/src/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.5.4
2+
3+
No user-facing changes.
4+
15
## 0.5.3
26

37
No user-facing changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
## 0.5.4
2+
3+
No user-facing changes.

cpp/ql/src/codeql-pack.release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
lastReleaseVersion: 0.5.3
2+
lastReleaseVersion: 0.5.4

0 commit comments

Comments
 (0)