Skip to content

Commit 0b2f2a3

Browse files
Jami CogswellJami Cogswell
authored andcommitted
Java: remove predicates from NegativeSummarizedCallable
1 parent 2c3adb7 commit 0b2f2a3

File tree

6 files changed

+12
-126
lines changed

6 files changed

+12
-126
lines changed

csharp/ql/lib/semmle/code/csharp/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

go/ql/lib/semmle/go/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

java/ql/lib/semmle/code/java/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

python/ql/lib/semmle/python/dataflow/new/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

ruby/ql/lib/codeql/ruby/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

swift/ql/lib/codeql/swift/dataflow/internal/FlowSummaryImpl.qll

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -261,28 +261,9 @@ module Public {
261261
NegativeSummarizedCallable() { negativeSummaryElement(this, _) }
262262

263263
/**
264-
* Holds if the negative summary is auto generated and not manually generated.
264+
* Holds if the negative summary is auto generated.
265265
*/
266-
predicate isAutoGenerated() {
267-
negativeSummaryElement(this, true) and
268-
not negativeSummaryElement(this, false)
269-
} // ! okay to adjust this to "and not manually generated"? Will that mess up anything that currently uses this?
270-
271-
/**
272-
* Holds if the summary is manually generated and not auto generated.
273-
*/
274-
predicate isManuallyGenerated() {
275-
negativeSummaryElement(this, false) and
276-
not negativeSummaryElement(this, true)
277-
}
278-
279-
/**
280-
* Holds if the summary is both auto generated and manually generated.
281-
*/
282-
predicate isBothAutoAndManuallyGenerated() {
283-
negativeSummaryElement(this, true) and
284-
negativeSummaryElement(this, false)
285-
}
266+
predicate isAutoGenerated() { negativeSummaryElement(this, true) }
286267
}
287268
}
288269

0 commit comments

Comments
 (0)