mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
comments about what we resolve, and remove a debug comment
This commit is contained in:
@@ -114,7 +114,6 @@ class Module_ extends FileOrModule, TModule {
|
||||
}
|
||||
}
|
||||
|
||||
// class ModuleRef = AstNodes::TModuleExpr or AstNodes::TType;
|
||||
private predicate resolveQualifiedName(Import imp, ContainerOrModule m, int i) {
|
||||
not m = TFile(any(File f | f.getExtension() = "ql")) and
|
||||
exists(string q | q = imp.getQualifiedName(i) |
|
||||
@@ -264,8 +263,10 @@ private predicate definesModule(
|
||||
public = false and
|
||||
ty = sig.asModuleRef()
|
||||
|
|
||||
// resolve to the signature module
|
||||
m = ty.getResolvedModule()
|
||||
or
|
||||
// resolve to the arguments of the instantiated module
|
||||
exists(ModuleExpr inst | inst.getResolvedModule().asModule() = mod |
|
||||
m = inst.getArgument(i).asModuleRef().getResolvedModule()
|
||||
)
|
||||
|
||||
@@ -74,8 +74,10 @@ private module Cached {
|
||||
mod.hasParameter(i, pc.getPredicateName(), sig) and
|
||||
sig.getArity() = pc.getNumberOfArguments()
|
||||
|
|
||||
// resolve to the signature predicate
|
||||
p = sig.getResolvedPredicate() // <- this is a `signature predicate`, but that's fine.
|
||||
or
|
||||
// resolve to the instantiations
|
||||
exists(ModuleExpr inst, SignatureExpr arg | inst.getResolvedModule().asModule() = mod |
|
||||
arg = inst.getArgument(i) and
|
||||
p = arg.asPredicate().getResolvedPredicate()
|
||||
|
||||
@@ -330,10 +330,10 @@ private predicate defines(FileOrModule m, string name, Type t, boolean public) {
|
||||
mod.hasParameter(i, name, param) and
|
||||
public = true
|
||||
|
|
||||
// we resolve it both to the signature type
|
||||
// resolve to the signature class
|
||||
t = param.asType().getResolvedType()
|
||||
or
|
||||
// or any instantiated type
|
||||
// resolve to the instantiations
|
||||
exists(ModuleExpr inst, SignatureExpr arg |
|
||||
inst.getArgument(i) = arg and
|
||||
inst.getResolvedModule() = m and
|
||||
|
||||
Reference in New Issue
Block a user