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 {
162162 nodeFrom .asExpr ( ) = nco .getAnOperand ( )
163163 or
164164 // 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 ( )
166166 )
167167 or
168168 // flow through ternary operator `? :`
Original file line number Diff line number Diff line change 11private import codeql.swift.generated.expr.AutoClosureExpr
22private import codeql.swift.elements.stmt.ReturnStmt
3+ private import codeql.swift.elements.expr.Expr
34
45class AutoClosureExpr extends Generated:: AutoClosureExpr {
56 /** Gets the implicit return statement generated by this autoclosure expression. */
67 ReturnStmt getReturn ( ) { result = unique( | | this .getBody ( ) .getAnElement ( ) ) }
78
9+ /**
10+ * Gets the expression returned by this autoclosure expression.
11+ */
12+ Expr getExpr ( ) { result = this .getReturn ( ) .getResult ( ) }
13+
814 override string toString ( ) { result = this .getBody ( ) .toString ( ) }
915}
You can’t perform that action at this time.
0 commit comments