Java/Ruby: Sync files.

This commit is contained in:
Michael Nebel
2022-05-05 13:08:55 +02:00
parent a8556f4d50
commit 2dc35c123a
2 changed files with 30 additions and 4 deletions

View File

@@ -219,6 +219,11 @@ module Public {
*/
pragma[nomagic]
predicate clearsContent(ParameterPosition pos, ContentSet content) { none() }
/**
* Gets whether the summary is auto generated or not.
*/
boolean isAutoGenerated() { result = false }
}
}
@@ -898,6 +903,8 @@ module Private {
kind = "taint" and preservesValue = false
)
}
override boolean isAutoGenerated() { summaryElement(this, _, _, _, result) }
}
/** Holds if component `c` of specification `spec` cannot be parsed. */
@@ -1052,9 +1059,15 @@ module Private {
preservesValue = false and result = "taint"
}
private string renderGenerated(boolean generated) {
generated = true and result = "generated:"
or
generated = false and result = ""
}
/**
* A query predicate for outputting flow summaries in semi-colon separated format in QL tests.
* The syntax is: "namespace;type;overrides;name;signature;ext;inputspec;outputspec;kind",
* The syntax is: "namespace;type;overrides;name;signature;ext;inputspec;outputspec;(generated:)?kind",
* ext is hardcoded to empty.
*/
query predicate summary(string csv) {
@@ -1065,7 +1078,7 @@ module Private {
c.relevantSummary(input, output, preservesValue) and
csv =
c.getCallableCsv() + getComponentStackCsv(input) + ";" + getComponentStackCsv(output) +
";" + renderKind(preservesValue)
";" + renderGenerated(c.isAutoGenerated()) + renderKind(preservesValue)
)
}
}