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
2020| Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:63:13:63:20 | property Property |
2121| Steps.cs:38:36:38:36 | 0 | Steps.cs:38:13:38:16 | [post] this access | file://:0:0:0:0 | element |
2222clearsContent
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
55import semmle.code.csharp.dataflow.internal.FlowSummaryImpl as FlowSummaryImpl
66import CsvValidation
77
8- class SummaryModelTest extends SummaryModelCsv {
8+ private class SummaryModelTest extends SummaryModelCsv {
99 override predicate row ( string row ) {
1010 row =
1111 [
@@ -28,6 +28,18 @@ class SummaryModelTest extends SummaryModelCsv {
2828 }
2929}
3030
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+
3143query predicate summaryThroughStep (
3244 DataFlow:: Node node1 , DataFlow:: Node node2 , boolean preservesValue
3345) {
You can’t perform that action at this time.
0 commit comments