C++: Add upgrade and downgrade scripts

This commit is contained in:
Jeroen Ketema
2025-04-17 13:26:12 +02:00
parent e97f9495d0
commit a3e0c15c10
9 changed files with 9927 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
class Type extends @type {
string toString() { none() }
}
class Expr extends @expr {
string toString() { none() }
}
from Type decltype, Expr expr, Type basetype, boolean parentheses
where decltypes(decltype, expr, _, basetype, parentheses)
select decltype, expr, basetype, parentheses

View File

@@ -0,0 +1,19 @@
class Type extends @type {
string toString() { none() }
}
predicate derivedType(Type type, string name, int kind, Type type_id) {
derivedtypes(type, name, kind, type_id)
}
predicate typeTransformation(Type type, string name, int kind, Type type_id) {
type_operators(type, _, _, type_id) and
name = "" and
kind = 3 // @type_with_specifiers
}
from Type type, string name, int kind, Type type_id
where
derivedType(type, name, kind, type_id) or
typeTransformation(type, name, kind, type_id)
select type, name, kind, type_id

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,5 @@
description: Support C23 typeof and typeof_unqual
compatibility: backwards
decltypes.rel: run decltypes.qlo
derivedtypes.rel: run derivedtypes.qlo
type_operators.rel: delete