Skip to content

Commit

Permalink
Swift: QLDoc for NilCoalescingExpr.qll
Browse files Browse the repository at this point in the history
  • Loading branch information
rdmarsh2 committed Oct 3, 2023
1 parent 497f0aa commit cdef079
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions swift/ql/lib/codeql/swift/elements/expr/NilCoalescingExpr.qll
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/**
* Provides a class for the Swift nil-coalesing expr (`??`)
*/

private import codeql.swift.elements.expr.Expr
private import codeql.swift.elements.expr.BinaryExpr

/**
* A Swift nil-coalesing expr (`??`).
*/
class NilCoalescingExpr extends BinaryExpr {
NilCoalescingExpr() {
this.getStaticTarget().getName() = "??(_:_:)"
}
}
NilCoalescingExpr() { this.getStaticTarget().getName() = "??(_:_:)" }
}

0 comments on commit cdef079

Please sign in to comment.