mirror of
https://github.com/github/codeql.git
synced 2026-04-27 01:35:13 +02:00
Kotlin: Speed up the toString consistency query
Using Top.getAQlClass() means we have to evaluate SummarizedCallableExternal's charpred, and hence summaryElement, which is slow.
This commit is contained in:
@@ -20,7 +20,7 @@ string topToString(Top t) {
|
||||
}
|
||||
|
||||
string not1ToString() {
|
||||
exists(Top t | count(topToString(t)) != 1 and result = "Top which doesn't have exactly 1 toString: " + concat(t.getAQlClass(), ", "))
|
||||
exists(Top t | count(topToString(t)) != 1 and result = "Top which doesn't have exactly 1 toString: " + t.getPrimaryQlClasses())
|
||||
or
|
||||
exists(Location l | count(l.toString()) != 1 and result = "Location which doesn't have exactly 1 toString: " + concat(l.getAQlClass(), ", "))
|
||||
or
|
||||
|
||||
Reference in New Issue
Block a user