File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -1216,3 +1216,18 @@ private predicate constantTemplateLiteral(Expr e) {
1216
1216
or
1217
1217
constantTemplateLiteral ( e .( Cast ) .getExpr ( ) )
1218
1218
}
1219
+
1220
+ /**
1221
+ * A C++ three-way comparison operation, also known as the _spaceship
1222
+ * operation_. This is specific to C++20 and later.
1223
+ * ```
1224
+ * auto c = (a <=> b);
1225
+ * ```
1226
+ */
1227
+ class SpaceshipExpr extends BinaryOperation , @spaceshipexpr {
1228
+ override string getCanonicalQLClass ( ) { result = "SpaceshipExpr" }
1229
+
1230
+ override int getPrecedence ( ) { result = 11 }
1231
+
1232
+ override string getOperator ( ) { result = "<=>" }
1233
+ }
Original file line number Diff line number Diff line change @@ -1231,6 +1231,7 @@ funbind(
1231
1231
| @ltexpr
1232
1232
| @geexpr
1233
1233
| @leexpr
1234
+ | @spaceshipexpr
1234
1235
;
1235
1236
1236
1237
@bin_bitwise_op_expr = @lshiftexpr
@@ -1636,6 +1637,7 @@ case @expr.kind of
1636
1637
| 323 = @vec_fill
1637
1638
| 324 = @builtinconvertvector
1638
1639
| 325 = @builtincomplex
1640
+ | 326 = @spaceshipexpr
1639
1641
;
1640
1642
1641
1643
new_allocated_type(
You can’t perform that action at this time.
0 commit comments