mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
C#: Add a test that only prints 'base' flow summaries.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,21 @@
|
||||
import shared.FlowSummaries
|
||||
|
||||
class IncludeFilteredSummarizedCallable extends IncludeSummarizedCallable {
|
||||
IncludeFilteredSummarizedCallable() { this instanceof SummarizedCallable }
|
||||
|
||||
/**
|
||||
* Holds if flow is propagated between `input` and `output` and
|
||||
* if there is no summary for a callable in a `base` class or interface
|
||||
* that propagates the same flow between `input` and `output`.
|
||||
*/
|
||||
override predicate relevantSummary(
|
||||
SummaryComponentStack input, SummaryComponentStack output, boolean preservesValue
|
||||
) {
|
||||
this.propagatesFlow(input, output, preservesValue) and
|
||||
not exists(IncludeSummarizedCallable rsc |
|
||||
rsc.isAbstractOrInterface() and
|
||||
this.(Virtualizable).overridesOrImplementsOrEquals(rsc) and
|
||||
rsc.propagatesFlow(input, output, preservesValue)
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user