Skip to content

Commit ef31aec

Browse files
committed
Swift: Autoformat.
1 parent 425d66e commit ef31aec

File tree

3 files changed

+11
-19
lines changed

3 files changed

+11
-19
lines changed

swift/ql/lib/codeql/swift/dataflow/Ssa.qll

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,8 @@ module Ssa {
7373
}
7474
}
7575

76-
cached class PhiDefinition extends Definition, SsaImplCommon::PhiNode {
76+
cached
77+
class PhiDefinition extends Definition, SsaImplCommon::PhiNode {
7778
cached
7879
override Location getLocation() {
7980
exists(BasicBlock bb, int i |
@@ -82,12 +83,10 @@ module Ssa {
8283
)
8384
}
8485

85-
cached Definition getPhiInput(BasicBlock bb) {
86-
SsaImplCommon::phiHasInputFromBlock(this, result, bb)
87-
}
86+
cached
87+
Definition getPhiInput(BasicBlock bb) { SsaImplCommon::phiHasInputFromBlock(this, result, bb) }
8888

89-
cached Definition getAPhiInput() {
90-
result = this.getPhiInput(_)
91-
}
89+
cached
90+
Definition getAPhiInput() { result = this.getPhiInput(_) }
9291
}
9392
}

swift/ql/lib/codeql/swift/dataflow/internal/DataFlowPrivate.qll

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -166,17 +166,11 @@ abstract class ReturnNode extends Node {
166166
abstract ReturnKind getKind();
167167
}
168168

169-
private module ReturnNodes {
169+
private module ReturnNodes {
170170
class ReturnReturnNode extends ReturnNode, ExprNode {
171-
ReturnReturnNode() {
172-
exists(ReturnStmt stmt |
173-
stmt.getResult() = this.asExpr()
174-
)
175-
}
171+
ReturnReturnNode() { exists(ReturnStmt stmt | stmt.getResult() = this.asExpr()) }
176172

177-
override ReturnKind getKind() {
178-
result instanceof NormalReturnKind
179-
}
173+
override ReturnKind getKind() { result instanceof NormalReturnKind }
180174
}
181175
}
182176

@@ -188,7 +182,7 @@ abstract class OutNode extends Node {
188182
abstract DataFlowCall getCall(ReturnKind kind);
189183
}
190184

191-
private module OutNodes {
185+
private module OutNodes {
192186
class CallOutNode extends OutNode, DataFlowCall {
193187
override DataFlowCall getCall(ReturnKind kind) {
194188
result = this and kind instanceof NormalReturnKind

swift/ql/test/library-tests/dataflow/dataflow/DataFlow.ql

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,5 @@ class TestConfiguration extends DataFlow::Configuration {
2020
}
2121

2222
from DataFlow::PathNode src, DataFlow::PathNode sink, TestConfiguration test
23-
where
24-
test.hasFlowPath(src, sink)
23+
where test.hasFlowPath(src, sink)
2524
select src, sink

0 commit comments

Comments
 (0)