mirror of
https://github.com/github/codeql.git
synced 2025-12-24 04:36:35 +01:00
Swift: fix formatting
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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
|
||||
|
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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`
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user