Swift: generalize synth constructors

Now all types get a default synth constructor.
This commit is contained in:
Paolo Tranquilli
2022-08-15 16:12:19 +02:00
parent 8ba330a886
commit 1365d0911d
241 changed files with 1548 additions and 274 deletions

View File

@@ -96,11 +96,16 @@ def get_ql_ipa_class(cls: schema.Class):
if cls.ipa and cls.ipa.from_class is not None:
source = cls.ipa.from_class
_final_db_class_lookup.setdefault(source, ql.Synth.FinalClassDb(source)).subtract_type(cls.name)
return ql.Synth.FinalClassDerivedIpa(name=cls.name, params=[ql.Synth.Param("id", _to_db_type(source))])
return ql.Synth.FinalClassDerivedIpa(name=cls.name,
params=[ql.Synth.Param("id", _to_db_type(source))])
if cls.ipa and cls.ipa.on_arguments is not None:
return ql.Synth.FinalClassFreshIpa(name=cls.name, params=[ql.Synth.Param(k, _to_db_type(v)) for k, v in
cls.ipa.on_arguments.items()])
return _final_db_class_lookup.setdefault(cls.name, ql.Synth.FinalClassDb(cls.name))
return ql.Synth.FinalClassFreshIpa(name=cls.name,
params=[ql.Synth.Param(k, _to_db_type(v))
for k, v in cls.ipa.on_arguments.items()])
ret = ql.Synth.FinalClassDb(name=cls.name,
params=[ql.Synth.Param("id", _to_db_type(cls.name))])
_final_db_class_lookup[cls.name] = ret
return ret
def get_import(file: pathlib.Path, swift_dir: pathlib.Path):
@@ -119,14 +124,10 @@ def get_classes_used_by(cls: ql.Class):
return sorted(set(t for t in get_types_used_by(cls) if t[0].isupper()))
_generated_stub_re = re.compile(r"\n*private import .*\n+("
r"class \w+ extends \w+ \{[ \n]?\}"
"|"
r"predicate construct\w+\(.*?\) \{ none\(\) \}"
")", re.MULTILINE)
_generated_stub_re = re.compile(r"\n*private import .*\n+class \w+ extends \w+ \{[ \n]?\}", re.MULTILINE)
def _is_generated_stub(file):
def _is_generated_stub(file: pathlib.Path) -> bool:
with open(file) as contents:
for line in contents:
if not line.startswith("// generated"):
@@ -135,12 +136,14 @@ def _is_generated_stub(file):
else:
# no lines
return False
# one line already read, if we can read 5 other we are past the normal stub generation
line_threshold = 5
first_lines = list(itertools.islice(contents, line_threshold))
if len(first_lines) == line_threshold or not _generated_stub_re.match("".join(first_lines)):
raise ModifiedStubMarkedAsGeneratedError(
f"{file.name} stub was modified but is still marked as generated")
# we still do not detect modified synth constructors
if not file.name.endswith("Constructor.qll"):
# one line already read, if we can read 5 other we are past the normal stub generation
line_threshold = 5
first_lines = list(itertools.islice(contents, line_threshold))
if len(first_lines) == line_threshold or not _generated_stub_re.match("".join(first_lines)):
raise ModifiedStubMarkedAsGeneratedError(
f"{file.name} stub was modified but is still marked as generated")
return True
@@ -268,20 +271,24 @@ def generate(opts, renderer):
final_ipa_types = []
non_final_ipa_types = []
constructor_imports = []
ipa_constructor_imports = []
for cls in sorted(data.classes.values(), key=lambda cls: (cls.dir, cls.name)):
ipa_type = get_ql_ipa_class(cls)
if ipa_type.is_final:
final_ipa_types.append(ipa_type)
if ipa_type.is_ipa and ipa_type.has_params:
stub_file = stub_out / cls.dir / f"{cls.name}Constructor.qll"
if not stub_file.is_file() or _is_generated_stub(stub_file):
renderer.render(ql.Synth.ConstructorStub(ipa_type), stub_file)
constructor_imports.append(get_import(stub_file, opts.swift_dir))
stub_file = stub_out / cls.dir / f"{cls.name}Constructor.qll"
if not stub_file.is_file() or _is_generated_stub(stub_file):
renderer.render(ql.Synth.ConstructorStub(ipa_type), stub_file)
constructor_import = get_import(stub_file, opts.swift_dir)
constructor_imports.append(constructor_import)
if ipa_type.is_ipa:
ipa_constructor_imports.append(constructor_import)
else:
non_final_ipa_types.append(ipa_type)
renderer.render(ql.Synth.Types(schema.root_class_name, final_ipa_types, non_final_ipa_types), out / "Synth.qll")
renderer.render(ql.ImportList(constructor_imports), out / "SynthConstructors.qll")
renderer.render(ql.ImportList(ipa_constructor_imports), out / "PureSynthConstructors.qll")
renderer.cleanup(existing)
if opts.ql_format:

View File

@@ -166,17 +166,6 @@ class Synth:
name: str
first: bool = False
@dataclass
class FinalClass(Class):
is_final: ClassVar = True
is_derived_ipa: ClassVar = False
is_fresh_ipa: ClassVar = False
is_db: ClassVar = False
@property
def is_ipa(self):
return self.is_fresh_ipa or self.is_derived_ipa
@dataclass
class Param:
param: str
@@ -184,17 +173,30 @@ class Synth:
first: bool = False
@dataclass
class FinalClassIpa(FinalClass):
class FinalClass(Class):
is_final: ClassVar = True
is_derived_ipa: ClassVar = False
is_fresh_ipa: ClassVar = False
is_db: ClassVar = False
params: List["Synth.Param"] = field(default_factory=list)
def __post_init__(self):
if self.params:
self.params[0].first = True
@property
def is_ipa(self):
return self.is_fresh_ipa or self.is_derived_ipa
@property
def has_params(self) -> bool:
return bool(self.params)
@dataclass
class FinalClassIpa(FinalClass):
pass
@dataclass
class FinalClassDerivedIpa(FinalClassIpa):
is_derived_ipa: ClassVar = True
@@ -246,4 +248,4 @@ class Synth:
class ConstructorStub:
template: ClassVar = "ql_ipa_constructor_stub"
cls: Union["Synth.FinalClassDerivedIpa", "Synth.FinalClassFreshIpa"]
cls: "Synth.FinalClass"

View File

@@ -1,4 +1,19 @@
// generated by {{generator}}, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
{{#cls}}
{{#is_db}}
{{#has_subtracted_ipa_types}}
private import codeql.swift.PureSynthConstructors
{{/has_subtracted_ipa_types}}
{{/is_db}}
predicate construct{{cls.name}}({{#cls.params}}{{^first}}, {{/first}}{{type}} {{param}}{{/cls.params}}) { none() }
predicate construct{{name}}({{#params}}{{^first}}, {{/first}}{{type}} {{param}}{{/params}}) {
{{#is_db}}
{{#subtracted_ipa_types}}{{^first}} and {{/first}}not construct{{name}}(id){{/subtracted_ipa_types}}
{{^subtracted_ipa_types}}any(){{/subtracted_ipa_types}}
{{/is_db}}
{{^is_db}}
none()
{{/is_db}}
}
{{/cls}}

View File

@@ -7,12 +7,7 @@ cached module Synth {
{{^first}}
or
{{/first}}
{{#is_ipa}}
T{{name}}({{#params}}{{^first}}, {{/first}}{{type}} {{param}}{{/params}}){{#has_params}} { construct{{name}}({{#params}}{{^first}}, {{/first}}{{param}}{{/params}}) }{{/has_params}}
{{/is_ipa}}
{{#is_db}}
T{{name}}(Raw::{{name}} id){{#has_subtracted_ipa_types}} { {{#subtracted_ipa_types}}{{^first}} and {{/first}}not construct{{name}}(id){{/subtracted_ipa_types}} }{{/has_subtracted_ipa_types}}
{{/is_db}}
{{/final_classes}}
{{#non_final_classes}}

View File

@@ -101,8 +101,9 @@ def _filter_generated_classes(ret, output_test_files=False):
str(f): ret[ql_test_output_path() / f]
for f in test_files
}
base_files -= {pathlib.Path(f"{name}.qll") for name in ("Raw", "Synth", "SynthConstructors")}
assert stub_files == base_files
base_files -= {pathlib.Path(f"{name}.qll") for name in
("Raw", "Synth", "SynthConstructors", "PureSynthConstructors")}
assert base_files <= stub_files
return {
str(f): (ret[stub_path() / f], ret[ql_output_path() / f])
for f in base_files
@@ -131,6 +132,7 @@ def test_empty(generate):
children_file(): ql.GetParentImplementation(),
ql_output_path() / "Synth.qll": ql.Synth.Types(schema.root_class_name),
ql_output_path() / "SynthConstructors.qll": ql.ImportList(),
ql_output_path() / "PureSynthConstructors.qll": ql.ImportList(),
ql_output_path() / "Raw.qll": ql.DbClasses(),
ql_output_path() / "Raw.qll": ql.DbClasses(),
}

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructComment(Raw::Comment id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDbFile(Raw::DbFile id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDbLocation(Raw::DbLocation id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructUnknownFile() { none() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructUnknownLocation() { none() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAccessorDecl(Raw::AccessorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAssociatedTypeDecl(Raw::AssociatedTypeDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructClassDecl(Raw::ClassDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConcreteFuncDecl(Raw::ConcreteFuncDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConcreteVarDecl(Raw::ConcreteVarDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConstructorDecl(Raw::ConstructorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDestructorDecl(Raw::DestructorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructEnumCaseDecl(Raw::EnumCaseDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructEnumDecl(Raw::EnumDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructEnumElementDecl(Raw::EnumElementDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructExtensionDecl(Raw::ExtensionDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructGenericTypeParamDecl(Raw::GenericTypeParamDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructIfConfigClause(Raw::IfConfigClause id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructIfConfigDecl(Raw::IfConfigDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructImportDecl(Raw::ImportDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructInfixOperatorDecl(Raw::InfixOperatorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructMissingMemberDecl(Raw::MissingMemberDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructModuleDecl(Raw::ModuleDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructOpaqueTypeDecl(Raw::OpaqueTypeDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructParamDecl(Raw::ParamDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructPatternBindingDecl(Raw::PatternBindingDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructPostfixOperatorDecl(Raw::PostfixOperatorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructPoundDiagnosticDecl(Raw::PoundDiagnosticDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructPrecedenceGroupDecl(Raw::PrecedenceGroupDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructPrefixOperatorDecl(Raw::PrefixOperatorDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructProtocolDecl(Raw::ProtocolDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructStructDecl(Raw::StructDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructSubscriptDecl(Raw::SubscriptDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructTopLevelCodeDecl(Raw::TopLevelCodeDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructTypeAliasDecl(Raw::TypeAliasDecl id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAnyHashableErasureExpr(Raw::AnyHashableErasureExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAppliedPropertyWrapperExpr(Raw::AppliedPropertyWrapperExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructArchetypeToSuperExpr(Raw::ArchetypeToSuperExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructArgument(Raw::Argument id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructArrayExpr(Raw::ArrayExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructArrayToPointerExpr(Raw::ArrayToPointerExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructArrowExpr(Raw::ArrowExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAssignExpr(Raw::AssignExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAutoClosureExpr(Raw::AutoClosureExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructAwaitExpr(Raw::AwaitExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructBinaryExpr(Raw::BinaryExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructBindOptionalExpr(Raw::BindOptionalExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructBooleanLiteralExpr(Raw::BooleanLiteralExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructBridgeFromObjCExpr(Raw::BridgeFromObjCExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructBridgeToObjCExpr(Raw::BridgeToObjCExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCallExpr(Raw::CallExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCaptureListExpr(Raw::CaptureListExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructClassMetatypeToObjectExpr(Raw::ClassMetatypeToObjectExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructClosureExpr(Raw::ClosureExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCodeCompletionExpr(Raw::CodeCompletionExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCoerceExpr(Raw::CoerceExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCollectionUpcastConversionExpr(Raw::CollectionUpcastConversionExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConditionalBridgeFromObjCExpr(Raw::ConditionalBridgeFromObjCExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConditionalCheckedCastExpr(Raw::ConditionalCheckedCastExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructConstructorRefCallExpr(Raw::ConstructorRefCallExpr id) { any() }

View File

@@ -0,0 +1,6 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCovariantFunctionConversionExpr(Raw::CovariantFunctionConversionExpr id) {
any()
}

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructCovariantReturnConversionExpr(Raw::CovariantReturnConversionExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDeclRefExpr(Raw::DeclRefExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDefaultArgumentExpr(Raw::DefaultArgumentExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDerivedToBaseExpr(Raw::DerivedToBaseExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDestructureTupleExpr(Raw::DestructureTupleExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDictionaryExpr(Raw::DictionaryExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDifferentiableFunctionExpr(Raw::DifferentiableFunctionExpr id) { any() }

View File

@@ -0,0 +1,8 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDifferentiableFunctionExtractOriginalExpr(
Raw::DifferentiableFunctionExtractOriginalExpr id
) {
any()
}

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDiscardAssignmentExpr(Raw::DiscardAssignmentExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDotSelfExpr(Raw::DotSelfExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDotSyntaxBaseIgnoredExpr(Raw::DotSyntaxBaseIgnoredExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDotSyntaxCallExpr(Raw::DotSyntaxCallExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDynamicMemberRefExpr(Raw::DynamicMemberRefExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDynamicSubscriptExpr(Raw::DynamicSubscriptExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructDynamicTypeExpr(Raw::DynamicTypeExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructEditorPlaceholderExpr(Raw::EditorPlaceholderExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructEnumIsCaseExpr(Raw::EnumIsCaseExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructErasureExpr(Raw::ErasureExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructErrorExpr(Raw::ErrorExpr id) { any() }

View File

@@ -0,0 +1,6 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructExistentialMetatypeToObjectExpr(Raw::ExistentialMetatypeToObjectExpr id) {
any()
}

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructFloatLiteralExpr(Raw::FloatLiteralExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructForceTryExpr(Raw::ForceTryExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructForceValueExpr(Raw::ForceValueExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructForcedCheckedCastExpr(Raw::ForcedCheckedCastExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructForeignObjectConversionExpr(Raw::ForeignObjectConversionExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructFunctionConversionExpr(Raw::FunctionConversionExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructIfExpr(Raw::IfExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructInOutExpr(Raw::InOutExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructInOutToPointerExpr(Raw::InOutToPointerExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructInjectIntoOptionalExpr(Raw::InjectIntoOptionalExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructIntegerLiteralExpr(Raw::IntegerLiteralExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructInterpolatedStringLiteralExpr(Raw::InterpolatedStringLiteralExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructIsExpr(Raw::IsExpr id) { any() }

View File

@@ -0,0 +1,4 @@
// generated by codegen/codegen.py, remove this comment if you wish to edit this file
private import codeql.swift.generated.Raw
predicate constructKeyPathApplicationExpr(Raw::KeyPathApplicationExpr id) { any() }

Some files were not shown because too many files have changed in this diff Show More