diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll index 1c3f216edf2..08a9a8a5421 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/FlowSummary.qll @@ -139,28 +139,6 @@ private class RecordConstructorFlow extends SummarizedCallable { } } -private class SummarizedCallableDefaultClearsContent extends Impl::Public::SummarizedCallable { - SummarizedCallableDefaultClearsContent() { - this instanceof Impl::Public::SummarizedCallable or none() - } - - // By default, we assume that all stores into arguments are definite - override predicate clearsContent(ParameterPosition pos, DataFlow::ContentSet content) { - exists(SummaryComponentStack output, SummaryComponent target | - this.propagatesFlow(_, output, _) and - output.drop(_) = - SummaryComponentStack::push(SummaryComponent::content(content), - SummaryComponentStack::singleton(target)) and - not content instanceof DataFlow::ElementContent - | - target = SummaryComponent::argument(pos.getPosition()) - or - target = SummaryComponent::qualifier() and - pos.isThisParameter() - ) - } -} - class RequiredSummaryComponentStack = Impl::Public::RequiredSummaryComponentStack; private class RecordConstructorFlowRequiredSummaryComponentStack extends RequiredSummaryComponentStack { diff --git a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll index 17d4628a83c..fbc10ca1d50 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll @@ -933,7 +933,8 @@ module Private { summaryElement(this, inSpec, outSpec, kind, false) or summaryElement(this, inSpec, outSpec, kind, true) and - not summaryElement(this, _, _, _, false) + not summaryElement(this, _, _, _, false) and + not this.clearsContent(_, _) } override predicate propagatesFlow( diff --git a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll index 17d4628a83c..fbc10ca1d50 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll @@ -933,7 +933,8 @@ module Private { summaryElement(this, inSpec, outSpec, kind, false) or summaryElement(this, inSpec, outSpec, kind, true) and - not summaryElement(this, _, _, _, false) + not summaryElement(this, _, _, _, false) and + not this.clearsContent(_, _) } override predicate propagatesFlow( diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll index 17d4628a83c..fbc10ca1d50 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll @@ -933,7 +933,8 @@ module Private { summaryElement(this, inSpec, outSpec, kind, false) or summaryElement(this, inSpec, outSpec, kind, true) and - not summaryElement(this, _, _, _, false) + not summaryElement(this, _, _, _, false) and + not this.clearsContent(_, _) } override predicate propagatesFlow(