C++: Support C23 typeof and typeof_unqual#19290
Conversation
typeof and typeof_unqualtypeof and typeof_unqual
c95523d to
1849b4c
Compare
| 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 |
There was a problem hiding this comment.
AFAIK this kind of projection can be written directly in the properties file by means of the reorder operator, without writing a ql file:
decltypes.rel: reorder decltypes.rel (int id, int expr, int kind, int basetype, boolean paren) id expr basetype paren
There was a problem hiding this comment.
Leaving this as is, but I'll keep this in mind when it ever comes up again.
|
|
||
| predicate typeTransformation(Type type, string name, int kind, Type type_id) { | ||
| type_operators(type, _, _, type_id) and | ||
| name = "" and |
There was a problem hiding this comment.
I'm guessing this name = "" means losing some information, but we're accepting that, right?
There was a problem hiding this comment.
Not really. I'm just projecting all the rows of the type_operators table on the derivedtypes table, to make sure I have some kind of type, but the derivedtypes table requires me to make up some kind of name.
There was a problem hiding this comment.
I could compute something based on the two columns of type_operators that I ignore here, but that doesn't seem to be worth the trouble.
redsun82
left a comment
There was a problem hiding this comment.
LGTM, only a downgrade script suggestion and a doubt, but nothing blocking 👍
No description provided.