From 19da00a51a7be14ec8493e83c963a2faf62aaa80 Mon Sep 17 00:00:00 2001 From: Michael Nebel Date: Tue, 23 Aug 2022 14:05:33 +0200 Subject: [PATCH] C#: Delete clears content test case. --- .../dataflow/external-models/steps.expected | 3 --- .../dataflow/external-models/steps.ql | 17 ----------------- 2 files changed, 20 deletions(-) diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.expected b/csharp/ql/test/library-tests/dataflow/external-models/steps.expected index af0e9cdfe4b..f73872ed9be 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/steps.expected +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.expected @@ -19,6 +19,3 @@ summarySetterStep | Steps.cs:30:34:30:34 | 0 | Steps.cs:30:13:30:16 | [post] this access | Steps.cs:57:13:57:17 | field Field | | Steps.cs:34:37:34:37 | 0 | Steps.cs:34:13:34:16 | [post] this access | Steps.cs:63:13:63:20 | property Property | | Steps.cs:38:36:38:36 | 0 | Steps.cs:38:13:38:16 | [post] this access | file://:0:0:0:0 | element | -clearsContent -| Steps.cs:61:14:61:28 | StepFieldSetter | file://:0:0:0:0 | element | this | -| Steps.cs:67:14:67:31 | StepPropertySetter | file://:0:0:0:0 | element | this | diff --git a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql index ec271687a13..34b8fedf688 100644 --- a/csharp/ql/test/library-tests/dataflow/external-models/steps.ql +++ b/csharp/ql/test/library-tests/dataflow/external-models/steps.ql @@ -29,18 +29,6 @@ private class SummaryModelTest extends SummaryModelCsv { } } -private class SummarizedCallableClear extends SummarizedCallable { - SummarizedCallableClear() { - this.getName() = ["StepPropertySetter", "StepFieldSetter"] and - this.getFile().getBaseName() = "Steps.cs" - } - - override predicate clearsContent(ParameterPosition pos, DataFlow::ContentSet content) { - pos.isThisParameter() and - content instanceof DataFlow::ElementContent - } -} - query predicate summaryThroughStep( DataFlow::Node node1, DataFlow::Node node2, boolean preservesValue ) { @@ -62,8 +50,3 @@ query predicate summarySetterStep(DataFlow::Node arg, DataFlow::Node out, Conten FlowSummaryImpl::Private::Steps::summarySetterStep(arg, c, out, any(DataFlowDispatch::DataFlowSummarizedCallable sc)) } - -query predicate clearsContent(SummarizedCallable c, DataFlow::Content k, ParameterPosition pos) { - c.clearsContent(pos, k) and - c.fromSource() -}