@@ -2,10 +2,8 @@ import semmle.code.cpp.exprs.Expr
22
33/**
44 * A C/C++ unary arithmetic operation.
5- *
6- * This is an abstract base QL class.
75 */
8- abstract class UnaryArithmeticOperation extends UnaryOperation { }
6+ class UnaryArithmeticOperation extends UnaryOperation , @un_arith_op_expr { }
97
108/**
119 * A C/C++ unary minus expression.
@@ -53,12 +51,12 @@ class ConjugationExpr extends UnaryArithmeticOperation, @conjugation {
5351/**
5452 * A C/C++ `++` or `--` expression (either prefix or postfix).
5553 *
56- * This is the abstract base QL class for increment and decrement operations.
54+ * This is the base QL class for increment and decrement operations.
5755 *
5856 * Note that this does not include calls to user-defined `operator++`
5957 * or `operator--`.
6058 */
61- abstract class CrementOperation extends UnaryArithmeticOperation {
59+ class CrementOperation extends UnaryArithmeticOperation , @crement_expr {
6260 override predicate mayBeImpure ( ) { any ( ) }
6361
6462 override predicate mayBeGloballyImpure ( ) {
@@ -75,28 +73,28 @@ abstract class CrementOperation extends UnaryArithmeticOperation {
7573 *
7674 * Note that this does not include calls to user-defined `operator++`.
7775 */
78- abstract class IncrementOperation extends CrementOperation { }
76+ class IncrementOperation extends CrementOperation , @increment_expr { }
7977
8078/**
8179 * A C/C++ `--` expression (either prefix or postfix).
8280 *
8381 * Note that this does not include calls to user-defined `operator--`.
8482 */
85- abstract class DecrementOperation extends CrementOperation { }
83+ class DecrementOperation extends CrementOperation , @decrement_expr { }
8684
8785/**
8886 * A C/C++ `++` or `--` prefix expression.
8987 *
9088 * Note that this does not include calls to user-defined operators.
9189 */
92- abstract class PrefixCrementOperation extends CrementOperation { }
90+ class PrefixCrementOperation extends CrementOperation , @prefix_crement_expr { }
9391
9492/**
9593 * A C/C++ `++` or `--` postfix expression.
9694 *
9795 * Note that this does not include calls to user-defined operators.
9896 */
99- abstract class PostfixCrementOperation extends CrementOperation { }
97+ class PostfixCrementOperation extends CrementOperation , @postfix_crement_expr { }
10098
10199/**
102100 * A C/C++ prefix increment expression, as in `++x`.
@@ -199,7 +197,7 @@ class ImaginaryPartExpr extends UnaryArithmeticOperation, @imagpartexpr {
199197 *
200198 * This is an abstract base QL class for all binary arithmetic operations.
201199 */
202- abstract class BinaryArithmeticOperation extends BinaryOperation { }
200+ class BinaryArithmeticOperation extends BinaryOperation , @bin_arith_op_expr { }
203201
204202/**
205203 * A C/C++ add expression.
@@ -404,7 +402,7 @@ class MaxExpr extends BinaryArithmeticOperation, @maxexpr {
404402/**
405403 * A C/C++ pointer arithmetic operation.
406404 */
407- abstract class PointerArithmeticOperation extends BinaryArithmeticOperation { }
405+ class PointerArithmeticOperation extends BinaryArithmeticOperation , @p_arith_op_expr { }
408406
409407/**
410408 * A C/C++ pointer add expression.
0 commit comments