File tree Expand file tree Collapse file tree 2 files changed +4
-1
lines changed
swift/ql/lib/codeql/swift Expand file tree Collapse file tree 2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -155,7 +155,7 @@ private module Cached {
155155 or
156156 // flow through nil-coalescing operator `??`
157157 exists ( BinaryExpr nco |
158- nco .getStaticTarget ( ) .( FreeFunctionDecl ) .getName ( ) = "??(_:_:)" and
158+ nco .getOperator ( ) .( FreeFunctionDecl ) .getName ( ) = "??(_:_:)" and
159159 nodeTo .asExpr ( ) = nco
160160 |
161161 // value argument
Original file line number Diff line number Diff line change 11private import codeql.swift.generated.expr.BinaryExpr
22private import codeql.swift.elements.expr.Expr
3+ private import codeql.swift.elements.decl.AbstractFunctionDecl
34
45class BinaryExpr extends Generated:: BinaryExpr {
56 Expr getLeftOperand ( ) { result = this .getArgument ( 0 ) .getExpr ( ) }
67
78 Expr getRightOperand ( ) { result = this .getArgument ( 1 ) .getExpr ( ) }
89
10+ AbstractFunctionDecl getOperator ( ) { result = this .getStaticTarget ( ) }
11+
912 Expr getAnOperand ( ) { result = [ this .getLeftOperand ( ) , this .getRightOperand ( ) ] }
1013
1114 override string toString ( ) { result = "... " + this .getFunction ( ) .toString ( ) + " ..." }
You can’t perform that action at this time.
0 commit comments