Skip to content

Commit a26efdf

Browse files
committed
Java/C++/C#: Rename DataFlowErasedType back to DataFlowType
1 parent acc7d52 commit a26efdf

27 files changed

+408
-416
lines changed

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ private predicate throughFlowNodeCand(Node node, Configuration config) {
460460
*/
461461
pragma[nomagic]
462462
private predicate simpleParameterFlow(
463-
ParameterNode p, Node node, DataFlowErasedType t, Configuration config
463+
ParameterNode p, Node node, DataFlowType t, Configuration config
464464
) {
465465
throughFlowNodeCand(node, config) and
466466
p = node and
@@ -510,7 +510,7 @@ private predicate simpleParameterFlow(
510510

511511
pragma[noinline]
512512
private predicate simpleArgumentFlowsThrough0(
513-
DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowErasedType t, Configuration config
513+
DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config
514514
) {
515515
nodeCand1(arg, unbind(config)) and
516516
not outBarrier(arg, config) and
@@ -529,7 +529,7 @@ private predicate simpleArgumentFlowsThrough0(
529529
* additional step from the configuration.
530530
*/
531531
private predicate simpleArgumentFlowsThrough(
532-
ArgumentNode arg, Node out, DataFlowErasedType t, Configuration config
532+
ArgumentNode arg, Node out, DataFlowType t, Configuration config
533533
) {
534534
exists(DataFlowCall call, ReturnKind kind |
535535
nodeCand1(out, unbind(config)) and
@@ -948,20 +948,20 @@ private predicate localFlowBigStep(
948948
}
949949

950950
private newtype TAccessPathFront =
951-
TFrontNil(DataFlowErasedType t) or
951+
TFrontNil(DataFlowType t) or
952952
TFrontHead(Content f)
953953

954954
/**
955955
* The front of an `AccessPath`. This is either a head or a nil.
956956
*/
957957
private class AccessPathFront extends TAccessPathFront {
958958
string toString() {
959-
exists(DataFlowErasedType t | this = TFrontNil(t) | result = ppReprType(t))
959+
exists(DataFlowType t | this = TFrontNil(t) | result = ppReprType(t))
960960
or
961961
exists(Content f | this = TFrontHead(f) | result = f.toString())
962962
}
963963

964-
DataFlowErasedType getType() {
964+
DataFlowType getType() {
965965
this = TFrontNil(result)
966966
or
967967
exists(Content head | this = TFrontHead(head) | result = head.getContainerType())
@@ -1012,7 +1012,7 @@ private class AccessPathFrontNilNode extends Node {
10121012
}
10131013

10141014
pragma[noinline]
1015-
private DataFlowErasedType getErasedReprType() { result = getErasedNodeType(this) }
1015+
private DataFlowType getErasedReprType() { result = getErasedNodeType(this) }
10161016

10171017
/** Gets the `nil` path front for this node. */
10181018
AccessPathFrontNil getApf() { result = TFrontNil(this.getErasedReprType()) }
@@ -1069,7 +1069,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10691069
argumentValueFlowsThrough(mid, node, _)
10701070
)
10711071
or
1072-
exists(Node mid, AccessPathFrontNil nil, DataFlowErasedType t |
1072+
exists(Node mid, AccessPathFrontNil nil, DataFlowType t |
10731073
flowCandFwd(mid, fromArg, nil, config) and
10741074
simpleArgumentFlowsThrough(mid, node, t, config) and
10751075
apf = TFrontNil(t)
@@ -1222,8 +1222,8 @@ private predicate consCand(Content f, AccessPathFront apf, Configuration config)
12221222
}
12231223

12241224
private newtype TAccessPath =
1225-
TNil(DataFlowErasedType t) or
1226-
TConsNil(Content f, DataFlowErasedType t) { consCand(f, TFrontNil(t), _) } or
1225+
TNil(DataFlowType t) or
1226+
TConsNil(Content f, DataFlowType t) { consCand(f, TFrontNil(t), _) } or
12271227
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12281228

12291229
/**
@@ -1250,7 +1250,7 @@ abstract private class AccessPath extends TAccessPath {
12501250
this = TConsCons(_, _, result)
12511251
}
12521252

1253-
DataFlowErasedType getType() {
1253+
DataFlowType getType() {
12541254
this = TNil(result)
12551255
or
12561256
result = this.getHead().getContainerType()
@@ -1266,11 +1266,11 @@ abstract private class AccessPath extends TAccessPath {
12661266

12671267
private class AccessPathNil extends AccessPath, TNil {
12681268
override string toString() {
1269-
exists(DataFlowErasedType t | this = TNil(t) | result = concat(": " + ppReprType(t)))
1269+
exists(DataFlowType t | this = TNil(t) | result = concat(": " + ppReprType(t)))
12701270
}
12711271

12721272
override AccessPathFront getFront() {
1273-
exists(DataFlowErasedType t | this = TNil(t) | result = TFrontNil(t))
1273+
exists(DataFlowType t | this = TNil(t) | result = TFrontNil(t))
12741274
}
12751275

12761276
override predicate pop(Content head, AccessPath tail) { none() }
@@ -1280,7 +1280,7 @@ abstract private class AccessPathCons extends AccessPath { }
12801280

12811281
private class AccessPathConsNil extends AccessPathCons, TConsNil {
12821282
override string toString() {
1283-
exists(Content f, DataFlowErasedType t | this = TConsNil(f, t) |
1283+
exists(Content f, DataFlowType t | this = TConsNil(f, t) |
12841284
// The `concat` becomes "" if `ppReprType` has no result.
12851285
result = "[" + f.toString() + "]" + concat(" : " + ppReprType(t))
12861286
)
@@ -1291,7 +1291,7 @@ private class AccessPathConsNil extends AccessPathCons, TConsNil {
12911291
}
12921292

12931293
override predicate pop(Content head, AccessPath tail) {
1294-
exists(DataFlowErasedType t | this = TConsNil(head, t) and tail = TNil(t))
1294+
exists(DataFlowType t | this = TConsNil(head, t) and tail = TNil(t))
12951295
}
12961296
}
12971297

@@ -1339,7 +1339,7 @@ private class AccessPathNilNode extends Node {
13391339
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
13401340

13411341
pragma[noinline]
1342-
private DataFlowErasedType getErasedReprType() { result = getErasedNodeType(this) }
1342+
private DataFlowType getErasedReprType() { result = getErasedNodeType(this) }
13431343

13441344
/** Gets the `nil` path for this node. */
13451345
AccessPathNil getAp() { result = TNil(this.getErasedReprType()) }
@@ -1411,7 +1411,7 @@ private predicate flowFwd0(
14111411
argumentValueFlowsThrough(mid, node, _)
14121412
)
14131413
or
1414-
exists(Node mid, AccessPathNil nil, DataFlowErasedType t |
1414+
exists(Node mid, AccessPathNil nil, DataFlowType t |
14151415
flowFwd(mid, fromArg, _, nil, config) and
14161416
simpleArgumentFlowsThrough(mid, node, t, config) and
14171417
ap = TNil(t) and
@@ -2020,7 +2020,7 @@ private module FlowExploration {
20202020
}
20212021

20222022
private newtype TPartialAccessPath =
2023-
TPartialNil(DataFlowErasedType t) or
2023+
TPartialNil(DataFlowType t) or
20242024
TPartialCons(Content f, int len) { len in [1 .. 5] }
20252025

20262026
/**
@@ -2041,7 +2041,7 @@ private module FlowExploration {
20412041
this = TPartialCons(_, result)
20422042
}
20432043

2044-
DataFlowErasedType getType() {
2044+
DataFlowType getType() {
20452045
this = TPartialNil(result)
20462046
or
20472047
exists(Content head | this = TPartialCons(head, _) | result = head.getContainerType())
@@ -2052,11 +2052,11 @@ private module FlowExploration {
20522052

20532053
private class PartialAccessPathNil extends PartialAccessPath, TPartialNil {
20542054
override string toString() {
2055-
exists(DataFlowErasedType t | this = TPartialNil(t) | result = concat(": " + ppReprType(t)))
2055+
exists(DataFlowType t | this = TPartialNil(t) | result = concat(": " + ppReprType(t)))
20562056
}
20572057

20582058
override AccessPathFront getFront() {
2059-
exists(DataFlowErasedType t | this = TPartialNil(t) | result = TFrontNil(t))
2059+
exists(DataFlowType t | this = TPartialNil(t) | result = TFrontNil(t))
20602060
}
20612061
}
20622062

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

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -460,7 +460,7 @@ private predicate throughFlowNodeCand(Node node, Configuration config) {
460460
*/
461461
pragma[nomagic]
462462
private predicate simpleParameterFlow(
463-
ParameterNode p, Node node, DataFlowErasedType t, Configuration config
463+
ParameterNode p, Node node, DataFlowType t, Configuration config
464464
) {
465465
throughFlowNodeCand(node, config) and
466466
p = node and
@@ -510,7 +510,7 @@ private predicate simpleParameterFlow(
510510

511511
pragma[noinline]
512512
private predicate simpleArgumentFlowsThrough0(
513-
DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowErasedType t, Configuration config
513+
DataFlowCall call, ArgumentNode arg, ReturnKind kind, DataFlowType t, Configuration config
514514
) {
515515
nodeCand1(arg, unbind(config)) and
516516
not outBarrier(arg, config) and
@@ -529,7 +529,7 @@ private predicate simpleArgumentFlowsThrough0(
529529
* additional step from the configuration.
530530
*/
531531
private predicate simpleArgumentFlowsThrough(
532-
ArgumentNode arg, Node out, DataFlowErasedType t, Configuration config
532+
ArgumentNode arg, Node out, DataFlowType t, Configuration config
533533
) {
534534
exists(DataFlowCall call, ReturnKind kind |
535535
nodeCand1(out, unbind(config)) and
@@ -948,20 +948,20 @@ private predicate localFlowBigStep(
948948
}
949949

950950
private newtype TAccessPathFront =
951-
TFrontNil(DataFlowErasedType t) or
951+
TFrontNil(DataFlowType t) or
952952
TFrontHead(Content f)
953953

954954
/**
955955
* The front of an `AccessPath`. This is either a head or a nil.
956956
*/
957957
private class AccessPathFront extends TAccessPathFront {
958958
string toString() {
959-
exists(DataFlowErasedType t | this = TFrontNil(t) | result = ppReprType(t))
959+
exists(DataFlowType t | this = TFrontNil(t) | result = ppReprType(t))
960960
or
961961
exists(Content f | this = TFrontHead(f) | result = f.toString())
962962
}
963963

964-
DataFlowErasedType getType() {
964+
DataFlowType getType() {
965965
this = TFrontNil(result)
966966
or
967967
exists(Content head | this = TFrontHead(head) | result = head.getContainerType())
@@ -1012,7 +1012,7 @@ private class AccessPathFrontNilNode extends Node {
10121012
}
10131013

10141014
pragma[noinline]
1015-
private DataFlowErasedType getErasedReprType() { result = getErasedNodeType(this) }
1015+
private DataFlowType getErasedReprType() { result = getErasedNodeType(this) }
10161016

10171017
/** Gets the `nil` path front for this node. */
10181018
AccessPathFrontNil getApf() { result = TFrontNil(this.getErasedReprType()) }
@@ -1069,7 +1069,7 @@ private predicate flowCandFwd0(Node node, boolean fromArg, AccessPathFront apf,
10691069
argumentValueFlowsThrough(mid, node, _)
10701070
)
10711071
or
1072-
exists(Node mid, AccessPathFrontNil nil, DataFlowErasedType t |
1072+
exists(Node mid, AccessPathFrontNil nil, DataFlowType t |
10731073
flowCandFwd(mid, fromArg, nil, config) and
10741074
simpleArgumentFlowsThrough(mid, node, t, config) and
10751075
apf = TFrontNil(t)
@@ -1222,8 +1222,8 @@ private predicate consCand(Content f, AccessPathFront apf, Configuration config)
12221222
}
12231223

12241224
private newtype TAccessPath =
1225-
TNil(DataFlowErasedType t) or
1226-
TConsNil(Content f, DataFlowErasedType t) { consCand(f, TFrontNil(t), _) } or
1225+
TNil(DataFlowType t) or
1226+
TConsNil(Content f, DataFlowType t) { consCand(f, TFrontNil(t), _) } or
12271227
TConsCons(Content f1, Content f2, int len) { consCand(f1, TFrontHead(f2), _) and len in [2 .. 5] }
12281228

12291229
/**
@@ -1250,7 +1250,7 @@ abstract private class AccessPath extends TAccessPath {
12501250
this = TConsCons(_, _, result)
12511251
}
12521252

1253-
DataFlowErasedType getType() {
1253+
DataFlowType getType() {
12541254
this = TNil(result)
12551255
or
12561256
result = this.getHead().getContainerType()
@@ -1266,11 +1266,11 @@ abstract private class AccessPath extends TAccessPath {
12661266

12671267
private class AccessPathNil extends AccessPath, TNil {
12681268
override string toString() {
1269-
exists(DataFlowErasedType t | this = TNil(t) | result = concat(": " + ppReprType(t)))
1269+
exists(DataFlowType t | this = TNil(t) | result = concat(": " + ppReprType(t)))
12701270
}
12711271

12721272
override AccessPathFront getFront() {
1273-
exists(DataFlowErasedType t | this = TNil(t) | result = TFrontNil(t))
1273+
exists(DataFlowType t | this = TNil(t) | result = TFrontNil(t))
12741274
}
12751275

12761276
override predicate pop(Content head, AccessPath tail) { none() }
@@ -1280,7 +1280,7 @@ abstract private class AccessPathCons extends AccessPath { }
12801280

12811281
private class AccessPathConsNil extends AccessPathCons, TConsNil {
12821282
override string toString() {
1283-
exists(Content f, DataFlowErasedType t | this = TConsNil(f, t) |
1283+
exists(Content f, DataFlowType t | this = TConsNil(f, t) |
12841284
// The `concat` becomes "" if `ppReprType` has no result.
12851285
result = "[" + f.toString() + "]" + concat(" : " + ppReprType(t))
12861286
)
@@ -1291,7 +1291,7 @@ private class AccessPathConsNil extends AccessPathCons, TConsNil {
12911291
}
12921292

12931293
override predicate pop(Content head, AccessPath tail) {
1294-
exists(DataFlowErasedType t | this = TConsNil(head, t) and tail = TNil(t))
1294+
exists(DataFlowType t | this = TConsNil(head, t) and tail = TNil(t))
12951295
}
12961296
}
12971297

@@ -1339,7 +1339,7 @@ private class AccessPathNilNode extends Node {
13391339
AccessPathNilNode() { flowCand(this.(AccessPathFrontNilNode), _, _, _) }
13401340

13411341
pragma[noinline]
1342-
private DataFlowErasedType getErasedReprType() { result = getErasedNodeType(this) }
1342+
private DataFlowType getErasedReprType() { result = getErasedNodeType(this) }
13431343

13441344
/** Gets the `nil` path for this node. */
13451345
AccessPathNil getAp() { result = TNil(this.getErasedReprType()) }
@@ -1411,7 +1411,7 @@ private predicate flowFwd0(
14111411
argumentValueFlowsThrough(mid, node, _)
14121412
)
14131413
or
1414-
exists(Node mid, AccessPathNil nil, DataFlowErasedType t |
1414+
exists(Node mid, AccessPathNil nil, DataFlowType t |
14151415
flowFwd(mid, fromArg, _, nil, config) and
14161416
simpleArgumentFlowsThrough(mid, node, t, config) and
14171417
ap = TNil(t) and
@@ -2020,7 +2020,7 @@ private module FlowExploration {
20202020
}
20212021

20222022
private newtype TPartialAccessPath =
2023-
TPartialNil(DataFlowErasedType t) or
2023+
TPartialNil(DataFlowType t) or
20242024
TPartialCons(Content f, int len) { len in [1 .. 5] }
20252025

20262026
/**
@@ -2041,7 +2041,7 @@ private module FlowExploration {
20412041
this = TPartialCons(_, result)
20422042
}
20432043

2044-
DataFlowErasedType getType() {
2044+
DataFlowType getType() {
20452045
this = TPartialNil(result)
20462046
or
20472047
exists(Content head | this = TPartialCons(head, _) | result = head.getContainerType())
@@ -2052,11 +2052,11 @@ private module FlowExploration {
20522052

20532053
private class PartialAccessPathNil extends PartialAccessPath, TPartialNil {
20542054
override string toString() {
2055-
exists(DataFlowErasedType t | this = TPartialNil(t) | result = concat(": " + ppReprType(t)))
2055+
exists(DataFlowType t | this = TPartialNil(t) | result = concat(": " + ppReprType(t)))
20562056
}
20572057

20582058
override AccessPathFront getFront() {
2059-
exists(DataFlowErasedType t | this = TPartialNil(t) | result = TFrontNil(t))
2059+
exists(DataFlowType t | this = TPartialNil(t) | result = TFrontNil(t))
20602060
}
20612061
}
20622062

0 commit comments

Comments
 (0)