Skip to content

Commit f49d820

Browse files
committed
C++: Add upgrade and downgrade scripts
1 parent a32cfda commit f49d820

File tree

9 files changed

+9804
-0
lines changed

9 files changed

+9804
-0
lines changed

cpp/downgrades/e594389175c098d7225683d0fd8cefcc47d84bc1/old.dbscheme

Lines changed: 2444 additions & 0 deletions
Large diffs are not rendered by default.

cpp/downgrades/e594389175c098d7225683d0fd8cefcc47d84bc1/semmlecode.cpp.dbscheme

Lines changed: 2432 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
description: Mix typedefs and usings
2+
compatibility: full
3+
usertypes.rel: run usertypes.qlo
4+
usertype_alias_kind.rel: delete
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
class UserType extends @usertype {
2+
string toString() { none() }
3+
}
4+
5+
int getTyperefKind(UserType usertype) {
6+
usertype_alias_kind(usertype, 0) and
7+
result = 5
8+
or
9+
usertype_alias_kind(usertype, 1) and
10+
result = 14
11+
}
12+
13+
bindingset[kind]
14+
int getKind(UserType usertype, int kind) {
15+
if kind = 18 then result = getTyperefKind(usertype) else result = kind
16+
}
17+
18+
from UserType usertype, string name, int kind
19+
where usertypes(usertype, name, kind)
20+
select usertype, name, getKind(usertype, kind)

0 commit comments

Comments
 (0)