C++: Remove abstract keyword from BuiltInOperation

This commit is contained in:
Mathias Vorreiter Pedersen
2020-05-07 13:18:12 +02:00
parent 964b8478dc
commit 43ffcfe730
2 changed files with 63 additions and 2 deletions

View File

@@ -4,7 +4,7 @@ import semmle.code.cpp.exprs.Expr
* A C/C++ builtin operation. This is the root QL class encompassing
* built-in functionality.
*/
abstract class BuiltInOperation extends Expr {
class BuiltInOperation extends Expr, @buildin_op {
override string getCanonicalQLClass() { result = "BuiltInOperation" }
}
@@ -12,7 +12,7 @@ abstract class BuiltInOperation extends Expr {
* A C/C++ built-in operation that is used to support functions with variable numbers of arguments.
* This includes `va_start`, `va_end`, `va_copy`, and `va_arg`.
*/
class VarArgsExpr extends BuiltInOperation {
class VarArgsExpr extends BuiltInOperation, @var_args_expr {
VarArgsExpr() {
this instanceof BuiltInVarArgsStart
or

View File

@@ -1641,6 +1641,67 @@ case @expr.kind of
| 326 = @spaceshipexpr
;
@var_args_expr = @vastartexpr
| @vaendexpr
| @vaargexpr
| @vacopyexpr
;
@buildin_op = @var_args_expr
| @noopexpr
| @offsetofexpr
| @intaddrexpr
| @hasassignexpr
| @hascopyexpr
| @hasnothrowassign
| @hasnothrowconstr
| @hasnothrowcopy
| @hastrivialassign
| @hastrivialconstr
| @hastrivialcopy
| @hastrivialdestructor
| @hasuserdestr
| @hasvirtualdestr
| @isabstractexpr
| @isbaseofexpr
| @isclassexpr
| @isconvtoexpr
| @isemptyexpr
| @isenumexpr
| @ispodexpr
| @ispolyexpr
| @isunionexpr
| @typescompexpr
| @builtinshufflevector
| @builtinconvertvector
| @builtinaddressof
| @istriviallyconstructibleexpr
| @isdestructibleexpr
| @isnothrowdestructibleexpr
| @istriviallydestructibleexpr
| @istriviallyassignableexpr
| @isnothrowassignableexpr
| @isstandardlayoutexpr
| @istriviallycopyableexpr
| @isliteraltypeexpr
| @hastrivialmoveconstructorexpr
| @hastrivialmoveassignexpr
| @hasnothrowmoveassignexpr
| @isconstructibleexpr
| @isnothrowconstructibleexpr
| @hasfinalizerexpr
| @isdelegateexpr
| @isinterfaceclassexpr
| @isrefarrayexpr
| @isrefclassexpr
| @issealedexpr
| @issimplevalueclassexpr
| @isvalueclassexpr
| @isfinalexpr
| @builtinchooseexpr
| @builtincomplex
;
new_allocated_type(
unique int expr: @new_expr ref,
int type_id: @type ref