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 8ef3bea0408..0b10bb2947f 100644 --- a/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll +++ b/csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } } diff --git a/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll b/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll index 8ef3bea0408..0b10bb2947f 100644 --- a/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll +++ b/go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } } 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 8ef3bea0408..0b10bb2947f 100644 --- a/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll +++ b/java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } } 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 8ef3bea0408..0b10bb2947f 100644 --- a/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll +++ b/python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } } diff --git a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll index 8ef3bea0408..0b10bb2947f 100644 --- a/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll +++ b/ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } } diff --git a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll index 8ef3bea0408..0b10bb2947f 100644 --- a/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll +++ b/swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll @@ -1001,20 +1001,6 @@ module Private { not summaryElement(this, _, _, _, false) } - private predicate relevantSummaryElementManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, false) and - not summaryElement(this, _, _, _, true) - } - - private predicate relevantSummaryElementBothGeneratedAndManual( - AccessPath inSpec, AccessPath outSpec, string kind - ) { - summaryElement(this, inSpec, outSpec, kind, true) and - summaryElement(this, inSpec, outSpec, kind, false) - } - private predicate relevantSummaryElement(AccessPath inSpec, AccessPath outSpec, string kind) { summaryElement(this, inSpec, outSpec, kind, false) or @@ -1037,10 +1023,14 @@ module Private { override predicate isAutoGenerated() { this.relevantSummaryElementGenerated(_, _, _) } - override predicate isManuallyGenerated() { this.relevantSummaryElementManual(_, _, _) } + override predicate isManuallyGenerated() { + summaryElement(this, _, _, _, false) and + not summaryElement(this, _, _, _, true) + } override predicate isBothAutoAndManuallyGenerated() { - this.relevantSummaryElementBothGeneratedAndManual(_, _, _) + summaryElement(this, _, _, _, true) and + summaryElement(this, _, _, _, false) } }