Skip to content

Commit ca08097

Browse files
committed
Java/C++/C#: Fix Java Content.getType and getContainerType to match C# and fix C# tests.
1 parent a97e7bd commit ca08097

File tree

22 files changed

+250
-49
lines changed

22 files changed

+250
-49
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ private predicate parameterFlow(
531531
read(mid, f, node) and
532532
readStoreCand1(f, unbind(config)) and
533533
summary = midsum.readStep(f) and
534-
t1 = getErasedRepr(f.getType()) and
534+
t1 = f.getType() and
535535
t1 = t2
536536
)
537537
or
@@ -581,7 +581,7 @@ private predicate parameterFlowReturn(
581581
not exists(int pos | kind.(ParamUpdateReturnKind).getPosition() = pos and p.isParameterOf(_, pos))
582582
}
583583

584-
pragma[noinline]
584+
pragma[nomagic]
585585
private predicate argumentFlowsThrough0(
586586
DataFlowCall call, ArgumentNode arg, ReturnKindExt kind, DataFlowType t1, DataFlowType t2,
587587
Summary summary, Configuration config

0 commit comments

Comments
 (0)