Skip to content

Commit e4319db

Browse files
committed
C#: Filter out unwanted summaries at the root.
1 parent 84e412f commit e4319db

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

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

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,13 @@ private predicate interpretNeutral(UnboundCallable c, string kind, string proven
554554

555555
// adapter class for converting Mad summaries to `SummarizedCallable`s
556556
private class SummarizedCallableAdapter extends SummarizedCallable {
557-
SummarizedCallableAdapter() { interpretSummary(this, _, _, _, _, _) }
557+
SummarizedCallableAdapter() {
558+
exists(Provenance provenance | interpretSummary(this, _, _, _, provenance, _) |
559+
not this.hasBody()
560+
or
561+
this.hasBody() and provenance.isManual()
562+
)
563+
}
558564

559565
private predicate relevantSummaryElementManual(
560566
string input, string output, string kind, string model

0 commit comments

Comments
 (0)