mirror of
https://github.com/github/codeql.git
synced 2025-12-23 12:16:33 +01:00
As `ASTMangler` crashes when called on `ModuleDecl`, we simply use its name. This might probably not work reliably in a scenario where multiple modules are compiled with the same name (like `main`), but this is left for future work. At the moment this cannot create DB inconsistencies.
16 lines
622 B
Plaintext
16 lines
622 B
Plaintext
// generated by codegen/codegen.py
|
|
import codeql.swift.elements
|
|
import TestUtils
|
|
|
|
from
|
|
ModuleDecl x, Type getInterfaceType, string getName, string isBuiltinModule, string isSystemModule
|
|
where
|
|
toBeTested(x) and
|
|
not x.isUnknown() and
|
|
getInterfaceType = x.getInterfaceType() and
|
|
getName = x.getName() and
|
|
(if x.isBuiltinModule() then isBuiltinModule = "yes" else isBuiltinModule = "no") and
|
|
if x.isSystemModule() then isSystemModule = "yes" else isSystemModule = "no"
|
|
select x, "getInterfaceType:", getInterfaceType, "getName:", getName, "isBuiltinModule:",
|
|
isBuiltinModule, "isSystemModule:", isSystemModule
|