File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
csharp/ql/test/library-tests/dataflow/external-models Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -20,5 +20,5 @@ summarySetterStep
20
20
| Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:63:13:63:20 | property Property |
21
21
| Steps.cs:38:36:38:36 | 0 | Steps.cs:38:13:38:16 | [post] this access | file://:0:0:0:0 | element |
22
22
clearsContent
23
- | Steps.cs:61:14:61:28 | StepFieldSetter | Steps.cs:57:13:57:17 | field Field | this |
24
- | Steps.cs:67:14:67:31 | StepPropertySetter | Steps.cs:63:13:63:20 | property Property | this |
23
+ | Steps.cs:61:14:61:28 | StepFieldSetter | file://:0:0:0:0 | element | this |
24
+ | Steps.cs:67:14:67:31 | StepPropertySetter | file://:0:0:0:0 | element | this |
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ import semmle.code.csharp.dataflow.FlowSummary
5
5
import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
6
6
import CsvValidation
7
7
8
- class SummaryModelTest extends SummaryModelCsv {
8
+ private class SummaryModelTest extends SummaryModelCsv {
9
9
override predicate row ( string row ) {
10
10
row =
11
11
[
@@ -28,6 +28,18 @@ class SummaryModelTest extends SummaryModelCsv {
28
28
}
29
29
}
30
30
31
+ private class SummarizedCallableClear extends SummarizedCallable {
32
+ SummarizedCallableClear ( ) {
33
+ this .getName ( ) = [ "StepPropertySetter" , "StepFieldSetter" ] and
34
+ this .getFile ( ) .getBaseName ( ) = "Steps.cs"
35
+ }
36
+
37
+ override predicate clearsContent ( ParameterPosition pos , DataFlow:: ContentSet content ) {
38
+ pos .isThisParameter ( ) and
39
+ content instanceof DataFlow:: ElementContent
40
+ }
41
+ }
42
+
31
43
query predicate summaryThroughStep (
32
44
DataFlow:: Node node1 , DataFlow:: Node node2 , boolean preservesValue
33
45
) {
You can’t perform that action at this time.
0 commit comments