C#: Add a test that only prints 'base' flow summaries.

This commit is contained in:
Michael Nebel
2021-12-01 15:16:32 +01:00
parent e08c734c40
commit a8f673ffa4
2 changed files with 2831 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -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)
)
}
}