From b33f5925bb3842fc89b177b07474a84b26c36015 Mon Sep 17 00:00:00 2001 From: Tom Hvitved Date: Tue, 29 Nov 2022 10:00:15 +0100 Subject: [PATCH] Data flow: Sync files --- .../semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll | 3 ++- go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll | 3 ++- .../lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll | 3 ++- .../semmle/python/dataflow/new/internal/FlowSummaryImpl.qll | 3 ++- .../ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll | 3 ++- 5 files changed, 10 insertions(+), 5 deletions(-) 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 4d41254e5e9..6d61d1b4799 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll @@ -520,7 +520,8 @@ module Private { predicate summaryParameterNodeRange(SummarizedCallable c, ParameterPosition pos) { parameterReadState(c, _, pos) or - isParameterPostUpdate(_, c, pos) + // Same as `isParameterPostUpdate(_, c, pos)`, but can be used in a negative context + any(SummaryNodeState state).isOutputState(c, SummaryComponentStack::argument(pos)) } private predicate callbackOutput( diff --git a/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll b/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll index 4d41254e5e9..6d61d1b4799 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll @@ -520,7 +520,8 @@ module Private { predicate summaryParameterNodeRange(SummarizedCallable c, ParameterPosition pos) { parameterReadState(c, _, pos) or - isParameterPostUpdate(_, c, pos) + // Same as `isParameterPostUpdate(_, c, pos)`, but can be used in a negative context + any(SummaryNodeState state).isOutputState(c, SummaryComponentStack::argument(pos)) } private predicate callbackOutput( 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 4d41254e5e9..6d61d1b4799 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll @@ -520,7 +520,8 @@ module Private { predicate summaryParameterNodeRange(SummarizedCallable c, ParameterPosition pos) { parameterReadState(c, _, pos) or - isParameterPostUpdate(_, c, pos) + // Same as `isParameterPostUpdate(_, c, pos)`, but can be used in a negative context + any(SummaryNodeState state).isOutputState(c, SummaryComponentStack::argument(pos)) } private predicate callbackOutput( diff --git a/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll b/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll index 4d41254e5e9..6d61d1b4799 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll @@ -520,7 +520,8 @@ module Private { predicate summaryParameterNodeRange(SummarizedCallable c, ParameterPosition pos) { parameterReadState(c, _, pos) or - isParameterPostUpdate(_, c, pos) + // Same as `isParameterPostUpdate(_, c, pos)`, but can be used in a negative context + any(SummaryNodeState state).isOutputState(c, SummaryComponentStack::argument(pos)) } private predicate callbackOutput( diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll index 4d41254e5e9..6d61d1b4799 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll @@ -520,7 +520,8 @@ module Private { predicate summaryParameterNodeRange(SummarizedCallable c, ParameterPosition pos) { parameterReadState(c, _, pos) or - isParameterPostUpdate(_, c, pos) + // Same as `isParameterPostUpdate(_, c, pos)`, but can be used in a negative context + any(SummaryNodeState state).isOutputState(c, SummaryComponentStack::argument(pos)) } private predicate callbackOutput(