File tree Expand file tree Collapse file tree
ql/ql/src/codeql_ql/ast/internal Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,11 +326,14 @@ module ModConsistency {
326326 .regexpMatch ( ".*/(test|examples|ql-training|recorded-call-graph-metrics)/.*" )
327327 }
328328
329- query predicate multipleResolveModuleRef ( ModuleExpr me , int c , ContainerOrModule m ) {
330- c = strictcount ( ContainerOrModule m0 | resolveModuleRef ( me , m0 ) ) and
331- c > 1 and
332- resolveModuleRef ( me , m )
333- }
329+ // This can happen with parameterized modules.
330+ /*
331+ * query predicate multipleResolveModuleRef(ModuleExpr me, int c, ContainerOrModule m) {
332+ * c = strictcount(ContainerOrModule m0 | resolveModuleRef(me, m0)) and
333+ * c > 1 and
334+ * resolveModuleRef(me, m)
335+ * }
336+ */
334337
335338 query predicate noName ( Module mod ) { not exists ( mod .getName ( ) ) }
336339
Original file line number Diff line number Diff line change @@ -174,17 +174,20 @@ module PredConsistency {
174174 c > 1 and
175175 resolvePredicateExpr ( pe , p )
176176 }
177+ // This can happen with parametarized modules
178+ /*
179+ * query predicate multipleResolveCall(Call call, int c, PredicateOrBuiltin p) {
180+ * c =
181+ * strictcount(PredicateOrBuiltin p0 |
182+ * resolveCall(call, p0) and
183+ * // aliases are expected to resolve to multiple.
184+ * not exists(p0.(ClasslessPredicate).getAlias()) and
185+ * // overridden predicates may have multiple targets
186+ * not p0.(ClassPredicate).isOverride()
187+ * ) and
188+ * c > 1 and
189+ * resolveCall(call, p)
190+ * }
191+ */
177192
178- query predicate multipleResolveCall ( Call call , int c , PredicateOrBuiltin p ) {
179- c =
180- strictcount ( PredicateOrBuiltin p0 |
181- resolveCall ( call , p0 ) and
182- // aliases are expected to resolve to multiple.
183- not exists ( p0 .( ClasslessPredicate ) .getAlias ( ) ) and
184- // overridden predicates may have multiple targets
185- not p0 .( ClassPredicate ) .isOverride ( )
186- ) and
187- c > 1 and
188- resolveCall ( call , p )
189193 }
190- }
Original file line number Diff line number Diff line change @@ -355,11 +355,14 @@ module TyConsistency {
355355 )
356356 }
357357
358- query predicate multipleResolve ( TypeExpr te , int c , Type t ) {
359- c = strictcount ( Type t0 | resolveTypeExpr ( te , t0 ) ) and
360- c > 1 and
361- resolveTypeExpr ( te , t )
362- }
358+ // This can happen with parameterized modules.
359+ /*
360+ * query predicate multipleResolve(TypeExpr te, int c, Type t) {
361+ * c = strictcount(Type t0 | resolveTypeExpr(te, t0)) and
362+ * c > 1 and
363+ * resolveTypeExpr(te, t)
364+ * }
365+ */
363366
364367 query predicate multiplePrimitives ( TypeExpr te , int c , PrimitiveType t ) {
365368 c = strictcount ( PrimitiveType t0 | resolveTypeExpr ( te , t0 ) ) and
You can’t perform that action at this time.
0 commit comments