-
Notifications
You must be signed in to change notification settings - Fork 1.9k
C++: Support C23 typeof and typeof_unqual
#19290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
df3282c
e97f949
a3e0c15
0c31346
cad6958
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm guessing this
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not really. I'm just projecting all the rows of the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could compute something based on the two columns of |
||
| 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 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AFAIK this kind of projection can be written directly in the
propertiesfile by means of thereorderoperator, without writing a ql file:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Leaving this as is, but I'll keep this in mind when it ever comes up again.