mirror of
https://github.com/github/codeql.git
synced 2026-04-28 10:15:14 +02:00
Rename MkHasUnderlyingType to MkTypeUse.
This commit is contained in:
committed by
Erik Krogh Kristensen
parent
91d28fb8b0
commit
cd57e61f65
@@ -313,7 +313,7 @@ module API {
|
||||
module Node {
|
||||
/** Gets a node whose type has the given qualified name. */
|
||||
Node ofType(string moduleName, string exportedName) {
|
||||
result = Impl::MkHasUnderlyingType(moduleName, exportedName).(Node).getInstance()
|
||||
result = Impl::MkTypeUse(moduleName, exportedName).(Node).getInstance()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -388,11 +388,8 @@ module API {
|
||||
} or
|
||||
MkDef(DataFlow::Node nd) { rhs(_, _, nd) } or
|
||||
MkUse(DataFlow::Node nd) { use(_, _, nd) } or
|
||||
/**
|
||||
* A TypeScript type, identified by name of the type-annotation.
|
||||
* This API node is exclusively used by `API::Node::ofType`.
|
||||
*/
|
||||
MkHasUnderlyingType(string moduleName, string exportName) {
|
||||
/** A use of a TypeScript type. */
|
||||
MkTypeUse(string moduleName, string exportName) {
|
||||
any(TypeAnnotation n).hasQualifiedName(moduleName, exportName)
|
||||
or
|
||||
any(Type t).hasUnderlyingType(moduleName, exportName)
|
||||
@@ -406,7 +403,7 @@ module API {
|
||||
class TNonModuleDef =
|
||||
MkModuleExport or MkClassInstance or MkAsyncFuncResult or MkDef or MkSyntheticCallbackArg;
|
||||
|
||||
class TUse = MkModuleUse or MkModuleImport or MkUse or MkHasUnderlyingType;
|
||||
class TUse = MkModuleUse or MkModuleImport or MkUse or MkTypeUse;
|
||||
|
||||
private predicate hasSemantics(DataFlow::Node nd) { not nd.getTopLevel().isExterns() }
|
||||
|
||||
@@ -584,7 +581,7 @@ module API {
|
||||
)
|
||||
or
|
||||
exists(string moduleName, string exportName |
|
||||
base = MkHasUnderlyingType(moduleName, exportName) and
|
||||
base = MkTypeUse(moduleName, exportName) and
|
||||
lbl = Label::instance() and
|
||||
ref.(DataFlow::SourceNode).hasUnderlyingType(moduleName, exportName)
|
||||
)
|
||||
@@ -823,7 +820,7 @@ module API {
|
||||
exists(string moduleName, string exportName |
|
||||
pred = MkModuleImport(moduleName) and
|
||||
lbl = Label::member(exportName) and
|
||||
succ = MkHasUnderlyingType(moduleName, exportName)
|
||||
succ = MkTypeUse(moduleName, exportName)
|
||||
)
|
||||
or
|
||||
exists(DataFlow::Node nd, DataFlow::FunctionNode f |
|
||||
|
||||
Reference in New Issue
Block a user