Files
codeql/swift/ql/test/extractor-tests/generated/decl/ModuleDecl/ModuleDecl.ql
Paolo Tranquilli 3a975174c3 Swift: extract ImportDecl and ModuleDecl
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.
2022-07-01 15:29:30 +02:00

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