Skip to content

Commit 411e52a

Browse files
committed
C++: Replace @buildin_op with @builtin_op
1 parent b34db33 commit 411e52a

File tree

3 files changed

+4
-14
lines changed

3 files changed

+4
-14
lines changed

cpp/ql/src/semmle/code/cpp/exprs/BuiltInOperations.qll

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,15 @@ import semmle.code.cpp.exprs.Expr
44
* A C/C++ builtin operation. This is the root QL class encompassing
55
* built-in functionality.
66
*/
7-
class BuiltInOperation extends Expr, @buildin_op {
7+
class BuiltInOperation extends Expr, @builtin_op {
88
override string getCanonicalQLClass() { result = "BuiltInOperation" }
99
}
1010

1111
/**
1212
* A C/C++ built-in operation that is used to support functions with variable numbers of arguments.
1313
* This includes `va_start`, `va_end`, `va_copy`, and `va_arg`.
1414
*/
15-
class VarArgsExpr extends BuiltInOperation, @var_args_expr {
16-
VarArgsExpr() {
17-
this instanceof BuiltInVarArgsStart
18-
or
19-
this instanceof BuiltInVarArgsEnd
20-
or
21-
this instanceof BuiltInVarArg
22-
or
23-
this instanceof BuiltInVarArgCopy
24-
}
25-
}
15+
class VarArgsExpr extends BuiltInOperation, @var_args_expr { }
2616

2717
/**
2818
* A C/C++ `__builtin_va_start` built-in operation (used by some

cpp/ql/src/semmlecode.cpp.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ case @expr.kind of
16471647
| @vacopyexpr
16481648
;
16491649

1650-
@buildin_op = @var_args_expr
1650+
@builtin_op = @var_args_expr
16511651
| @noopexpr
16521652
| @offsetofexpr
16531653
| @intaddrexpr

cpp/upgrades/874439f4c501cb03a39fba053eef9d384216bbf2/semmlecode.cpp.dbscheme

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1647,7 +1647,7 @@ case @expr.kind of
16471647
| @vacopyexpr
16481648
;
16491649

1650-
@buildin_op = @var_args_expr
1650+
@builtin_op = @var_args_expr
16511651
| @noopexpr
16521652
| @offsetofexpr
16531653
| @intaddrexpr

0 commit comments

Comments
 (0)