Swift: fix formatting

This commit is contained in:
Nora Dimitrijević
2023-04-26 16:01:57 +02:00
parent 91a151ec2a
commit 16fc42a53f
6 changed files with 8 additions and 19 deletions

View File

@@ -69,9 +69,7 @@ private predicate isPropertySetterElement(Accessor accessor, AssignExpr assign)
)
}
predicate isPropertySetterElement(
PropertySetterElement pse, Accessor accessor, AssignExpr assign
) {
predicate isPropertySetterElement(PropertySetterElement pse, Accessor accessor, AssignExpr assign) {
pse = TPropertySetterElement(accessor, assign)
}

View File

@@ -397,9 +397,7 @@ private string paramsStringPart(Function c, int i) {
* Parameter types are represented by their type erasure.
*/
cached
string paramsString(Function c) {
result = concat(int i | | paramsStringPart(c, i) order by i)
}
string paramsString(Function c) { result = concat(int i | | paramsStringPart(c, i) order by i) }
bindingset[func]
predicate matchesSignature(Function func, string signature) {

View File

@@ -58,9 +58,7 @@ DataFlowType getSyntheticGlobalType(SummaryComponent::SyntheticGlobal sg) { any(
* Holds if an external flow summary exists for `c` with input specification
* `input`, output specification `output`, kind `kind`, and provenance `provenance`.
*/
predicate summaryElement(
Function c, string input, string output, string kind, string provenance
) {
predicate summaryElement(Function c, string input, string output, string kind, string provenance) {
exists(
string namespace, string type, boolean subtypes, string name, string signature, string ext
|

View File

@@ -51,9 +51,7 @@ private class WKWebViewDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
private class WKUserContentControllerDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
WKUserContentControllerDefaultUnsafeJsEvalSink() {
any(CallExpr ce |
ce.getStaticTarget()
.(Method)
.hasQualifiedName("WKUserContentController", "addUserScript(_:)")
ce.getStaticTarget().(Method).hasQualifiedName("WKUserContentController", "addUserScript(_:)")
).getArgument(0).getExpr() = this.asExpr()
}
}
@@ -89,9 +87,9 @@ private class JSContextDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
*/
private class JSEvaluateScriptDefaultUnsafeJsEvalSink extends UnsafeJsEvalSink {
JSEvaluateScriptDefaultUnsafeJsEvalSink() {
any(CallExpr ce |
ce.getStaticTarget().(FreeFunction).hasName("JSEvaluateScript(_:_:_:_:_:_:)")
).getArgument(1).getExpr() = this.asExpr()
any(CallExpr ce | ce.getStaticTarget().(FreeFunction).hasName("JSEvaluateScript(_:_:_:_:_:_:)"))
.getArgument(1)
.getExpr() = this.asExpr()
}
}

View File

@@ -38,9 +38,7 @@ private class UIKitWebKitWebViewFetchSink extends UnsafeWebViewFetchSink {
Expr baseUrl;
UIKitWebKitWebViewFetchSink() {
exists(
Method funcDecl, CallExpr call, string className, string funcName, int arg, int baseArg
|
exists(Method funcDecl, CallExpr call, string className, string funcName, int arg, int baseArg |
// arguments to method calls...
(
// `loadHTMLString`

View File

@@ -1,6 +1,5 @@
private import codeql.swift.elements
private import codeql.swift.generated.ParentChild
// Internal classes are not imported by the tests:
import codeql.swift.elements.expr.InitializerRefCallExpr
import codeql.swift.elements.expr.DotSyntaxCallExpr