Skip to content

Commit 48170f5

Browse files
authored
change multipleResolveCall to ignore aliases
1 parent bd86ffb commit 48170f5

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

ql/src/codeql_ql/ast/internal/Predicate.qll

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,12 @@ module PredConsistency {
251251
}
252252

253253
query predicate multipleResolveCall(Call call, int c, PredicateOrBuiltin p) {
254-
c = strictcount(PredicateOrBuiltin p0 | resolveCall(call, p0)) and
254+
c =
255+
strictcount(PredicateOrBuiltin p0 |
256+
resolveCall(call, p0) and
257+
// aliases are expected to resolve to multiple.
258+
not exists(p0.getDeclaration().(ClasslessPredicate).getAlias())
259+
) and
255260
c > 1 and
256261
resolveCall(call, p)
257262
}

0 commit comments

Comments
 (0)