Skip to content

Commit 0391db6

Browse files
committed
simplify some code based on review
1 parent 7e93416 commit 0391db6

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

ql/ql/src/codeql_ql/ast/Ast.qll

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,9 +2226,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
22262226
or
22272227
not exists(me.getName()) and result = me.getChild().(QL::SimpleId).getValue()
22282228
or
2229-
exists(QL::ModuleInstantiation instantiation | instantiation.getParent() = me |
2230-
result = instantiation.getName().getChild().getValue()
2231-
)
2229+
result = me.getChild().(QL::ModuleInstantiation).getName().getChild().getValue()
22322230
}
22332231

22342232
/**
@@ -2263,9 +2261,7 @@ class ModuleExpr extends TModuleExpr, TypeRef {
22632261
* The result is either a `PredicateExpr` or a `TypeExpr`.
22642262
*/
22652263
SignatureExpr getArgument(int i) {
2266-
exists(QL::ModuleInstantiation instantiation | instantiation.getParent() = me |
2267-
result.toQL() = instantiation.getChild(i)
2268-
)
2264+
result.toQL() = me.getChild().(QL::ModuleInstantiation).getChild(i)
22692265
}
22702266
}
22712267

0 commit comments

Comments
 (0)