Skip to content

Commit 046bd44

Browse files
committed
C++: Add upgrade and downgrade scripts
1 parent b9a2936 commit 046bd44

File tree

9 files changed

+9927
-0
lines changed

9 files changed

+9927
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Type extends @type {
2+
string toString() { none() }
3+
}
4+
5+
class Expr extends @expr {
6+
string toString() { none() }
7+
}
8+
9+
from Type decltype, Expr expr, Type basetype, boolean parentheses
10+
where decltypes(decltype, expr, _, basetype, parentheses)
11+
select decltype, expr, basetype, parentheses
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
class Type extends @type {
2+
string toString() { none() }
3+
}
4+
5+
predicate derivedType(Type type, string name, int kind, Type type_id) {
6+
derivedtypes(type, name, kind, type_id)
7+
}
8+
9+
predicate typeTransformation(Type type, string name, int kind, Type type_id) {
10+
type_operators(type, _, _, type_id) and
11+
name = "" and
12+
kind = 3 // @type_with_specifiers
13+
}
14+
15+
from Type type, string name, int kind, Type type_id
16+
where
17+
derivedType(type, name, kind, type_id) or
18+
typeTransformation(type, name, kind, type_id)
19+
select type, name, kind, type_id

0 commit comments

Comments
 (0)