зеркало из https://github.com/github/codeql.git
Expose whether functions are variadic in their pp() output
This commit is contained in:
Родитель
4dbb15ddda
Коммит
4d3a140dd7
|
@ -921,9 +921,12 @@ class SignatureType extends @signaturetype, CompositeType {
|
||||||
|
|
||||||
language[monotonicAggregates]
|
language[monotonicAggregates]
|
||||||
override string pp() {
|
override string pp() {
|
||||||
result =
|
exists(string suffix | (if this.isVariadic() then suffix = "[variadic]" else suffix = "") |
|
||||||
"func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) +
|
result =
|
||||||
") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i)
|
"func(" + concat(int i, Type tp | tp = this.getParameterType(i) | tp.pp(), ", " order by i) +
|
||||||
|
") " + concat(int i, Type tp | tp = this.getResultType(i) | tp.pp(), ", " order by i) +
|
||||||
|
" " + suffix
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override string toString() { result = "signature type" }
|
override string toString() { result = "signature type" }
|
||||||
|
|
Загрузка…
Ссылка в новой задаче