File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
csharp/ql/test/library-tests/csharp11 Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -12,4 +12,9 @@ public void M1()
1212 var z = - 4 ;
1313 z >>>= 5 ;
1414 }
15+ }
16+
17+ public class MyOperatorClass
18+ {
19+ public static MyOperatorClass operator >>> ( MyOperatorClass a , MyOperatorClass b ) { return null ; }
1520}
Original file line number Diff line number Diff line change @@ -4,3 +4,5 @@ binarybitwise
44| Operators.cs:13:9:13:16 | ... >>> ... | Operators.cs:13:9:13:9 | access to local variable z | Operators.cs:13:16:13:16 | 5 | >>> | UnsignedRightShiftExpr |
55assignbitwise
66| Operators.cs:13:9:13:16 | ... >>>= ... | Operators.cs:13:9:13:9 | access to local variable z | Operators.cs:13:16:13:16 | 5 | >>>= | AssignUnsighedRightShiftExpr |
7+ userdefined
8+ | Operators.cs:19:44:19:46 | >>> | op_UnsignedRightShift | UnsignedRightShiftOperator |
Original file line number Diff line number Diff line change @@ -19,3 +19,9 @@ query predicate assignbitwise(
1919 name = op .getOperator ( ) and
2020 qlclass = op .getAPrimaryQlClass ( )
2121}
22+
23+ query predicate userdefined ( Operator op , string fname , string qlclass ) {
24+ op .getFile ( ) .getStem ( ) = "Operators" and
25+ fname = op .getFunctionName ( ) and
26+ qlclass = op .getAPrimaryQlClass ( )
27+ }
You can’t perform that action at this time.
0 commit comments