File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
swift/ql/lib/codeql/swift Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ private module Cached {
162
162
nodeFrom .asExpr ( ) = nco .getAnOperand ( )
163
163
or
164
164
// unpack closure (the second argument is typically an `AutoClosureExpr` argument)
165
- nodeFrom .asExpr ( ) = nco .getAnOperand ( ) .( AutoClosureExpr ) .getReturn ( ) . getResult ( )
165
+ nodeFrom .asExpr ( ) = nco .getAnOperand ( ) .( AutoClosureExpr ) .getExpr ( )
166
166
)
167
167
or
168
168
// flow through ternary operator `? :`
Original file line number Diff line number Diff line change 1
1
private import codeql.swift.generated.expr.AutoClosureExpr
2
2
private import codeql.swift.elements.stmt.ReturnStmt
3
+ private import codeql.swift.elements.expr.Expr
3
4
4
5
class AutoClosureExpr extends Generated:: AutoClosureExpr {
5
6
/** Gets the implicit return statement generated by this autoclosure expression. */
6
7
ReturnStmt getReturn ( ) { result = unique( | | this .getBody ( ) .getAnElement ( ) ) }
7
8
9
+ /**
10
+ * Gets the expression returned by this autoclosure expression.
11
+ */
12
+ Expr getExpr ( ) { result = this .getReturn ( ) .getResult ( ) }
13
+
8
14
override string toString ( ) { result = this .getBody ( ) .toString ( ) }
9
15
}
You can’t perform that action at this time.
0 commit comments