File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
swift/ql/lib/codeql/swift/elements/expr Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2,8 +2,22 @@ private import codeql.swift.generated.expr.AutoClosureExpr
22private import codeql.swift.elements.stmt.ReturnStmt
33private import codeql.swift.elements.expr.Expr
44
5+ /**
6+ * A Swift autoclosure expression, that is, a closure automatically generated
7+ * around an argument when the parameter has the `@autoclosure` attribute. For
8+ * example, there is an `AutoClosureExpr` around the value `0` in:
9+ * ```
10+ * func myFunction(_ expr: @autoclosure () -> Int) {
11+ * ...
12+ * }
13+ *
14+ * myFunction(0)
15+ * ```
16+ */
517class AutoClosureExpr extends Generated:: AutoClosureExpr {
6- /** Gets the implicit return statement generated by this autoclosure expression. */
18+ /**
19+ * Gets the implicit return statement generated by this autoclosure expression.
20+ */
721 ReturnStmt getReturn ( ) { result = unique( | | this .getBody ( ) .getAnElement ( ) ) }
822
923 /**
You can’t perform that action at this time.
0 commit comments