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 {
155
155
or
156
156
// flow through nil-coalescing operator `??`
157
157
exists ( BinaryExpr nco |
158
- nco .getStaticTarget ( ) .( FreeFunctionDecl ) .getName ( ) = "??(_:_:)" and
158
+ nco .getOperator ( ) .( FreeFunctionDecl ) .getName ( ) = "??(_:_:)" and
159
159
nodeTo .asExpr ( ) = nco
160
160
|
161
161
// value argument
Original file line number Diff line number Diff line change 1
1
private import codeql.swift.generated.expr.BinaryExpr
2
2
private import codeql.swift.elements.expr.Expr
3
+ private import codeql.swift.elements.decl.AbstractFunctionDecl
3
4
4
5
class BinaryExpr extends Generated:: BinaryExpr {
5
6
Expr getLeftOperand ( ) { result = this .getArgument ( 0 ) .getExpr ( ) }
6
7
7
8
Expr getRightOperand ( ) { result = this .getArgument ( 1 ) .getExpr ( ) }
8
9
10
+ AbstractFunctionDecl getOperator ( ) { result = this .getStaticTarget ( ) }
11
+
9
12
Expr getAnOperand ( ) { result = [ this .getLeftOperand ( ) , this .getRightOperand ( ) ] }
10
13
11
14
override string toString ( ) { result = "... " + this .getFunction ( ) .toString ( ) + " ..." }
You can’t perform that action at this time.
0 commit comments