Skip to content

Commit 360c7a1

Browse files
committed
Address review comments
1 parent 02ca09a commit 360c7a1

File tree

15 files changed

+150
-30
lines changed

15 files changed

+150
-30
lines changed

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl2.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl3.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/dataflow/internal/DataFlowImpl4.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

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

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl2.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl3.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

cpp/ql/src/semmle/code/cpp/ir/dataflow/internal/DataFlowImpl4.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

csharp/ql/src/semmle/code/csharp/dataflow/internal/DataFlowImpl.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

java/ql/src/semmle/code/java/dataflow/internal/DataFlowImpl.qll

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,11 @@ private predicate flowCandFwd(Node node, boolean fromArg, AccessPathFront apf, C
836836
if node instanceof CastingNode then compatibleTypes(node.getType(), apf.getType()) else any()
837837
}
838838

839-
/** A node that should have a `nil` access path front. */
839+
/**
840+
* A node that requires an empty access path and should have its tracked type
841+
* (re-)computed. This is either a source or a node reached through an
842+
* additional step.
843+
*/
840844
private class AccessPathFrontNilNode extends Node {
841845
AccessPathFrontNilNode() {
842846
nodeCand(this, _) and
@@ -1101,7 +1105,11 @@ private predicate popWithFront(AccessPath ap0, Content f, AccessPathFront apf, A
11011105
/** Holds if `ap` corresponds to the cons of `f` and `ap0`. */
11021106
private predicate push(AccessPath ap0, Content f, AccessPath ap) { pop(ap, f, ap0) }
11031107

1104-
/** A node that should have a `nil` access path. */
1108+
/**
1109+
* A node that requires an empty access path and should have its tracked type
1110+
* (re-)computed. This is either a source or a node reached through an
1111+
* additional step.
1112+
*/
11051113
private class AccessPathNilNode extends Node {
11061114
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
11071115

0 commit comments

Comments
 (0)